use of com.alibaba.graphscope.groot.schema.request.DdlRequestBlob in project GraphScope by alibaba.
the class DdlExecutors method executeDdlRequestBatch.
public DdlResult executeDdlRequestBatch(DdlRequestBatch ddlRequestBatch, GraphDef graphDef, int partitionCount) throws InvalidProtocolBufferException {
List<Operation> operations = new ArrayList<>();
GraphDef tmpGraphDef = graphDef;
for (DdlRequestBlob ddlRequestBlob : ddlRequestBatch) {
OperationType operationType = ddlRequestBlob.getOperationType();
ByteString ddlBlob = ddlRequestBlob.getBytes();
DdlResult ddlResult = getExecutor(operationType).execute(ddlBlob, tmpGraphDef, partitionCount);
operations.addAll(ddlResult.getDdlOperations());
tmpGraphDef = ddlResult.getGraphDef();
}
return new DdlResult(tmpGraphDef, operations);
}
Aggregations