FieldSerializer customSer = customSerializers[i];
DataOutputBuffer buffer = buffers[i];
buffer.reset();
if (customSer != null){
customSer.open(buffer);
customSer.serialize(obj);
customSer.close(); //TODO is this safe ?
} else {
hadoopSer.ser(obj, buffer);
}
//TODO this byteBuffer instances should be cached and reused