satishd commented on a change in pull request #11058:
URL: https://github.com/apache/kafka/pull/11058#discussion_r714975590
##########
File path:
storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/serialization/RemoteLogMetadataSerde.java
##########
@@ -39,6 +41,7 @@
private static final short REMOTE_LOG_SEGMENT_METADATA_API_KEY = new
RemoteLogSegmentMetadataRecord().apiKey();
private static final short REMOTE_LOG_SEGMENT_METADATA_UPDATE_API_KEY =
new RemoteLogSegmentMetadataUpdateRecord().apiKey();
private static final short REMOTE_PARTITION_DELETE_API_KEY = new
RemotePartitionDeleteMetadataRecord().apiKey();
+ private static final short REMOTE_LOG_SEGMENT_METADATA_SNAPSHOT_API_KEY =
new RemoteLogSegmentMetadataSnapshotRecord().apiKey();
Review comment:
There are two ways to implement it.
- Have a separate BytesApiMessageSerde for this message only and write the
supporting classes which will be similar to RemoteLogMetadataSerde and
RemoteLogSegmentMetadataSnapshotTransform.
- This is one more ApiMessage about representing remote log metadata. Add to
the existing RemoteLogMetadatSerde which has the framework to add one more api
message.
I choose the latter for simplicity. We can update the javadoc to describe
that RemoteLogMetadatSerde includes serde for all the APIMessage defined for
remote log metadata including RemoteLogSegmentMetadataSnapshot. It can be used
as serde for the topic as it supports all the messages stored in the remote log
metadata topic.
--
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]