First hadoop project error: "Input path does not exist"

You need to upload your input files to the HDFS file system first:

bin/hadoop fs -mkdir In

will create a directory named /user/DEVUSER/In in HDFS.

bin/hadoop fs -put *.txt In

will copy all *.txt files from the current directory to the cluster (HDFS).

You seem to have skipped the chapter Upload data from the tutorial. Follow it and your problem should be solved.


If you dont want to upload the file to hdfs rather access it from your local system, then try setting you input path like this.

FileInputFormat.setInputPaths(conf, new Path("file://path of the In Folder on your File system "));

As harpun said, but for some situation even you tried to create that directory under HDFS, it wont and gives you that message : mkdir: `In': No such file or directory As a solution to that you need to :

bin/hadoop fs -mkdir /tmp/In

and then copy the texts files to HDFS Cluster

bin/hadoop fs -put *.txt /tmp/In

Tags:

Hadoop