use of com.alibaba.maxgraph.proto.groot.StoreDataBatchPb in project GraphScope by alibaba.
the class StoreWriteService method writeStore.
@Override
public void writeStore(WriteStoreRequest request, StreamObserver<WriteStoreResponse> responseObserver) {
List<StoreDataBatchPb> dataBatchesList = request.getDataBatchesList();
List<StoreDataBatch> batches = new ArrayList<>(dataBatchesList.size());
try {
for (StoreDataBatchPb pb : dataBatchesList) {
batches.add(StoreDataBatch.parseProto(pb));
}
boolean success = writerAgent.writeStore2(batches);
WriteStoreResponse response = WriteStoreResponse.newBuilder().setSuccess(success).build();
responseObserver.onNext(response);
responseObserver.onCompleted();
} catch (Exception e) {
responseObserver.onError(e);
}
}
Aggregations