Github user jiajunwang commented on a diff in the pull request: https://github.com/apache/helix/pull/89#discussion_r116555244 --- Diff: helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateOutput.java --- @@ -260,13 +260,72 @@ public Message getPendingState(String resourceName, Partition partition, String return partitionSet; } + /** + * Get the partitions count for each participant with the pending state and given resource state model + * @param resourceStateModel specified resource state model to look up + * @param state specified pending resource state to look up + * @return set of participants to partitions mapping + */ + public Map<String, Integer> getPartitionCountWithPendingState(String resourceStateModel, String state) { + Map<String, Integer> pendingPartitionCount = new HashMap<String, Integer>(); + for (String resource : _pendingStateMap.keySet()) { + String stateModel = _resourceStateModelMap.get(resource); + if (stateModel != null && stateModel.equals(resourceStateModel) --- End diff -- I don't think most of us need to google to know that... But I agree that it could be safer to add parentheses, just to make it safer. Thanks.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---