Java.io.IOException : Initialization of all the collectors failed. The last error in the collector is: null

Java.io.IOException : Initialization of all the collectors failed. The last error in the collector is: null … here is a solution to the problem.

Java.io.IOException : Initialization of all the collectors failed. The last error in the collector is: null

I’m new to MapReduce and I’m trying to find a solution to the problem. I’m trying to link two map reduce jobs. The first job is executing, but in the second job I get an error like the following

     INFO mapreduce. Job: Task Id : attempt_1445271708293_0055_m_000000_1, Status : FAILED
Error: java.io.IOException: Initialization of all the collectors failed.              Error in last collector was :null
    at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:414)
    at org.apache.hadoop.mapred.MapTask.access$100(MapTask.java:81)
    at org.apache.hadoop.mapred.MapTask$NewOutputCollector.<init>(MapTask.java:698)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:770)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.NullPointerException
    at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:1011)
    at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:402)
    ... 9 more

Solution

I import Text as in the Driver class

import com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider.Text

Replace

import org.apache.hadoop.io.Text

So I got an error and once I corrected it, it started working fine.

Related Problems and Solutions