Search in sources :

Example 1 with SubmitBatchDdlResponse

use of com.alibaba.maxgraph.proto.groot.SubmitBatchDdlResponse in project GraphScope by alibaba.

the class SchemaClient method submitBatchDdl.

public long submitBatchDdl(String requestId, String sessionId, DdlRequestBatchPb ddlRequestBatchPb) {
    SubmitBatchDdlRequest request = SubmitBatchDdlRequest.newBuilder().setRequestId(requestId).setSessionId(sessionId).setDdlRequests(ddlRequestBatchPb).build();
    SubmitBatchDdlResponse submitBatchDdlResponse = stub.submitBatchDdl(request);
    if (submitBatchDdlResponse.getSuccess()) {
        long ddlSnapshotId = submitBatchDdlResponse.getDdlSnapshotId();
        return ddlSnapshotId;
    } else {
        throw new DdlException(submitBatchDdlResponse.getMsg());
    }
}
Also used : DdlException(com.alibaba.graphscope.groot.schema.request.DdlException) SubmitBatchDdlRequest(com.alibaba.maxgraph.proto.groot.SubmitBatchDdlRequest) SubmitBatchDdlResponse(com.alibaba.maxgraph.proto.groot.SubmitBatchDdlResponse)

Aggregations

DdlException (com.alibaba.graphscope.groot.schema.request.DdlException)1 SubmitBatchDdlRequest (com.alibaba.maxgraph.proto.groot.SubmitBatchDdlRequest)1 SubmitBatchDdlResponse (com.alibaba.maxgraph.proto.groot.SubmitBatchDdlResponse)1