zheguang commented on code in PR #21706:
URL: https://github.com/apache/kafka/pull/21706#discussion_r2935206398
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/ValueTimestampHeadersDeserializer.java:
##########
@@ -139,17 +139,4 @@ static Headers headers(final byte[]
rawValueTimestampHeaders) {
final byte[] rawHeaders = readBytes(buffer, headersSize);
return HeadersDeserializer.deserialize(rawHeaders);
}
- /**
- * Extract raw value from serialized ValueTimestampHeaders.
- */
- static byte[] rawValue(final byte[] rawValueTimestampHeaders) {
- if (rawValueTimestampHeaders == null) {
- return null;
- }
-
- final ByteBuffer buffer = ByteBuffer.wrap(rawValueTimestampHeaders);
- final int headersSize = ByteUtils.readVarint(buffer);
- buffer.position(buffer.position() + headersSize + Long.BYTES);
- return readBytes(buffer, buffer.remaining());
- }
Review Comment:
Great pointer. `value()` indeed can just call `rawPlainValue()`. So I just
added this change in this PR.
For the others, let me find out in the context of KAFKA-20303.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]