AnsweredAssumed Answered

hadoop wordcount program java exception

Question asked by nikipraha18 on Dec 23, 2015
Latest reply on Jan 3, 2016 by nikipraha18
Implement the Tool interface and execute your application with ToolRunner to remedy this.

    15/12/23 19:07:04 INFO mapred.FileInputFormat: Total input paths to process : 1
    15/12/23 19:07:04 INFO mapreduce.JobSubmitter: number of splits:2
    15/12/23 19:07:04 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1450848935867_0002
    15/12/23 19:07:04 INFO impl.YarnClientImpl: Submitted application application_1450848935867_0002
    15/12/23 19:07:04 INFO mapreduce.Job: The url to track the job: http://niki-B85M-D3H:8088/proxy/application_1450848935867_0002/
    15/12/23 19:07:04 INFO mapreduce.Job: Running job: job_1450848935867_0002
    15/12/23 19:07:09 INFO mapreduce.Job: Job job_1450848935867_0002 running in uber mode : false
    15/12/23 19:07:09 INFO mapreduce.Job:  map 0% reduce 0%
    15/12/23 19:07:13 INFO mapreduce.Job: Task Id : attempt_1450848935867_0002_m_000000_0, Status : FAILED
    Error: java.io.IOException: Initialization of all the collectors failed. Error in last collector was :class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:414)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:442)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
        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.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
    Caused by: java.lang.ClassCastException: class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at java.lang.Class.asSubclass(Class.java:3218)
        at org.apache.hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:887)
        at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:1004)
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:402)
        ... 7 more
    
    15/12/23 19:07:13 INFO mapreduce.Job: Task Id : attempt_1450848935867_0002_m_000001_0, Status : FAILED
    Error: java.io.IOException: Initialization of all the collectors failed. Error in last collector was :class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:414)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:442)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
        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.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
    Caused by: java.lang.ClassCastException: class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at java.lang.Class.asSubclass(Class.java:3218)
        at org.apache.hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:887)
        at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:1004)
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:402)
        ... 7 more
    
    15/12/23 19:07:17 INFO mapreduce.Job: Task Id : attempt_1450848935867_0002_m_000000_1, Status : FAILED
    Error: java.io.IOException: Initialization of all the collectors failed. Error in last collector was :class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:414)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:442)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
        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.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
    Caused by: java.lang.ClassCastException: class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at java.lang.Class.asSubclass(Class.java:3218)
        at org.apache.hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:887)
        at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:1004)
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:402)
        ... 7 more
    
    15/12/23 19:07:18 INFO mapreduce.Job: Task Id : attempt_1450848935867_0002_m_000001_1, Status : FAILED
    Error: java.io.IOException: Initialization of all the collectors failed. Error in last collector was :class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:414)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:442)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
        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.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
    Caused by: java.lang.ClassCastException: class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at java.lang.Class.asSubclass(Class.java:3218)
        at org.apache.hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:887)
        at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:1004)
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:402)
        ... 7 more
    
    15/12/23 19:07:22 INFO mapreduce.Job: Task Id : attempt_1450848935867_0002_m_000000_2, Status : FAILED
    Error: java.io.IOException: Initialization of all the collectors failed. Error in last collector was :class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:414)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:442)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
        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.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
    Caused by: java.lang.ClassCastException: class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at java.lang.Class.asSubclass(Class.java:3218)
        at org.apache.hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:887)
        at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:1004)
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:402)
        ... 7 more
    
    15/12/23 19:07:23 INFO mapreduce.Job: Task Id : attempt_1450848935867_0002_m_000001_2, Status : FAILED
    Error: java.io.IOException: Initialization of all the collectors failed. Error in last collector was :class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:414)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:442)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
        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.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
    Caused by: java.lang.ClassCastException: class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
        at java.lang.Class.asSubclass(Class.java:3218)
        at org.apache.hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:887)
        at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:1004)
        at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:402)
        ... 7 more
    
    15/12/23 19:07:27 INFO mapreduce.Job:  map 100% reduce 100%
    15/12/23 19:07:27 INFO mapreduce.Job: Job job_1450848935867_0002 failed with state FAILED due to: Task failed task_1450848935867_0002_m_000000
    Job failed as tasks failed. failedMaps:1 failedReduces:0
    
    15/12/23 19:07:27 INFO mapreduce.Job: Counters: 13
        Job Counters
            Failed map tasks=7
            Killed map tasks=1
            Launched map tasks=8
            Other local map tasks=6
            Data-local map tasks=2
            Total time spent by all maps in occupied slots (ms)=18630
            Total time spent by all reduces in occupied slots (ms)=0
            Total time spent by all map tasks (ms)=18630
            Total vcore-seconds taken by all map tasks=18630
            Total megabyte-seconds taken by all map tasks=19077120
        Map-Reduce Framework
            CPU time spent (ms)=0
            Physical memory (bytes) snapshot=0
            Virtual memory (bytes) snapshot=0
    Exception in thread "main" java.io.IOException: Job failed!
        at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:836)
        at WordCount.run(WordCount.java:35)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
        at WordCount.main(WordCount.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

Outcomes