**Unable to initialize any output collecto**r
问题所在
错误提示很简单
原因是之前包装对象实现的是Writable和Comparable两个接口
导致出现Unable to initialize any output collector
后来修改为一个实现类 WritableComparable 问题解决
—-`
package cn.edu360.mr.sort;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;
//封装url 总次数count
public class PageCount implements **WritableComparabl**e{
private String url;
private int count;
public PageCount() {
super();
// TODO Auto-generated constructor stub
}
public PageCount(String url, int count) {
this.url = url;
this.count = count;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public int getCount() {
return count