Hadoop: cannot set default FileSystem as HDFS in core-site.xml Hadoop: cannot set default FileSystem as HDFS in core-site.xml hadoop hadoop

Hadoop: cannot set default FileSystem as HDFS in core-site.xml


Eclipse environment doesn't know where the conf directory under Hadoop install directory to find the core-default.xml and core-site.xml unless these files are added to the Eclipse classpath to load first.

Since these are not added in the eclipse classpath, the default core-site.xml will be loaded from the jar file hadoop-*-core.jar (For eg: hadoop-0.20.2-core.jar for version 0.20) which has the local system as default file system and hence you are seeing LocalFileSystem object instead of DistributedFileSystem.

So, to add the <HADOOP_INSTALL>/conf directory to eclipse project classpath, goto the project properties(project -> properties) -> Java build path -> Libraries tab -> Add external class folder -> Select the conf directory from <HADOOP_INSTALL>

The above should add your `/core-site.xml' to your eclipse classpath and all your settings should override the default ones.