return new StdOutReport(10 * 1000 * 1000, 100);
}
@SuppressWarnings("unchecked")
public static void main(String[] args) throws Exception {
final Params params = new Params("data/dir nodes.csv relationships.csv #nodes #max-props-per-node #usual-rels-pernode #max-rels-per-node #max-props-per-rel rel,types",args);
if (params.invalid()) {
System.err.printf("Usage java -jar batchimport.jar %s%n",params);
System.exit(1);
}
File graphDb = params.file("data/dir");
String nodesFile = params.string("nodes.csv");
String relationshipsFile = params.string("relationships.csv");
if (graphDb.exists()) {
FileUtils.deleteRecursively(graphDb);
}
final long nodesToCreate = params.longValue("#nodes");
ParallelImporter importer = new ParallelImporter(graphDb,nodesFile,relationshipsFile,
nodesToCreate, params.intValue("#max-props-per-node"),
params.intValue("#usual-rels-pernode"),
params.intValue("#max-rels-per-node"),
params.intValue("#max-props-per-rel"),
params.string("rel,types").split(","), '\t', false);
importer.init();
long time = System.currentTimeMillis();
try {
importer.run();
} finally {