Nivetha,

Did you create the jar manually ? Seems that Map is an inner class in *WordCount* Class. Did you add *WordCount$Map.class* to the jar along with *WordCount.class* ?

--
Suraj Nayak

On Saturday 05 July 2014 10:35 AM, Darpan R wrote:
Looks like Classpath problem :java.lang.RuntimeException:
java.lang.ClassNotFoundException:
Class
WordCount$Map not found

Can you make sure your jar is in the class path ?


On 4 July 2014 11:19, Nivetha K <nivethak3...@gmail.com> wrote:

Hi,

      I am currently working with Pig. I get struck with following script.
A = load 'sample.txt';
B = MAPREDUCE '/home/training/simp.jar' Store A into 'inputDir' Load
'outputDir' as (word:chararray, count: int) `WordCount inputDir outputDir`;
dump B;


Error :

2014-07-04 11:17:57,811 [main] WARN  org.apache.hadoop.mapred.JobClient -
No job jar file set.  User classes may not be found. See JobConf(Class) or
JobConf#setJar(String).
2014-07-04 11:18:16,313 [main] INFO  org.apache.hadoop.mapred.JobClient -
Task Id : attempt_201407011531_0147_m_000000_2, Status : FAILED
java.lang.RuntimeException: java.lang.ClassNotFoundException: Class
WordCount$Map not found
         at
org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1774)
         at

org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContextImpl.java:191)
         at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:631)
         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:330)
         at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at

org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1438)
         at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.ClassNotFoundException: Class WordCount$Map not found
         at

org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1680)
         at
org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1772)



please help me to solve the problem


regards,

Nivetha.


Reply via email to