Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xyuanlu committed Sep 27, 2023
1 parent 9bac5a9 commit 2386e9d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,15 @@ public WagedInstanceCapacity(ResourceControllerDataProvider clusterData) {
return;
}
for (InstanceConfig instanceConfig : clusterData.getInstanceConfigMap().values()) {
Map<String, Integer> instanceCapacity;
Map<String, Integer> instanceCapacity = null;
try {
instanceCapacity = WagedValidationUtil.validateAndGetInstanceCapacity(clusterConfig, instanceConfig);
} catch (HelixException ex) {
// We don't want to throw exception here, it would be OK if no resource is using Waged.
// Waged rebalancer will fail in later pipeline stage only for waged resource. So it won't block other resources.
LOG.error("Failed to initialize instance capacity map. Instance capacity map is not property set up", ex);
return;
}
_instanceCapacityMap.put(instanceConfig.getInstanceName(), instanceCapacity);
_instanceCapacityMap.put(instanceConfig.getInstanceName(), instanceCapacity == null? new HashMap<>(): instanceCapacity);
_allocatedPartitionsMap.put(instanceConfig.getInstanceName(), new HashMap<>());
}
}
Expand Down

0 comments on commit 2386e9d

Please sign in to comment.