You should use FileSystem.open() to obtain an input stream to read from HDFS
(
http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/fs/FileSystem.html#open%28org.apache.hadoop.fs.Path%29
).

2009/9/9 Bill Yu <[email protected]>

> Hi everyone,
>
>      when I run the following code:
>
>      ObjectInputStream in = new ObjectInputStream(new
> FileInputStream("hdfs://localhost:9000/myDir/trajectory/test.obj"));
>
>      it throws an error that the directory is not exist, how can I define
> the its path ?
>      Any suggestion is appreciate !
>
> Thanks,
> Austin

Reply via email to