assertTrue(ManagementSystem.awaitGraphIndexStatus(graph, "theIndex").status(SchemaStatus.REGISTERED) .timeout(TestGraphConfigs.getSchemaConvergenceTime(ChronoUnit.SECONDS), ChronoUnit.SECONDS) .call().getSucceeded());
assertTrue(ManagementSystem.awaitGraphIndexStatus(graph, "verticesByAge") .status(SchemaStatus.REGISTERED).call().getSucceeded()); assertTrue(ManagementSystem.awaitGraphIndexStatus(graph, "verticesByAge") .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)); }
mgmt.commit(); ManagementSystem.awaitGraphIndexStatus(graph, "theIndex").timeout(10L, ChronoUnit.SECONDS).call();
for (String indexName : indexNames) { try { GraphIndexStatusReport indexStatus = ManagementSystem.awaitGraphIndexStatus(getTitanGraph(), indexName).status(SchemaStatus.REGISTERED).call(); logger.log(Level.INFO, "status for {0} {1}", new Object[]{indexName, indexStatus}); manager = (ManagementSystem) getTitanGraph().openManagement();
ManagementSystem.awaitGraphIndexStatus(graph, "theIndex", SchemaStatus.REGISTERED, TestGraphConfigs.getSchemaConvergenceTime(TimeUnit.SECONDS), TimeUnit.SECONDS); finishSchema();