SortedMap<Offset, File> getIndexSegmentDetails(LogSegmentName logSegmentName) {
    SortedMap<Offset, File> indexSegmentStartOffsetToFile = new TreeMap<>();
    File[] indexSegmentFiles =
        PersistentIndex.getIndexSegmentFilesForLogSegment(dataDir.getAbsolutePath(), logSegmentName);
    for (File indexSegmentFile : indexSegmentFiles) {
      Offset indexOffset = IndexSegment.getIndexSegmentStartOffset(indexSegmentFile.getName());
      // We don't have to check if the IndexSegment's log segment name is the same as the input log segment name
      // since now getIndexSegmentFilesForLogSegment would match exactly the log segment name we provided so that
      // when given 0_1, 0_10's index segment files will never get matched.
      // But leave this here for sanity check.
      if (indexOffset.getName().equals(logSegmentName)) {
        indexSegmentStartOffsetToFile.put(indexOffset, indexSegmentFile);
      }
    }
    return indexSegmentStartOffsetToFile;
  }
Gets all the index segment files that cover the given {@code logSegmentName}.
@param logSegmentName the name of the log segment whose index segment files are required.
@return a map that contains all the index segment files of the log segment - keyed on the start offset.
ambry-store/src/main/java/com/github/ambry/store/BlobStoreCompactor.java