Avro may not be respecting ByteBuffer.limit
Brought to you by:
mcschatz
In BuildGraphAvro and other places, we use ByteBuffer.wrap to wrap a byte array representing sequences. This byte buffer might be larger than the minimum number of bytes needed to encode the sequence; i.e the bytebuffer's capacity may be larger than its limit. We should double check that when avro serializes the data it uses the minimum number of bytes (i.e limit) and not capacity.