use of com.tencent.angel.ps.server.data.request.GetRowsSplitRequest in project angel by Tencent.
the class GetRowsHandler method parseRequest.
@Override
public RequestData parseRequest(ByteBuf in) {
GetRowsSplitRequest request = new GetRowsSplitRequest();
request.deserialize(in);
return request;
}
use of com.tencent.angel.ps.server.data.request.GetRowsSplitRequest in project angel by Tencent.
the class UserRequestAdapter method sendGetRowsRequest.
private void sendGetRowsRequest(MatrixTransportClient matrixClient, int userRequestId, int matrixId, int[] rowIds, int partId) {
// Request header
RequestHeader header = createRequestHeader(userRequestId, TransportMethod.GET_ROWSSPLIT, matrixId, partId);
// Request body
GetRowsSplitRequest requestData = new GetRowsSplitRequest(rowIds);
// Request
Request request = new Request(header, requestData);
// Send the request
matrixClient.sendGetRequest(request);
}
use of com.tencent.angel.ps.server.data.request.GetRowsSplitRequest in project angel by Tencent.
the class GetRowsHandler method handle.
@Override
public ResponseData handle(RequestHeader header, RequestData data) throws Exception {
GetRowsSplitRequest request = (GetRowsSplitRequest) data;
int[] rowIds = request.getRowIds();
ServerRow[] rows = new ServerRow[rowIds.length];
for (int i = 0; i < rowIds.length; i++) {
rows[i] = MatrixUtils.getRow(context.getMatrixStorageManager(), header.matrixId, header.partId, rowIds[i]);
}
return new GetRowsSplitResponse(rows);
}
Aggregations