Just make sure 'fs.default.name' (set in Configuration) is set and point to master with 'hdfs://' prefix. Otherwise, by default, it will behave as LocalFileSystem.
On Sat, Jun 12, 2010 at 9:08 AM, Jeff Zhang <[email protected]> wrote: > You should put hadoop-*.core.jar on your classpath. and initialize > your FileSystem by the following method > public static FileSystem get(URI uri, Configuration conf) > > You can make the uri configuration in your UI. > > > > On Sat, Jun 12, 2010 at 2:57 PM, Sugandha Naolekar > <[email protected]> wrote: >> Hello!! >> >> I have developed a GUI in JAVA using Swings!! Now, I want to perform >> simple HDFS operations such as, data transfer and retrieval of the same. >> These all operations I want to perform on the button click. So, I have >> written a simple code, in which I have used FileSystem API and invoked >> corresponding methods. >> >> Now, to execute this code, will I have to build a jar?? Also, If I dont >> build a Jar of the entire code, but, simply run it on the click event of a >> button, will the HDFS operations be performed. Remember, I dont want to >> perform LocalFS tasks but the object of HDFS should get initialized. For >> that, creation of Configuration class 's object will be suffice?? >> >> Regards! >> Sugandha!! >> > > > > -- > Best Regards > > Jeff Zhang > Best.
