Skip to content

Commit

Permalink
[STORM-3639] Add javadoc to Nimbus.auditAssignmentChanges() and remov…
Browse files Browse the repository at this point in the history
…e superflous parameter checks.
  • Loading branch information
Bipin Prasad committed Sep 16, 2020
1 parent 90b8d9f commit f4375c6
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -810,14 +810,15 @@ private static Map<String, Map<WorkerSlot, WorkerResources>> computeTopoToNodePo
return ret;
}

/**
* Check new assignments with existing assignments and determine difference is any.
*
* @param existingAssignments non-null map of topology-id to existing assignments.
* @param newAssignments non-null map of topology-id to new assignments.
* @return true if there is a change in assignments, false otherwise.
*/
private boolean auditAssignmentChanges(Map<String, Assignment> existingAssignments,
Map<String, Assignment> newAssignments) {
if (existingAssignments == null) {
throw new AssertionError("existingAssignments is null");
}
if (newAssignments == null) {
throw new AssertionError("newAssignments is null");
}
boolean anyChanged = existingAssignments.isEmpty() ^ newAssignments.isEmpty();
long numRemovedExec = 0;
long numRemovedSlot = 0;
Expand Down

0 comments on commit f4375c6

Please sign in to comment.