use of com.tencent.angel.PartitionKey in project angel by Tencent.
the class BinaryAggrParam method split.
@Override
public List<PartitionGetParam> split() {
List<PartitionKey> parts = PSAgentContext.get().getMatrixMetaManager().getPartitions(matrixId);
int size = parts.size();
List<PartitionGetParam> partParams = new ArrayList<PartitionGetParam>(size);
for (PartitionKey part : parts) {
partParams.add(new BinaryPartitionAggrParam(matrixId, part, rowId1, rowId2));
}
return partParams;
}
use of com.tencent.angel.PartitionKey in project angel by Tencent.
the class FullAggrFunc method partitionGet.
@Override
public PartitionGetResult partitionGet(PartitionGetParam partKey) {
ServerPartition part = psContext.getMatrixStorageManager().getPart(partKey.getMatrixId(), partKey.getPartKey().getPartitionId());
double[][] result = null;
if (part != null) {
result = process(part, partKey.getPartKey());
}
PartitionKey key = partKey.getPartKey();
int[] partInfo = new int[] { key.getStartRow(), key.getEndRow(), (int) key.getStartCol(), (int) key.getEndCol() };
return new FullPartitionAggrResult(result, partInfo);
}
use of com.tencent.angel.PartitionKey in project angel by Tencent.
the class FullAggrParam method split.
@Override
public List<PartitionGetParam> split() {
List<PartitionKey> parts = PSAgentContext.get().getMatrixMetaManager().getPartitions(matrixId);
int size = parts.size();
List<PartitionGetParam> partParams = new ArrayList<PartitionGetParam>(size);
for (PartitionKey part : parts) {
partParams.add(new FullPartitionAggrParam(matrixId, part));
}
return partParams;
}
use of com.tencent.angel.PartitionKey in project angel by Tencent.
the class MultiAggrParam method split.
@Override
public List<PartitionGetParam> split() {
List<PartitionKey> parts = PSAgentContext.get().getMatrixMetaManager().getPartitions(matrixId);
int size = parts.size();
List<PartitionGetParam> partParams = new ArrayList<PartitionGetParam>(size);
for (PartitionKey part : parts) {
partParams.add(new MultiPartitionAggrParam(matrixId, part, rowIds));
}
return partParams;
}
use of com.tencent.angel.PartitionKey in project angel by Tencent.
the class CompressUpdateParam method split.
@Override
public List<PartitionUpdateParam> split() {
List<PartitionKey> partList = PSAgentContext.get().getMatrixMetaManager().getPartitions(matrixId, rowId);
int size = partList.size();
List<PartitionUpdateParam> partParams = new ArrayList<PartitionUpdateParam>(size);
for (PartitionKey part : partList) {
if (rowId < part.getStartRow() || rowId >= part.getEndRow()) {
throw new RuntimeException("Wrong rowId!");
}
partParams.add(new CompressPartitionUpdateParam(matrixId, part, rowId, (int) part.getStartCol(), (int) part.getEndCol(), array, bitsPerItem));
}
return partParams;
}
Aggregations