static Iterator sort()

in src/main/java/com/spotify/sparkey/SortHelper.java [47:59]


  static Iterator<SortHelper.Entry> sort(final File logFile, final long start, final long end,
                                         final HashType hashData, final long hashCapacity, final int hashSeed,
                                         final long maxMemory) throws IOException {
    SortConfig config = new SortConfig();
    if (maxMemory > 0) {
      config = config.withMaxMemoryUsage(maxMemory);
    }
    final EntryDataReaderFactory readerFactory = new EntryDataReaderFactory(hashCapacity);
    Sorter<SortHelper.Entry>
        sorter = new Sorter<>(config, readerFactory, ENTRY_DATA_WRITER_FACTORY, ENTRY_COMPARATOR);

    return sorter.sort(new LogFileEntryReader(logFile, start, end, hashData, hashCapacity, hashSeed));
  }