hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 이연희<ssal...@naver.com>
Subject BytesWritable modification
Date Mon, 22 Mar 2010 04:58:10 GMT
I recently modified Hadoop’s BytesWritable.
The reason is that
I developed BinaryInputOutputFormat. It has the LongWritable file offset as key and BytesWritable
record as value.
I parsed BytesWritable record in Map function using method, value.getBytes(). And then in
the reduce phase I tried to sum that value up.
But sum count boundary is to small (that size is as long as byte array length).
So I overload the ByteWritable’s set method. The argument is set(byte array, byte array
offset, int length).
I modifiey the method is set(byte array, byteswritable’s start offset, byte array offset,
int length).
But I wondered BytesWritable’s setCapacity() method.
Why in the method, set the capacity longer than 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message