satishd commented on a change in pull request #10271: URL: https://github.com/apache/kafka/pull/10271#discussion_r615204809
########## 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: Sure, I can reuse `ApiMessageAndVersion`. +1 to have these in a common module. I prefer having them in a new module called `server-common`(or with better name) instead of putting it in clients module. We can slowly move server-common related code from clients module. I will raise a separate PR for this. -- 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