use of org.apache.hyracks.algebricks.core.algebra.properties.DefaultNodeGroupDomain in project asterixdb by apache.
the class MetadataManagerUtil method findNodeDomain.
public static INodeDomain findNodeDomain(MetadataTransactionContext mdTxnCtx, String nodeGroupName) throws AlgebricksException {
NodeGroup nodeGroup = MetadataManager.INSTANCE.getNodegroup(mdTxnCtx, nodeGroupName);
List<String> partitions = new ArrayList<>();
for (String location : nodeGroup.getNodeNames()) {
int numPartitions = ClusterStateManager.INSTANCE.getNodePartitionsCount(location);
for (int i = 0; i < numPartitions; i++) {
partitions.add(location);
}
}
return new DefaultNodeGroupDomain(partitions);
}
Aggregations