use of it.unimi.dsi.fastutil.ints.Int2IntAVLTreeMap in project conquery by bakdata.
the class Preprocessed method write.
public void write(File file) throws IOException {
Int2IntMap entityStart = new Int2IntAVLTreeMap();
Int2IntMap entityLength = new Int2IntAVLTreeMap();
calculateEntitySpans(entityStart, entityLength);
final IntSummaryStatistics statistics = entityLength.values().intStream().summaryStatistics();
log.info("Statistics = {}", statistics);
Map<String, ColumnStore> columnStores = combineStores(entityStart);
Dictionary primaryDictionary = encodePrimaryDictionary();
Map<String, Dictionary> dicts = collectDictionaries(columnStores);
log.debug("Writing Headers");
int hash = descriptor.calculateValidityHash(job.getCsvDirectory(), job.getTag());
PreprocessedHeader header = new PreprocessedHeader(descriptor.getName(), descriptor.getTable(), rows, columns, hash);
final PreprocessedDictionaries dictionaries = new PreprocessedDictionaries(primaryDictionary, dicts);
final PreprocessedData data = new PreprocessedData(entityStart, entityLength, columnStores);
writePreprocessed(file, header, dictionaries, data);
}
Aggregations