While running the wordcount example in Hadoop
, I am facing the following error.
saying "JAR does not exist or is not a normal file:
/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduceexamples-2.2.0.jar"
My input command was :
hadoop jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduceexamples-2.2.0.jar wordcount input output
Just go to that path and check it out if the name is correct or not, the convention may differ by the distribution.
For example, hadoop 3.1.0 has it in the following path:
$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.0.jar
I faced the same problem and problem was with the version number in file. For example, in the installation instructions, the command was:
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.2.1.jar grep input output 'dfs[a-z.]+'
While the version I'm working with was 3.1.3 so what worked for me was:
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar grep input output 'dfs[a-z.]+'
Just check whether all the dependencies are included in your jar file. Try something like this.
hadoop jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduceexamples-2.2.0-jar-with-dependencies.jar wordcount input output
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With