Hadoop - MapReduce eclipse plugin not pointing to hdfs

MapReduce Eclipse plugin not pointing to local file system rather hdfs.

On your first run of WordCount from eclipse -> run on hadoop you may notice the java program uses local file system instead hdfs.

Adding hdfs location in your Configuration object solves this issue. In case of WordCount.java add the below into your main method.

public static void main(String[] args) throws Exception {
Configuration conf = new Configuration();

conf.addResource(new Path(HADOOP_INSTALL+"/conf/core-site.xml"));
conf.addResource(new Path(HADOOP_INSTALL+"/conf/hdfs-site.xml"));



Popular posts from this blog

Log4j multiple WAR files in single EAR configuration

Java NIO2 - Watching a directory for changes. FileWatcherService.

Ubuntu Add programs to launcher (Desktop)