hadoop读取文件java.io.EOFException解决

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


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


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

原文链接: hadoop读取文件java.io.EOFException解决 版权所有,转载时请注明出处,违者必究。
注明出处格式:流沙团 ( http://gyarmy.com/post-531.html )

发表评论

0则评论给“hadoop读取文件java.io.EOFException解决”