@Override protected void validateIndexStatus() { if (index instanceof RelationTypeIndex) { //Nothing specific to be done } else if (index instanceof TitanGraphIndex) { TitanGraphIndex gindex = (TitanGraphIndex)index; if (gindex.isMixedIndex()) throw new UnsupportedOperationException("Cannot remove mixed indexes through Titan. This can " + "only be accomplished in the indexing system directly."); CompositeIndexType indexType = (CompositeIndexType)mgmt.getSchemaVertex(index).asIndexType(); graphIndexId = indexType.getID(); } else throw new UnsupportedOperationException("Unsupported index found: "+index); //Must be a relation type index or a composite graph index TitanSchemaVertex schemaVertex = mgmt.getSchemaVertex(index); SchemaStatus actualStatus = schemaVertex.getStatus(); Preconditions.checkArgument(actualStatus==SchemaStatus.DISABLED,"The index [%s] must be disabled before it can be removed",indexName); }
Preconditions.checkArgument(index instanceof TitanGraphIndex,"Unexpected index: %s",index); TitanGraphIndex gindex = (TitanGraphIndex)index; Preconditions.checkArgument(gindex.isMixedIndex()); Map<String, SchemaStatus> invalidKeyStatuses = new HashMap<>(); int acceptableFields = 0;
} else { TitanGraphIndex gindex = (TitanGraphIndex)index; if (gindex.isMixedIndex() && !updateAction.equals(SchemaAction.REINDEX)) throw new UnsupportedOperationException("External mixed indexes must be removed in the indexing system directly.");
} else { TitanGraphIndex gindex = (TitanGraphIndex) index; if (gindex.isMixedIndex()) throw new UnsupportedOperationException("External mixed indexes must be removed in the indexing system directly."); builder = graph.getBackend().buildGraphIndexScanJob();
@Override public boolean isMixedIndex() { return wrappedIndex.isMixedIndex(); }
@Override public boolean isMixedIndex() { return wrapped.isMixedIndex(); }
Preconditions.checkArgument(index instanceof TitanGraphIndex,"Unexpected index: %s",index); TitanGraphIndex gindex = (TitanGraphIndex)index; Preconditions.checkArgument(gindex.isMixedIndex()); Map<String, SchemaStatus> invalidKeyStatuses = new HashMap<>(); int acceptableFields = 0;
@Override protected void validateIndexStatus() { if (index instanceof RelationTypeIndex) { //Nothing specific to be done } else if (index instanceof TitanGraphIndex) { TitanGraphIndex gindex = (TitanGraphIndex)index; if (gindex.isMixedIndex()) throw new UnsupportedOperationException("Cannot remove mixed indexes through Titan. This can " + "only be accomplished in the indexing system directly."); CompositeIndexType indexType = (CompositeIndexType)mgmt.getSchemaVertex(index).asIndexType(); graphIndexId = indexType.getID(); } else throw new UnsupportedOperationException("Unsupported index found: "+index); //Must be a relation type index or a composite graph index TitanSchemaVertex schemaVertex = mgmt.getSchemaVertex(index); SchemaStatus actualStatus = schemaVertex.getStatus(); Preconditions.checkArgument(actualStatus==SchemaStatus.DISABLED,"The index [%s] must be disabled before it can be removed",indexName); }
} else { TitanGraphIndex gindex = (TitanGraphIndex)index; if (gindex.isMixedIndex() && !updateAction.equals(SchemaAction.REINDEX)) throw new UnsupportedOperationException("External mixed indexes must be removed in the indexing system directly.");
} else { TitanGraphIndex gindex = (TitanGraphIndex) index; if (gindex.isMixedIndex()) throw new UnsupportedOperationException("External mixed indexes must be removed in the indexing system directly."); builder = graph.getBackend().buildGraphIndexScanJob();