public SortedMap<File, List<IndexEntry>> getAllEntriesFromIndex(File[] segmentFiles)
      throws InterruptedException, IOException, StoreException {
    SortedMap<File, List<IndexEntry>> fileToIndexEntries = new TreeMap<>(PersistentIndex.INDEX_SEGMENT_FILE_COMPARATOR);
    for (File segmentFile : segmentFiles) {
      List<IndexEntry> entries = getAllEntriesFromIndexSegment(segmentFile);
      fileToIndexEntries.put(segmentFile, entries);
      if (throttler != null) {
        throttler.maybeThrottle(entries.size());
      }
    }
    return fileToIndexEntries;
  }
Returns {@link IndexProcessingResults} for each replicaDir in {@code replicaDirs}
@param replicaDirs the directories to examine
@param filterSet the filter set of keys to examine. Can be {@code null}
@param parallelism the desired parallelism. The minimum of this and the size of {@code replicaDirs} is the actual
                   chosen parallelism.
@param detectDuplicatesAcrossKeys if {@code true}, uses the {@link StoreKeyConverter} to detect duplicates across
                                  keys. If set to {@code true}, parallelism has to be 1.
@return @link IndexProcessingResults} for each replicaDir in {@code replicaDirs}
ambry-tools/src/main/java/com/github/ambry/store/DumpIndexTool.java