use of com.tencent.angel.ps.server.data.request.UpdateRequest in project angel by Tencent.
the class BasicStreamUpdateHandler method handle.
@Override
public ResponseData handle(RequestHeader header, RequestData data) throws Exception {
UpdateRequest request = (UpdateRequest) data;
ServerPartition part = MatrixUtils.getPart(context.getMatrixStorageManager(), header.matrixId, header.partId);
ByteBuf in = request.getInputBuffer();
// Filter comp key value
ByteBufSerdeUtils.deserializeBoolean(in);
part.update(in, request.getOp());
return new UpdateResponse();
}
use of com.tencent.angel.ps.server.data.request.UpdateRequest in project angel by Tencent.
the class BasicStreamUpdateHandler method parseRequest.
@Override
public RequestData parseRequest(ByteBuf in) {
UpdateRequest request = new UpdateRequest();
request.deserializeHeader(in);
return request;
}
use of com.tencent.angel.ps.server.data.request.UpdateRequest in project angel by Tencent.
the class UserRequestAdapter method sendUpdateRequest.
private void sendUpdateRequest(MatrixTransportClient matrixClient, int userRequestId, int matrixId, int partId, CompStreamKeyValuePart split, UpdateOp op) {
// Request header
RequestHeader header = createRequestHeader(userRequestId, TransportMethod.UPDATE, matrixId, partId);
// Request body
UpdateRequest requestData = new UpdateRequest(split, op);
// Request
Request request = new Request(header, requestData);
// Send the request
matrixClient.sendUpdateRequest(request);
}
Aggregations