Search in sources :

Example 1 with IndexGetRowsRequest

use of com.tencent.angel.psagent.matrix.transport.adapter.IndexGetRowsRequest in project angel by Tencent.

the class IndexGetRowsHandler method handle.

@Override
public void handle(FutureResult finalResult, UserRequest userRequest, ResponseCache responseCache) {
    IndexGetRowsRequest indexGetRowsRequest = (IndexGetRowsRequest) userRequest;
    MapResponseCache cache = (MapResponseCache) responseCache;
    ConcurrentHashMap<Request, Response> responses = cache.getResponses();
    // Merge
    Vector[] result = merge(indexGetRowsRequest, responses);
    // Set final result
    finalResult.set(result);
}
Also used : Response(com.tencent.angel.ps.server.data.response.Response) IndexPartGetRowsResponse(com.tencent.angel.ps.server.data.response.IndexPartGetRowsResponse) IndexGetRowsRequest(com.tencent.angel.psagent.matrix.transport.adapter.IndexGetRowsRequest) Request(com.tencent.angel.ps.server.data.request.Request) IndexPartGetRowsRequest(com.tencent.angel.ps.server.data.request.IndexPartGetRowsRequest) IndexGetRowsRequest(com.tencent.angel.psagent.matrix.transport.adapter.IndexGetRowsRequest) UserRequest(com.tencent.angel.psagent.matrix.transport.adapter.UserRequest) Vector(com.tencent.angel.ml.math2.vector.Vector)

Aggregations

Vector (com.tencent.angel.ml.math2.vector.Vector)1 IndexPartGetRowsRequest (com.tencent.angel.ps.server.data.request.IndexPartGetRowsRequest)1 Request (com.tencent.angel.ps.server.data.request.Request)1 IndexPartGetRowsResponse (com.tencent.angel.ps.server.data.response.IndexPartGetRowsResponse)1 Response (com.tencent.angel.ps.server.data.response.Response)1 IndexGetRowsRequest (com.tencent.angel.psagent.matrix.transport.adapter.IndexGetRowsRequest)1 UserRequest (com.tencent.angel.psagent.matrix.transport.adapter.UserRequest)1