use of com.baidu.hugegraph.computer.core.store.file.bufferfile.BufferFileSubEntryReader in project hugegraph-computer by hugegraph.
the class BufferFileSorter method mergeInputs.
@Override
public void mergeInputs(List<String> inputs, OuterSortFlusher flusher, List<String> outputs, boolean withSubKv) throws Exception {
Function<String, EntryIterator> fileToInput;
Function<String, KvEntryFileWriter> fileToWriter;
if (withSubKv) {
fileToInput = o -> new BufferFileSubEntryReader(o).iterator();
} else {
fileToInput = o -> new BufferFileEntryReader(o).iterator();
}
fileToWriter = BufferFileEntryBuilder::new;
InputFilesSelector selector = new DisperseEvenlySelector();
List<SelectedFiles> selectResult = selector.selectedByBufferFile(inputs, outputs);
this.sorter.mergeFile(selectResult, fileToInput, fileToWriter, flusher);
}
Aggregations