public void repair(final ODatabaseSession graph, final OCommandOutputListener outputListener, final Map<String, List<String>> options) { message(outputListener, "Repair of graph '" + graph.getURL() + "' is started ...\n"); final long beginTime = System.currentTimeMillis(); final ORepairStats stats = new ORepairStats(); // SCAN AND CLEAN ALL THE EDGES FIRST (IF ANY) repairEdges(graph, stats, outputListener, options, false); // SCAN ALL THE VERTICES repairVertices(graph, stats, outputListener, options, false); message(outputListener, "Repair of graph '" + graph.getURL() + "' completed in " + ((System.currentTimeMillis() - beginTime) / 1000) + " secs\n"); message(outputListener, " scannedEdges.....: " + stats.scannedEdges + "\n"); message(outputListener, " removedEdges.....: " + stats.removedEdges + "\n"); message(outputListener, " scannedVertices..: " + stats.scannedVertices + "\n"); message(outputListener, " scannedLinks.....: " + stats.scannedLinks + "\n"); message(outputListener, " removedLinks.....: " + stats.removedLinks + "\n"); message(outputListener, " repairedVertices.: " + stats.repairedVertices + "\n"); }
public void check(final ODatabaseSession graph, final OCommandOutputListener outputListener, final Map<String, List<String>> options) { message(outputListener, "Check of graph '" + graph.getURL() + "' is started...\n"); final long beginTime = System.currentTimeMillis(); final ORepairStats stats = new ORepairStats(); // SCAN AND CLEAN ALL THE EDGES FIRST (IF ANY) repairEdges(graph, stats, outputListener, options, true); // SCAN ALL THE VERTICES repairVertices(graph, stats, outputListener, options, true); message(outputListener, "Check of graph '" + graph.getURL() + "' completed in " + ((System.currentTimeMillis() - beginTime) / 1000) + " secs\n"); message(outputListener, " scannedEdges.....: " + stats.scannedEdges + "\n"); message(outputListener, " edgesToRemove....: " + stats.removedEdges + "\n"); message(outputListener, " scannedVertices..: " + stats.scannedVertices + "\n"); message(outputListener, " scannedLinks.....: " + stats.scannedLinks + "\n"); message(outputListener, " linksToRemove....: " + stats.removedLinks + "\n"); message(outputListener, " verticesToRepair.: " + stats.repairedVertices + "\n"); }