use of com.tencent.angel.ps.server.data.request.RequestHeader in project angel by Tencent.
the class UserRequestAdapter method sendUpdateUDFRequest.
private void sendUpdateUDFRequest(MatrixTransportClient matrixClient, int userRequestId, int matrixId, int partId, UpdateFunc updateFunc, PartitionUpdateParam partParam) {
// Request header
RequestHeader header = createRequestHeader(userRequestId, TransportMethod.UPDATE_PSF, matrixId, partId);
// Request body
UpdateUDFRequest requestData = new UpdateUDFRequest(updateFunc.getClass().getName(), partParam);
// Request
Request request = new Request(header, requestData);
// Send the request
matrixClient.sendUpdateRequest(request);
}
use of com.tencent.angel.ps.server.data.request.RequestHeader in project angel by Tencent.
the class UserRequestAdapter method sendIndexGetRowRequest.
private void sendIndexGetRowRequest(MatrixTransportClient matrixClient, int userRequestId, int matrixId, int rowId, int partId, KeyPart keyPart, InitFunc func) {
// Request header
RequestHeader header = createRequestHeader(userRequestId, TransportMethod.INDEX_GET_ROW, matrixId, partId);
// Request body
IndexPartGetRowRequest requestData = new IndexPartGetRowRequest(rowId, keyPart, func);
// Request
Request request = new Request(header, requestData);
// Send the request
matrixClient.sendGetRequest(request);
}
use of com.tencent.angel.ps.server.data.request.RequestHeader in project angel by Tencent.
the class MatrixTransportClient method createRequestHeader.
private RequestHeader createRequestHeader(int requestId, TransportMethod method, int matrixId, int partId) {
RequestHeader header = new RequestHeader();
header.setUserRequestId(requestId);
header.setMethodId(method.getMethodId());
header.setMethodId(matrixId);
header.setPartId(partId);
return header;
}
Aggregations