mimaison commented on code in PR #18460: URL: https://github.com/apache/kafka/pull/18460#discussion_r1909338806
########## storage/src/main/java/org/apache/kafka/storage/internals/log/AsyncOffsetReader.java: ########## @@ -0,0 +1,34 @@ +/* + * 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.storage.internals.log; + +import org.apache.kafka.common.TopicPartition; +import org.apache.kafka.common.record.FileRecords; +import org.apache.kafka.storage.internals.epoch.LeaderEpochFileCache; + +import java.util.Optional; +import java.util.function.Supplier; + +public interface AsyncOffsetReader { + + AsyncOffsetReadFutureHolder<OffsetResultHolder.FileRecordsOrError> asyncOffsetRead( Review Comment: Ultimately the goal is to also move `RemoteLogManager` to the storage module, so in theory we could remove it once that is done. `RemoteLogManager` still depends on a bunch of core classes (I think we'll need to introduce a few interfaces to decouple it from `ReplicaManager`/`Partition` too) so it not quite ready to move yet, hopefully in the next few months. I've got to admit I've not really thought a lot about it yet, but it may make sense to keep the interface to have a boundary between `UnifiedLog` and `RemoteLogManager` as even if they are both in `storage`, they'll be in different packages. -- 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]
