done! just because of the bytebuffer usage. 徐建海 <zero...@bytedance.com> 于2019年2月19日周二 下午7:57写道:
> public class DefaultRecord implements Record { > > // excluding key, value and headers: 5 bytes length + 10 bytes timestamp > + 5 bytes offset + 1 byte attributes > public static final int MAX_RECORD_OVERHEAD = 21; > > private static final int NULL_VARINT_SIZE_BYTES = > ByteUtils.sizeOfVarint(-1); > > private final int sizeInBytes; > private final byte attributes; > private final long offset; > private final long timestamp; > private final int sequence; > private final ByteBuffer key; > private final ByteBuffer value; > private final Header[] headers; > > ...... > > } > > > 徐建海 <zero...@bytedance.com> 于2019年2月19日周二 下午7:56写道: > >> As I found, the private final ByteBuffer value; is not what I passed in >> key/value pair in client, How can I get the the origin Key/Value in kafka >> server? >> >> 徐建海 <zero...@bytedance.com> 于2019年2月19日周二 下午6:51写道: >> >>> Hello: >>> I try to add some feature to Kafka, but I encounter a problem: I >>> need to get the key and value from DefaultRecord, how can I do that? >>> >>