desaikomal commented on code in PR #2600:
URL: https://github.com/apache/helix/pull/2600#discussion_r1296341999
##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java:
##########
@@ -450,22 +452,17 @@ protected Map<String, ResourceAssignment>
emergencyRebalance(
resourceMap.keySet());
// Step 1: Check for permanent node down
- AtomicBoolean allNodesActive = new AtomicBoolean(true);
-
currentBestPossibleAssignment.values().parallelStream().forEach((resourceAssignment
-> {
-
resourceAssignment.getMappedPartitions().parallelStream().forEach(partition -> {
- for (String instance :
resourceAssignment.getReplicaMap(partition).keySet()) {
- if (!activeNodes.contains(instance)) {
- allNodesActive.set(false);
- break;
- }
- }
- });
- }));
-
+ boolean allNodesActive = currentBestPossibleAssignment.values().stream()
Review Comment:
i am not a java expert, can you please explain why we had to remove Atomic<>
?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]