use of com.baidu.hugegraph.structure.schema.VertexLabel in project incubator-hugegraph-toolchain by apache.
the class RebuildAPI method rebuildIndex.
private long rebuildIndex(SchemaElement element) {
E.checkArgument(element instanceof VertexLabel || element instanceof EdgeLabel || element instanceof IndexLabel, "Only VertexLabel, EdgeLabel and IndexLabel support " + "rebuild, but got '%s'", element);
String path = String.join(PATH_SPLITOR, this.path(), element.type());
RestResult result = this.client.put(path, element.name(), element);
@SuppressWarnings("unchecked") Map<String, Object> task = result.readObject(Map.class);
return TaskAPI.parseTaskId(task);
}
Aggregations