hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From william kinney <william.kin...@gmail.com>
Subject BytesWriteable, why no set(byte[])?
Date Fri, 03 Jul 2009 01:05:01 GMT
Hi,

Just wondering why there is no set(byte[]) for BytesWriteable, in the
similar fashion of the constructor? And why does the set(byte[], int,
int) do a System.arraycopy()?

My real issue is that in writing my own RecordReader, I am trying to
set the byte[] for a BytesWriteable that is passed in. This works fine
for set(byte[], int, int), but then doing a get() on it later in the
Map phase I get unwanted buffered data that appears to because the
set(byte[], int, int) adds buffered capacity of the magnitude 3/2 *
size.

Thanks for the help,
Will

Mime
View raw message