|
|
-
configuration and FileSystem
Gang Luo 2011-05-10, 16:57
Hi,
I was confused by the configuration and file system in hadoop. when we create a FileSystem object and read/write something through it, are we writing to or reading from HDFS? Could it be local file system? If yes, what determines which file system it is? Configuration object we used to create the FileSystem object? When I write mapreduce program which "extends Configured implements Tool", I can get the right configuration by calling getConf() and use the FileSystem object to communicate with HDFS. What if I want to read/write HDFS in a separate Utility class? Where does the configuration come from?
Thanks.
-Gang
-
Re: configuration and FileSystem
Allen Wittenauer 2011-05-10, 17:46
On May 10, 2011, at 9:57 AM, Gang Luo wrote: > I was confused by the configuration and file system in hadoop. when we create a > FileSystem object and read/write something through it, are we writing to or > reading from HDFS?
Typically, yes.
> Could it be local file system?
Yes. > If yes, what determines which > file system it is? Configuration object we used to create the FileSystem object?
Yes.
> When I write mapreduce program which "extends Configured implements Tool", I can > get the right configuration by calling getConf() and use the FileSystem object > to communicate with HDFS. What if I want to read/write HDFS in a separate > Utility class? Where does the configuration come from?
You need to supply it.
-
Re: configuration and FileSystem
Chris Stier 2011-05-10, 17:48
Hadoop newbie here, I have a few of the same questions that Gang has. I have the single node configuration installed but every time I restart my computer I loose my name node because it's location is defaulted to /tmp. I'm using 0.21.0. Is there a write up some where that shows what config files to change so that the it's not using temp? Thanks! JC
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext