use of org.neo4j.internal.batchimport.input.BadCollector in project neo4j by neo4j.
the class CsvImporter method doImport.
@Override
public void doImport() throws IOException {
if (force) {
fileSystem.deleteRecursively(databaseLayout.databaseDirectory());
fileSystem.deleteRecursively(databaseLayout.getTransactionLogsDirectory());
}
try (OutputStream badOutput = fileSystem.openAsOutputStream(reportFile, false);
Collector badCollector = getBadCollector(skipBadEntriesLogging, badOutput)) {
// Extract the default time zone from the database configuration
ZoneId dbTimeZone = databaseConfig.get(GraphDatabaseSettings.db_temporal_timezone);
Supplier<ZoneId> defaultTimeZone = () -> dbTimeZone;
final var nodeData = nodeData();
final var relationshipsData = relationshipData();
CsvInput input = new CsvInput(nodeData, defaultFormatNodeFileHeader(defaultTimeZone, normalizeTypes), relationshipsData, defaultFormatRelationshipFileHeader(defaultTimeZone, normalizeTypes), idType, csvConfig, new CsvInput.PrintingMonitor(stdOut), memoryTracker);
doImport(input, badCollector);
}
}
Aggregations