Search in sources :

Example 26 with KeyPart

use of com.tencent.angel.psagent.matrix.transport.router.KeyPart in project angel by Tencent.

the class GetHyperLogLogParam method split.

@Override
public List<PartitionGetParam> split() {
    MatrixMeta matrixMeta = PSAgentContext.get().getMatrixMetaManager().getMatrixMeta(matrixId);
    PartitionKey[] parts = matrixMeta.getPartitionKeys();
    KeyPart[] keyParts = RouterUtils.split(matrixMeta, 0, nodes);
    List<PartitionGetParam> params = new ArrayList<>(parts.length);
    for (int i = 0; i < parts.length; i++) {
        if (keyParts[i] != null && keyParts[i].size() > 0) {
            params.add(new GetHyperLogLogPartParam(matrixId, parts[i], keyParts[i], n, isDirected));
        }
    }
    return params;
}
Also used : MatrixMeta(com.tencent.angel.ml.matrix.MatrixMeta) ArrayList(java.util.ArrayList) PartitionKey(com.tencent.angel.PartitionKey) KeyPart(com.tencent.angel.psagent.matrix.transport.router.KeyPart) PartitionGetParam(com.tencent.angel.ml.matrix.psf.get.base.PartitionGetParam)

Aggregations

KeyPart (com.tencent.angel.psagent.matrix.transport.router.KeyPart)26 MatrixMeta (com.tencent.angel.ml.matrix.MatrixMeta)13 PartitionKey (com.tencent.angel.PartitionKey)12 ArrayList (java.util.ArrayList)10 PartitionGetParam (com.tencent.angel.ml.matrix.psf.get.base.PartitionGetParam)9 ServerLongAnyRow (com.tencent.angel.ps.storage.vector.ServerLongAnyRow)9 InvalidParameterException (com.tencent.angel.exception.InvalidParameterException)8 GeneralPartGetParam (com.tencent.angel.ml.matrix.psf.get.base.GeneralPartGetParam)8 Long2ObjectOpenHashMap (it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap)7 ILongKeyPartOp (com.tencent.angel.psagent.matrix.transport.router.operator.ILongKeyPartOp)3 PartGetFloatArrayAttrsResult (com.tencent.angel.graph.client.psf.get.utils.PartGetFloatArrayAttrsResult)2 PartGetIntArrayAttrsResult (com.tencent.angel.graph.client.psf.get.utils.PartGetIntArrayAttrsResult)2 IntFloatVector (com.tencent.angel.ml.math2.vector.IntFloatVector)2 ServerRow (com.tencent.angel.ps.storage.vector.ServerRow)2 FutureResult (com.tencent.angel.psagent.matrix.transport.FutureResult)2 MatrixTransportClient (com.tencent.angel.psagent.matrix.transport.MatrixTransportClient)2 MapResponseCache (com.tencent.angel.psagent.matrix.transport.response.MapResponseCache)2 ResponseCache (com.tencent.angel.psagent.matrix.transport.response.ResponseCache)2 ValuePart (com.tencent.angel.psagent.matrix.transport.router.ValuePart)2 DynamicLongArray (com.tencent.angel.common.collections.DynamicLongArray)1