satishd commented on a change in pull request #10271:
URL: https://github.com/apache/kafka/pull/10271#discussion_r615369347



##########
File path: 
storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/RemoteLogMetadataContext.java
##########
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.server.log.remote.metadata.storage;
+
+import java.util.Objects;
+
+/**
+ * The context associated with the record in remote log metadata topic. This 
contains api-key, version and the
+ * payload object.
+ * <br>
+ * <p>
+ * For example:
+ * Remote log segment metadata record will have
+ * <pre>
+ * <ul>
+ *     <li>api key as: {@link 
org.apache.kafka.server.log.remote.metadata.storage.generated.RemoteLogSegmentMetadataRecord#apiKey()}*
     </li>
+ *     <li>version as: 0 (or respective version) , and </li>
+ *     <li>payload as: {@link 
org.apache.kafka.server.log.remote.storage.RemoteLogSegmentMetadata}</li>
+ * </ul>
+ * </pre>
+ * <p>
+ *
+ * You can read more details in <a 
href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-405%3A+Kafka+Tiered+Storage#KIP405:KafkaTieredStorage-MessageFormat";>KIP-405</a>
+ */
+public class RemoteLogMetadataContext {

Review comment:
       This is slghtly different from `ApiMessageAndVersion`. This class does 
not have payload as the `Message` but it has `RemoteLogSegmentMetadata` or 
`RemoteLogSegmentMetadataUpdate` or `RemotePartitionDeleteMetadata`. This 
simplifies for producers/consumers of remote log metadata topic as they expect 
to send/receive these POJOs but not the `Message` objects. So, it is simpler 
for producers/consumers to have`Message` to POJO marshalling/unmarshalling in 
ser/des. 




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to