Search in sources :

Example 1 with GetPSMatricesResponse

use of com.tencent.angel.protobuf.generated.PSMasterServiceProtos.GetPSMatricesResponse in project angel by Tencent.

the class MasterService method getPSMatricesMeta.

@Override
public GetPSMatricesResponse getPSMatricesMeta(RpcController controller, GetPSMatricesMetaRequest request) throws ServiceException {
    Map<Integer, MatrixMeta> matrixIdToMetaMap = context.getMatrixMetaManager().getMatrixPartitions(ProtobufUtil.convertToId(request.getPsId()));
    GetPSMatricesResponse.Builder builder = GetPSMatricesResponse.newBuilder();
    if (matrixIdToMetaMap != null && !matrixIdToMetaMap.isEmpty()) {
        for (MatrixMeta meta : matrixIdToMetaMap.values()) {
            builder.addMatricesMeta(ProtobufUtil.convertToMatrixMetaProto(meta));
        }
    }
    return builder.build();
}
Also used : GetPSMatricesResponse(com.tencent.angel.protobuf.generated.PSMasterServiceProtos.GetPSMatricesResponse) MatrixMeta(com.tencent.angel.ml.matrix.MatrixMeta)

Aggregations

MatrixMeta (com.tencent.angel.ml.matrix.MatrixMeta)1 GetPSMatricesResponse (com.tencent.angel.protobuf.generated.PSMasterServiceProtos.GetPSMatricesResponse)1