Owen-CH-Leung commented on code in PR #14057:
URL: https://github.com/apache/kafka/pull/14057#discussion_r1270242568


##########
storage/src/test/java/org/apache/kafka/server/log/remote/storage/LocalTieredStorageTest.java:
##########
@@ -399,20 +403,21 @@ public Verifier(final LocalTieredStorage remoteStorage, 
final TopicIdPartition t
             this.topicIdPartition = requireNonNull(topicIdPartition);
         }
 
-        private List<Path> expectedPaths(final RemoteLogSegmentId id) {
+        private List<Path> expectedPaths(final RemoteLogSegmentMetadata 
metadata) {
             final String rootPath = getStorageRootDirectory();
             TopicPartition tp = topicIdPartition.topicPartition();
             final String topicPartitionSubpath = format("%s-%d-%s", 
tp.topic(), tp.partition(),
                     topicIdPartition.topicId());
-            final String uuid = id.id().toString();
+            final String uuid = metadata.remoteLogSegmentId().id().toString();
+            final long startOffset = metadata.startOffset();
 
             return Arrays.asList(
-                    Paths.get(rootPath, topicPartitionSubpath, uuid + 
LogFileUtils.LOG_FILE_SUFFIX),
-                    Paths.get(rootPath, topicPartitionSubpath, uuid + 
LogFileUtils.INDEX_FILE_SUFFIX),
-                    Paths.get(rootPath, topicPartitionSubpath, uuid + 
LogFileUtils.TIME_INDEX_FILE_SUFFIX),
-                    Paths.get(rootPath, topicPartitionSubpath, uuid + 
LogFileUtils.TXN_INDEX_FILE_SUFFIX),
-                    Paths.get(rootPath, topicPartitionSubpath, uuid + 
LEADER_EPOCH_CHECKPOINT.getSuffix()),
-                    Paths.get(rootPath, topicPartitionSubpath, uuid + 
LogFileUtils.PRODUCER_SNAPSHOT_FILE_SUFFIX)
+                    Paths.get(rootPath, topicPartitionSubpath, startOffset + 
"-" + uuid + LogFileUtils.LOG_FILE_SUFFIX),

Review Comment:
   @divijvaidya I've changed the code to use 
`LogFileUtils#filenamePrefixFromOffset(long offset)`. The filename now should 
look like a real log file implementation like 
`00000000000000000011-oAtiIQ95REujbuzNd_lkLQ.log`



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to