use of org.neo4j.internal.batchimport.cache.PageCacheArrayFactoryMonitor 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);
}
use of org.neo4j.internal.batchimport.cache.PageCacheArrayFactoryMonitor in project neo4j by neo4j.
the class HumanUnderstandableExecutionMonitor method initialize.
@Override
public void initialize(DependencyResolver dependencyResolver) {
this.dependencyResolver = dependencyResolver;
Input.Estimates estimates = dependencyResolver.resolveDependency(Input.Estimates.class);
BatchingNeoStores neoStores = dependencyResolver.resolveDependency(BatchingNeoStores.class);
IdMapper idMapper = dependencyResolver.resolveDependency(IdMapper.class);
pageCacheArrayFactoryMonitor = dependencyResolver.resolveDependency(PageCacheArrayFactoryMonitor.class);
long biggestCacheMemory = estimatedCacheSize(neoStores, NodeRelationshipCache.memoryEstimation(estimates.numberOfNodes()), idMapper.memoryEstimation(estimates.numberOfNodes()));
System.out.println();
printStageHeader("Import starting", ESTIMATED_NUMBER_OF_NODES, count(estimates.numberOfNodes()), ESTIMATED_NUMBER_OF_NODE_PROPERTIES, count(estimates.numberOfNodeProperties()), ESTIMATED_NUMBER_OF_RELATIONSHIPS, count(estimates.numberOfRelationships()), ESTIMATED_NUMBER_OF_RELATIONSHIP_PROPERTIES, count(estimates.numberOfRelationshipProperties()), ESTIMATED_DISK_SPACE_USAGE, bytesToString(nodesDiskUsage(estimates, neoStores) + relationshipsDiskUsage(estimates, neoStores) + estimates.sizeOfNodeProperties() + estimates.sizeOfRelationshipProperties()), ESTIMATED_REQUIRED_MEMORY_USAGE, bytesToString(biggestCacheMemory));
System.out.println();
}
Aggregations