use of org.neo4j.internal.batchimport.input.EstimationSanityChecker in project neo4j by neo4j.
the class ImportLogic method initialize.
public void initialize(Input input) throws IOException {
log.info("Import starting");
startTime = currentTimeMillis();
this.input = input;
PageCacheArrayFactoryMonitor numberArrayFactoryMonitor = new PageCacheArrayFactoryMonitor();
numberArrayFactory = auto(neoStore.getPageCache(), pageCacheTracer, databaseDirectory, config.allowCacheAllocationOnHeap(), numberArrayFactoryMonitor, log, databaseName);
// Some temporary caches and indexes in the import
idMapper = instantiateIdMapper(input);
nodeRelationshipCache = new NodeRelationshipCache(numberArrayFactory, dbConfig.get(GraphDatabaseSettings.dense_node_threshold), memoryTracker);
Input.Estimates inputEstimates = input.calculateEstimates(neoStore.getPropertyStore().newValueEncodedSizeCalculator());
// Sanity checking against estimates
new EstimationSanityChecker(recordFormats, monitor).sanityCheck(inputEstimates);
new HeapSizeSanityChecker(monitor).sanityCheck(inputEstimates, recordFormats, neoStore, NodeRelationshipCache.memoryEstimation(inputEstimates.numberOfNodes()), idMapper.memoryEstimation(inputEstimates.numberOfNodes()));
dependencies.satisfyDependencies(inputEstimates, idMapper, neoStore, nodeRelationshipCache, numberArrayFactoryMonitor);
if (neoStore.determineDoubleRelationshipRecordUnits(inputEstimates)) {
monitor.doubleRelationshipRecordUnitsEnabled();
}
executionMonitor.initialize(dependencies);
}
Aggregations