public static Map<String, String> createTopicConfigForRemoteStorage(boolean enableRemoteStorage,
            int maxRecordBatchPerSegment) {
        Map<String, String> topicProps = new HashMap<>();
        // Enables remote log storage for this topic.
        topicProps.put(TopicConfig.REMOTE_LOG_STORAGE_ENABLE_CONFIG, String.valueOf(enableRemoteStorage));
        // Ensure offset and time indexes are generated for every record.
        topicProps.put(TopicConfig.INDEX_INTERVAL_BYTES_CONFIG, "1");
        // Leverage the use of the segment index size to create a log-segment accepting one and only one record.
        // The minimum size of the indexes is that of an entry, which is 8 for the offset index and 12 for the
        // time index. Hence, since the topic is configured to generate index entries for every record with, for
        // a "small" number of records (i.e. such that the average record size times the number of records is
        // much less than the segment size), the number of records which hold in a segment is the multiple of 12
        // defined below.
        topicProps.put(TopicConfig.SEGMENT_INDEX_BYTES_CONFIG, String.valueOf(12 * maxRecordBatchPerSegment));
        // To verify records physically absent from Kafka's storage can be consumed via the second tier storage, we
        // want to delete log segments as soon as possible. When tiered storage is active, an inactive log
        // segment is not eligible for deletion until it has been offloaded, which guarantees all segments
        // should be offloaded before deletion, and their consumption is possible thereafter.
        topicProps.put(TopicConfig.LOCAL_LOG_RETENTION_BYTES_CONFIG, "1");
        return topicProps;
    }
Get the records found in the local tiered storage.
Snapshot does not sort the filesets by base offset.
@param context The test context.
@param topicPartition The topic-partition of the records.
@return The records found in the local tiered storage.
storage/src/test/java/org/apache/kafka/tiered/storage/utils/TieredStorageTestUtils.java