Search in sources :

Example 1 with UpdateResponse

use of com.tencent.angel.ps.server.data.response.UpdateResponse 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();
}
Also used : UpdateResponse(com.tencent.angel.ps.server.data.response.UpdateResponse) UpdateRequest(com.tencent.angel.ps.server.data.request.UpdateRequest) ByteBuf(io.netty.buffer.ByteBuf) ServerPartition(com.tencent.angel.ps.storage.partition.ServerPartition)

Example 2 with UpdateResponse

use of com.tencent.angel.ps.server.data.response.UpdateResponse in project angel by Tencent.

the class UpdateHandler method parseResponse.

@Override
public ResponseData parseResponse(ByteBuf in) {
    // Just
    UpdateResponse response = new UpdateResponse();
    response.deserialize(in);
    return response;
}
Also used : UpdateResponse(com.tencent.angel.ps.server.data.response.UpdateResponse)

Aggregations

UpdateResponse (com.tencent.angel.ps.server.data.response.UpdateResponse)2 UpdateRequest (com.tencent.angel.ps.server.data.request.UpdateRequest)1 ServerPartition (com.tencent.angel.ps.storage.partition.ServerPartition)1 ByteBuf (io.netty.buffer.ByteBuf)1