hi Sanjiv,
you can simply intializae  Path (org.apache.hadoop.fs.Path) with your
desired filename you want to create/open and then get a Filesystem
((org.apache.hadoop.fs.Path)) object. Filesystem object can do the rest for
you.

Example code snippet:
Path tmp = new Path("/tmp"); //initializing the Path object
FileSystem fs =  tmp.getFileSystem();  //  Getting fs object
Boolean flag =  fs.exists("/input") // you can make use of fs to all the
filesystem related operations.

Hope it helps.
Vibhooti


On Tue, Aug 3, 2010 at 3:48 PM, sanjiv.singh <sanjiv.is...@gmail.com> wrote:

>
> Hi All,
> i want to access HDFS file sytem through map-reduce java code.
> how can specify path for HDFS in Path  constructor.
>
>
> --
> View this message in context:
> http://old.nabble.com/how-to-access-HDFS-file-system.-tp29333820p29333820.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>


-- 
cheers,
Vibhooti

Reply via email to