} else { LOGGER.info("All {} key(s) on index {} have status {}", converged.size(), graphIndexName, status); return new GraphIndexStatusReport(true, graphIndexName, status, notConverged, converged, t.elapsed()); LOGGER.info("Timed out ({}) while waiting for index {} to converge on status {}", timeout, graphIndexName, status); return new GraphIndexStatusReport(false, graphIndexName, status, notConverged, converged, t.elapsed());
assertTrue(ManagementSystem.awaitGraphIndexStatus(graph, "theIndex").status(SchemaStatus.REGISTERED) .timeout(TestGraphConfigs.getSchemaConvergenceTime(ChronoUnit.SECONDS), ChronoUnit.SECONDS) .call().getSucceeded()); finishSchema(); mgmt.updateIndex(mgmt.getGraphIndex("theIndex"), SchemaAction.ENABLE_INDEX);
.status(SchemaStatus.REGISTERED).call().getSucceeded()); .status(SchemaStatus.ENABLED).call().getSucceeded());
@Test public void testRemoveGraphIndex() throws InterruptedException, BackendException, ExecutionException { tx.commit(); mgmt.commit(); // Load the "Graph of the Gods" sample data GraphOfTheGodsFactory.loadWithoutMixedIndex(graph, true); // Disable the "name" composite index TitanManagement m = graph.openManagement(); TitanGraphIndex nameIndex = m.getGraphIndex("name"); m.updateIndex(nameIndex, SchemaAction.DISABLE_INDEX); m.commit(); graph.tx().commit(); // Block until the SchemaStatus transitions to DISABLED assertTrue(ManagementSystem.awaitGraphIndexStatus(graph, "name") .status(SchemaStatus.DISABLED).call().getSucceeded()); // Remove index MapReduceIndexManagement mri = new MapReduceIndexManagement(graph); m = graph.openManagement(); TitanGraphIndex index = m.getGraphIndex("name"); ScanMetrics metrics = mri.updateIndex(index, SchemaAction.REMOVE_INDEX).get(); assertEquals(12, metrics.getCustom(IndexRemoveJob.DELETED_RECORDS_COUNT)); }
} else { LOGGER.info("All {} key(s) on index {} have status {}", converged.size(), graphIndexName, status); return new GraphIndexStatusReport(true, graphIndexName, status, notConverged, converged, t.elapsed()); LOGGER.info("Timed out ({}) while waiting for index {} to converge on status {}", timeout, graphIndexName, status); return new GraphIndexStatusReport(false, graphIndexName, status, notConverged, converged, t.elapsed());