Errors are as follows
Error:java.lang.RuntimeException:java.lang.ClassNotFoundException:Class Com.zhen.mr.runjob$hotmapper not Found at Org.apache.hadoop.conf.Configuration.getClass (Configuration.java:2154) at Org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass (Jobcontextimpl.java:186) at Org.apache.hadoop.mapred.MapTask.runNewMapper (Maptask.java:742) at Org.apache.hadoop.mapred.MapTask.run (Maptask.java:341) at org.apache.hadoop.mapred.yarnchild$2. Run (Yarnchild.java:163) at java.security.AccessController.doPrivileged (Native Method) at Javax.security.auth.Subject.doAs (Subject.jav A:422) at Org.apache.hadoop.security.UserGroupInformation.doAs (Usergroupinformation.java:1692) at Org.apache.hadoop.mapred.YarnChild.main (Yarnchild.java:158) caused By:java.lang.ClassNotFoundException:Class com.zhen.mr.runjob$hotmapper not found at org.apache.hadoop.co Nf. Configuration.getclassbyname (Configuration.java:2060) at Org.apache.hadoop.conf.Configuration.getClass (Configuration.java:2152) ... 8More
There are warning prompts before errors occur, as follows
set. User classes May is not found. See Job or Job#setjar (String).
Hint that the job jar is not set
Workaround:
Set the Job object in the code
Job.setjarbyclass (runjob. Class);
And then pack and run it OK.
Java.lang.ClassNotFoundException:Class com.zhen.mr.runjob$hotmapper not found when Hadoop runs the jar package