Github user Ethanlm commented on a diff in the pull request:
https://github.com/apache/storm/pull/2881#discussion_r228319880
--- Diff:
storm-server/src/main/java/org/apache/storm/scheduler/resource/normalization/NormalizedResourceOffer.java
---
@@ -81,6 +81,20 @@ public void add(NormalizedResourcesWithMemory other) {
totalMemoryMb += other.getTotalMemoryMb();
}
+ /**
+ * Remove the resources in other from this.
+ * @param other the resources to be removed.
+ * @return true if one or more resources in other were larger than
available resources in this, else false.
+ */
+ public boolean remove(NormalizedResourcesWithMemory other) {
--- End diff --
Maybe change `public boolean remove(NormalizedResourcesWithMemory other,
ResourceMetrics resourceMetrics)` and then just call `remove(other, null)`
---