use of com.tencent.angel.ml.matrix.psf.get.multi.PartitionGetRowsParam in project angel by Tencent.
the class GetPartFunc method partitionGet.
@Override
public PartitionGetResult partitionGet(PartitionGetParam partParam) {
PartitionGetRowsParam param = (PartitionGetRowsParam) partParam;
PartitionKey pkey = param.getPartKey();
pkey = psContext.getMatrixMetaManager().getMatrixMeta(pkey.getMatrixId()).getPartitionMeta(pkey.getPartitionId()).getPartitionKey();
int ws = pkey.getStartRow();
int es = pkey.getEndRow();
List<Integer> reqRows = param.getRowIndexes();
MatrixStorageManager manager = psContext.getMatrixStorageManager();
List<ServerRow> rows = new ArrayList<>();
for (int w : reqRows) rows.add(manager.getRow(pkey, w));
PartCSRResult csr = new PartCSRResult(rows);
return csr;
}
Aggregations