use of com.alibaba.graphscope.groot.operation.OperationBatch in project GraphScope by alibaba.
the class IngestorWriteService method writeIngestor.
@Override
public void writeIngestor(WriteIngestorRequest request, StreamObserver<WriteIngestorResponse> responseObserver) {
try {
int queueId = request.getQueueId();
String requestId = request.getRequestId();
OperationBatch operationBatch = OperationBatch.parseProto(request.getOperationBatch());
this.ingestService.ingestBatch(requestId, queueId, operationBatch, new IngestCallback() {
@Override
public void onSuccess(long snapshotId) {
WriteIngestorResponse response = WriteIngestorResponse.newBuilder().setSnapshotId(snapshotId).build();
responseObserver.onNext(response);
responseObserver.onCompleted();
}
@Override
public void onFailure(Exception e) {
responseObserver.onError(e);
}
});
} catch (Exception e) {
responseObserver.onError(e);
}
}
Aggregations