流沙团
hadoop读取文件java.io.EOFException解决
2019-3-13 流沙团


调试了一上午, 蛋疼, 写代码不认真 ,记录下







	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);
}







数据序列化, 一定要格式相同,  检查了半天, 

发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容