Affects Version/s: 2.4.0
Fix Version/s: None
Found this debugging Nutch.
MapTask serializes keys and values to the same stream, in pairs:
bb.write(b0, 0, 0);
AvroSerializer does not flush its buffer after each serialization. So if it is used for valSerializer, the values are only partially written or not written at all to the output stream before the record is marked as complete (the last line above).
HADOOP-10699_all.patch. This is a less intrusive fix, as it does not try to flush MapTask stream. Instead, we write serialized values directly to MapTask stream and avoid using a buffer on avro side.