|
|
-
How to define the path of HDFS?
Bill Yu 2009-09-09, 04:54
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
+
Bill Yu 2009-09-09, 04:54
-
Re: How to define the path of HDFS?
Steve Loughran 2009-09-09, 11:09
Bill Yu wrote: > 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 ! >
1. This is not a dev question, please use the -user lists 2. Java.io classes aren't the way to open HDFS files
+
Steve Loughran 2009-09-09, 11:09
-
Re: How to define the path of HDFS?
Boris Shkolnik 2009-09-09, 18:10
You should use FileSystem methods to do it.. E.g. FSDataInputStream open(Path f) On 9/8/09 9:54 PM, "Bill Yu" <[EMAIL PROTECTED]> wrote:
> 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
+
Boris Shkolnik 2009-09-09, 18:10
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext