You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Mohan Agarwal <mo...@gmail.com> on 2009/11/04 12:33:59 UTC

Problem regarding HDFS

Hi,
    Can we access the file located on hdfs using java ?

Thanking You
Mohan Agarwal

Re: Problem regarding HDFS

Posted by Jeff Zhang <zj...@gmail.com>.
Of course you can.

if you use hadoop 0.18.3, you only need to put hadoop-site.xml on your
classpath, and put your custom configuration to this file


Jeff Zhang


On Wed, Nov 4, 2009 at 3:03 PM, Shahfik Amasha <sh...@gmail.com> wrote:

> Hi,
>
> If I may take the question a step further. Can we access HDFS from a web
> application running on Tomcat? Let's assume that Tomcat is running on the
> Namenode for simplicity sake.
>
>
> Shahfik Amasha
>
>
> On Wed, Nov 4, 2009 at 8:35 PM, Huy Phan <da...@gmail.com> wrote:
>
> > The answer is yes.
> > You can check the FileSystem API at this page :
> >
> >
> http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/fs/FileSystem.html
> > Another material for you:
> >
> http://myjavanotebook.blogspot.com/2008/05/hadoop-file-system-tutorial.html
> >
> > On Wed, Nov 4, 2009 at 6:33 PM, Mohan Agarwal <mohan.agarwal25@gmail.com
> > >wrote:
> >
> > > Hi,
> > >    Can we access the file located on hdfs using java ?
> > >
> > > Thanking You
> > > Mohan Agarwal
> > >
> >
>

Re: Problem regarding HDFS

Posted by Shahfik Amasha <sh...@gmail.com>.
Hi,

If I may take the question a step further. Can we access HDFS from a web
application running on Tomcat? Let's assume that Tomcat is running on the
Namenode for simplicity sake.


Shahfik Amasha


On Wed, Nov 4, 2009 at 8:35 PM, Huy Phan <da...@gmail.com> wrote:

> The answer is yes.
> You can check the FileSystem API at this page :
>
> http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/fs/FileSystem.html
> Another material for you:
> http://myjavanotebook.blogspot.com/2008/05/hadoop-file-system-tutorial.html
>
> On Wed, Nov 4, 2009 at 6:33 PM, Mohan Agarwal <mohan.agarwal25@gmail.com
> >wrote:
>
> > Hi,
> >    Can we access the file located on hdfs using java ?
> >
> > Thanking You
> > Mohan Agarwal
> >
>

Re: Problem regarding HDFS

Posted by Huy Phan <da...@gmail.com>.
The answer is yes.
You can check the FileSystem API at this page :
http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/fs/FileSystem.html
Another material for you:
http://myjavanotebook.blogspot.com/2008/05/hadoop-file-system-tutorial.html

On Wed, Nov 4, 2009 at 6:33 PM, Mohan Agarwal <mo...@gmail.com>wrote:

> Hi,
>    Can we access the file located on hdfs using java ?
>
> Thanking You
> Mohan Agarwal
>