private String getIndexType(JanusGraphIndex index) { String type; if (index.isCompositeIndex()) { type = "Composite"; } else if (index.isMixedIndex()) { type = "Mixed"; } else { type = "Unknown"; } return type; }
@Override protected void validateIndexStatus() { if(!(index instanceof RelationTypeIndex || index instanceof JanusGraphIndex)) { throw new UnsupportedOperationException("Unsupported index found: "+index); } if (index instanceof JanusGraphIndex) { JanusGraphIndex graphIndex = (JanusGraphIndex)index; if (graphIndex.isMixedIndex()) throw new UnsupportedOperationException("Cannot remove mixed indexes through JanusGraph. This can " + "only be accomplished in the indexing system directly."); CompositeIndexType indexType = (CompositeIndexType) managementSystem.getSchemaVertex(index).asIndexType(); graphIndexId = indexType.getID(); } //Must be a relation type index or a composite graph index JanusGraphSchemaVertex schemaVertex = managementSystem.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 JanusGraphIndex,"Unexpected index: %s",index); JanusGraphIndex graphIndex = (JanusGraphIndex)index; Preconditions.checkArgument(graphIndex.isMixedIndex()); Map<String, SchemaStatus> invalidKeyStatuses = new HashMap<>(); int acceptableFields = 0;
} else { JanusGraphIndex graphIndex = (JanusGraphIndex) index; if (graphIndex.isMixedIndex()) throw new UnsupportedOperationException("External mixed indexes must be removed in the indexing system directly."); builder = graph.getBackend().buildGraphIndexScanJob();
@Override public boolean isMixedIndex() { return wrapped.isMixedIndex(); }
} else { JanusGraphIndex graphIndex = (JanusGraphIndex)index; if (graphIndex.isMixedIndex() && !updateAction.equals(SchemaAction.REINDEX)) throw new UnsupportedOperationException("External mixed indexes must be removed in the indexing system directly.");
} else { JanusGraphIndex graphIndex = (JanusGraphIndex)index; if (graphIndex.isMixedIndex() && !updateAction.equals(SchemaAction.REINDEX)) throw new UnsupportedOperationException("External mixed indexes must be removed in the indexing system directly.");