Skip to content
Permalink
Browse files
[NO ISSUE][CLUS] Add getter to the cluster partitions map
- user model changes: no
- storage format changes: no
- interface changes: yes

Change-Id: Idd1872e3cbf3a95a6f4b51ed5d2135db041ebc31
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/12723
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
  • Loading branch information
mhubail committed Aug 9, 2021
1 parent 0d97846 commit 91b555eb42f3d8dc7879842ef470f8bd420f1188
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
@@ -265,4 +265,11 @@ ClusterState waitForState(Predicate<ClusterState> condition, long timeout, TimeU
* @param rebalanceRequired
*/
void setRebalanceRequired(boolean rebalanceRequired) throws HyracksDataException;

/**
* Gets a map of the cluster partitions
*
* @return the cluster partitions map
*/
Map<Integer, ClusterPartition> getClusterPartitions();
}
@@ -473,6 +473,11 @@ public synchronized void setRebalanceRequired(boolean rebalanceRequired) throws
refreshState();
}

@Override
public Map<Integer, ClusterPartition> getClusterPartitions() {
return Collections.unmodifiableMap(clusterPartitions);
}

private void updateClusterCounters(String nodeId, NcLocalCounters localCounters) {
final IResourceIdManager resourceIdManager = appCtx.getResourceIdManager();
resourceIdManager.report(nodeId, localCounters.getMaxResourceId());

0 comments on commit 91b555e

Please sign in to comment.