调试了一上午, 蛋疼, 写代码不认真 ,记录下
public void readFields(DataInput in) throws IOException { // TODO Auto-generated method stub //this.page = in.readUTF(); //this.count = in.readInt(); this.page= in.readUTF(); this.count = in.readInt(); } public void write(DataOutput out) throws IOException { // TODO Auto-generated method stub //out.writeUTF(this.page); //out.write(this.count); out.writeUTF(this.page); out.writeInt(this.count); }
数据序列化, 一定要格式相同, 检查了半天,
0则评论给“hadoop读取文件java.io.EOFException解决”