测试单词统计时,运行yarn jar XX.jar 出现如下报错:

Caused by: java.io.IOException: Initialization of all the collectors failed. Error in last collector was :class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text

 

原因是在java类中Text引用的是import com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider.Text;

   修改为import org.apache.hadoop.io.Text;

  测试运行通过