Package org.neo4j.unsafe.batchinsert

Examples of org.neo4j.unsafe.batchinsert.BatchInserter.shutdown()


    // START SNIPPET: importOsm
    OSMImporter importer = new OSMImporter("map.osm");
    importer.setCharset(Charset.forName("UTF-8"));
    BatchInserter batchInserter = BatchInserters.inserter(databasePath);
    importer.importFile(batchInserter, "map.osm", false);
    batchInserter.shutdown();

    GraphDatabaseService db = new GraphDatabaseFactory().newEmbeddedDatabase(databasePath);
    importer.reIndex(db);
    db.shutdown();
    // END SNIPPET: importOsm
View Full Code Here


    importer.setCharset(Charset.forName("UTF-8"));
        BatchInserter batchInserter = BatchInserters.inserter(dbPath, Neo4jTestCase.LARGE_CONFIG);
        //GraphDatabaseService graphDb = batchInserter.getGraphDbService();
    //importer.importFile(graphDb, osmPath, false, 10000, true);
    importer.importFile(batchInserter, osmPath, false);
    batchInserter.shutdown();
    //graphDb.shutdown();
    // Weird hack to force GC on large loads
    long start = System.currentTimeMillis();
    if (System.currentTimeMillis() - start > 300000) {
      for (int i = 0; i < 3; i++) {
View Full Code Here

                }
            }

            // Shutdown Batch inserter
            indexProvider.shutdown();
            inserter.shutdown();

            // Restore Graph Database service
            factory.setConnection((GraphDatabaseService) factory.createPoolOrConnection());

            return pkToNodeIdMap.size();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.