public Optional<RemoteLogSegmentMetadata> fetchRemoteLogSegmentMetadata(TopicPartition topicPartition,
                                                                            int epochForOffset,
                                                                            long offset) throws RemoteStorageException {
        Uuid topicId = topicIdByPartitionMap.get(topicPartition);

        if (topicId == null) {
            throw new KafkaException("No topic id registered for topic partition: " + topicPartition);
        }
        return remoteLogMetadataManager.remoteLogSegmentMetadata(new TopicIdPartition(topicId, topicPartition), epochForOffset, offset);
    }
Stop the remote-log-manager task for the given partitions. And, calls the
{@link RemoteLogMetadataManager#onStopPartitions(Set)} when {@link StopPartition#deleteLocalLog()} is true.
Deletes the partitions from the remote storage when {@link StopPartition#deleteRemoteLog()} is true.

@param stopPartitions topic partitions that needs to be stopped.
@param errorHandler   callback to handle any errors while stopping the partitions.
core/src/main/java/kafka/log/remote/RemoteLogManager.java