use of io.pravega.common.cluster.Host in project pravega by pravega.
the class SegmentMonitorLeader method triggerRebalance.
private void triggerRebalance() throws IOException {
// Read the current mapping from the host store and write back the update after rebalancing.
try {
Map<Host, Set<Integer>> newMapping = segBalancer.rebalance(hostStore.getHostContainersMap(), pravegaServiceCluster.getClusterMembers());
hostStore.updateHostContainersMap(newMapping);
} catch (ClusterException e) {
throw new IOException(e);
}
}
Aggregations