use of com.tencent.angel.ps.server.data.response.GetRowSplitResponse in project angel by Tencent.
the class GetRowHandler method handle.
@Override
public ResponseData handle(RequestHeader header, RequestData data) throws Exception {
GetRowSplitRequest request = (GetRowSplitRequest) data;
ServerRow row = MatrixUtils.getRow(context.getMatrixStorageManager(), header.matrixId, header.partId, request.getRowId());
return new GetRowSplitResponse(row);
}
use of com.tencent.angel.ps.server.data.response.GetRowSplitResponse in project angel by Tencent.
the class GetRowHandler method handle.
@Override
public void handle(FutureResult finalResult, UserRequest userRequest, ResponseCache responseCache) {
GetRowRequest getRowRequest = (GetRowRequest) userRequest;
MapResponseCache cache = (MapResponseCache) responseCache;
// Merge the sub-response
List<ServerRow> serverRows = new ArrayList<>(cache.expectedResponseNum);
for (Response response : cache.getResponses().values()) {
serverRows.add(((GetRowSplitResponse) (response.getData())).getRowSplit());
}
Vector vector = MergeUtils.combineServerRowSplits(serverRows, getRowRequest.getMatrixId(), getRowRequest.getRowId());
// Set matrix/row information
vector.setMatrixId(getRowRequest.getMatrixId());
vector.setRowId(getRowRequest.getRowId());
// Set result
finalResult.set(vector);
}
use of com.tencent.angel.ps.server.data.response.GetRowSplitResponse in project angel by Tencent.
the class GetRowHandler method parseResponse.
@Override
public ResponseData parseResponse(ByteBuf in) {
GetRowSplitResponse response = new GetRowSplitResponse();
response.deserialize(in);
return response;
}
Aggregations