New to Hadoop Mapreduce and I am not sure why I am getting this error.
I am currently getting:
Not a valid JAR: /nfsdata/DSCluster/home/user/bli1/wordcount/wc.jar
This is my process:
HDFS file structure:
/bli1
/wordcount
wc.jar
WordCount.java
/input
file01
/output
file02
- Create on local machine
WordCount.javaandwc.jarwithjar cf wc.jar WordCount.java - Create on local machine
file01andfile02 - Create
/inputand/outputdirectory within/wordcountin hdfs Move files to their directories with hdfs
hdfs dfs -moveFromLocal <localsrc> <dst>
run command:
hadoop jar /user/bli1/wordcount/wc.jar WordCount /user/bli1/wordcount/input /user/bli1/wordcount/output
OUTPUT:
Not a valid JAR: /user/bli1/wordcount/wc.jar
I tried this to make the JAR but I would get an error.
$ hadoop com.sun.tools.javac.Main WordCount.java
Error: Could not find or load main class com.sun.tools.javac.Main
If this process to make the JAR is different than jar cf wc.jar WordCount.java then this might be causing the problem. However I don't know why I am getting the find or load main class error