1
votes
  1. I have created the input text file test.txt and put it to HDFS as /user/yogesh/Input/test.txt
  2. Created output path on HDFS as /user/yogesh/Output
  3. Created the jar file on local /home/yogesh/WordCount.jar and submitted MR job from local, like that: hadoop jar /home/yogesh/WordCount.jar WordCount /user/yogesh/Input/test.txt /user/yogesh/Output/output1

I have got following error:

Exception in thread "main"
org.apache.hadoop.mapreduce.lib.input.InvalidInputException:Input path does not exist: hdfs:host/user/yogesh/WordCount.

hdfs:host/user/yogesh/ - is my HDFS directory. I am not able to understand why this MR job looking for code in HDFS and how to solve this error.

1

1 Answers

0
votes

Try giving the name package of the class WordCount as its prefix, or just skip the class and use just jar, input, output, like that:

hadoop jar /home/yogesh/WordCount.jar /user/yogesh/Input /user/yogesh/Output/output1

Also, make sure that /user/yogesh/Output/output1 does not exist prior to the execution of this command. Also, notice that you should give an input directory and not an input file. Hadoop will take as input all the files in the specified directory.

For an example, see how the WordCount example is run, in this site.