Repository: helix Updated Branches: refs/heads/master 698532598 -> 516266de3
Fix a minor bug in BestPossibleExternalViewVerifier. Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/516266de Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/516266de Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/516266de Branch: refs/heads/master Commit: 516266de3aa91a36c1025a1790f4c5bcdbe09ae0 Parents: 6985325 Author: Lei Xia <[email protected]> Authored: Tue May 29 09:58:00 2018 -0700 Committer: Junkai Xue <[email protected]> Committed: Tue Jul 10 11:23:12 2018 -0700 ---------------------------------------------------------------------- .../ClusterVerifiers/BestPossibleExternalViewVerifier.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/516266de/helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java b/helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java index b01a77f..b3fcdf0 100644 --- a/helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java +++ b/helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java @@ -188,11 +188,7 @@ public class BestPossibleExternalViewVerifier extends ZkHelixClusterVerifier { ClusterDataCache cache = new ClusterDataCache(); cache.refresh(_accessor); - Map<String, IdealState> idealStates = cache.getIdealStates(); - if (idealStates == null) { - // ideal state is null because ideal state is dropped - idealStates = Collections.emptyMap(); - } + Map<String, IdealState> idealStates = new HashMap<>(cache.getIdealStates()); // filter out all resources that use Task state model Iterator<Map.Entry<String, IdealState>> it = idealStates.entrySet().iterator();
