Github user jerrypeng commented on a diff in the pull request:
https://github.com/apache/storm/pull/2442#discussion_r157680068
--- Diff:
storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/GenericResourceAwareStrategy.java
---
@@ -129,7 +129,15 @@ public SchedulingResult schedule(Cluster cluster,
TopologyDetails td) {
protected TreeSet<ObjectResources> sortObjectResources(
final AllResources allResources, ExecutorDetails exec,
TopologyDetails topologyDetails,
final ExistingScheduleFunc existingScheduleFunc) {
+ return sortObjectResourcesImpl(allResources, exec,
topologyDetails, existingScheduleFunc);
+ }
+ /**
+ * Implelemtation of the sortObjectResources method so other
strategies can reuse it.
+ */
+ public static TreeSet<ObjectResources> sortObjectResourcesImpl(
--- End diff --
I would suggest putting this in some sort of Utility class. Its kind of
awkward for the ConstraintSovlerStrategy to call a static method in the
GenericResourceAwareStrategy
---