public List<IndexEntry> getAllEntriesFromIndexSegment(File segmentFile) throws StoreException {
    verifyPath(segmentFile, false);
    IndexSegment segment = new IndexSegment(segmentFile, false, storeKeyFactory, storeConfig, storeMetrics,
        new Journal(segmentFile.getParent(), 0, 0), time);
    List<IndexEntry> entries = new ArrayList<>();
    final Timer.Context context = metrics.findAllEntriesPerIndexTimeMs.time();
    try {
      segment.getIndexEntriesSince(null, new FindEntriesCondition(Long.MAX_VALUE), entries, new AtomicLong(0), false,
          false);
    } finally {
      context.stop();
    }
    return entries;
  }
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