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 

Reply via email to