FAQ
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!!

Search Discussions

  • Jeff Zhang at Jun 12, 2010 at 7:09 am
    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
    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
  • Sanel Zukan at Jun 12, 2010 at 8:05 am
    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 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
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
categorieshadoop
postedJun 12, '10 at 6:58a
activeJun 12, '10 at 8:05a
posts3
users3
websitehadoop.apache.org...
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase