public boolean isApplicableStatus(SchemaStatus status) { if (getFailureStatus().contains(status)) throw new IllegalArgumentException(String.format("Update action [%s] cannot be invoked for index with status [%s]",this,status)); return getApplicableStatus().contains(status); }
protected void validateIndexStatus() { TitanSchemaVertex schemaVertex = mgmt.getSchemaVertex(index); Set<SchemaStatus> acceptableStatuses = SchemaAction.REINDEX.getApplicableStatus(); boolean isValidIndex = true; String invalidIndexHint;
keySubset = Sets.newHashSet(); MixedIndexType cindexType = (MixedIndexType) indexType; Set<SchemaStatus> applicableStatus = updateAction.getApplicableStatus(); for (ParameterIndexField field : cindexType.getFieldKeys()) { if (applicableStatus.contains(field.getStatus()))
public boolean isApplicableStatus(SchemaStatus status) { if (getFailureStatus().contains(status)) throw new IllegalArgumentException(String.format("Update action [%s] cannot be invoked for index with status [%s]",this,status)); return getApplicableStatus().contains(status); }
protected void validateIndexStatus() { TitanSchemaVertex schemaVertex = mgmt.getSchemaVertex(index); Set<SchemaStatus> acceptableStatuses = SchemaAction.REINDEX.getApplicableStatus(); boolean isValidIndex = true; String invalidIndexHint;
if (index instanceof RelationTypeIndex) { dependentTypes = ImmutableSet.of((TitanSchemaVertex)((InternalRelationType)schemaVertex).getBaseType()); Preconditions.checkArgument(updateAction.getApplicableStatus().contains(schemaVertex.getStatus()), "Update action [%s] does not apply for index with status [%s]",updateAction,schemaVertex.getStatus()); } else if (index instanceof TitanGraphIndex) { dependentTypes = Sets.newHashSet(); if (indexType.isCompositeIndex()) { Preconditions.checkArgument(updateAction.getApplicableStatus().contains(schemaVertex.getStatus()), "Update action [%s] does not apply for index with status [%s]",updateAction,schemaVertex.getStatus()); for (PropertyKey key : ((TitanGraphIndex)index).getFieldKeys()) { keySubset = Sets.newHashSet(); MixedIndexType cindexType = (MixedIndexType)indexType; Set<SchemaStatus> applicableStatus = updateAction.getApplicableStatus(); for (ParameterIndexField field : cindexType.getFieldKeys()) { if (applicableStatus.contains(field.getStatus())) keySubset.add((PropertyKeyVertex)field.getFieldKey());
keySubset = Sets.newHashSet(); MixedIndexType cindexType = (MixedIndexType) indexType; Set<SchemaStatus> applicableStatus = updateAction.getApplicableStatus(); for (ParameterIndexField field : cindexType.getFieldKeys()) { if (applicableStatus.contains(field.getStatus()))