Ethanlm commented on a change in pull request #3213: [STORM-3588] add 
GenericResourceAwareSchedulingPriorityStrategy to accommodate generic resource 
in grading topologies
URL: https://github.com/apache/storm/pull/3213#discussion_r385166333
 
 

 ##########
 File path: 
storm-server/src/main/java/org/apache/storm/scheduler/resource/ResourceAwareScheduler.java
 ##########
 @@ -202,7 +210,7 @@ private void scheduleTopology(TopologyDetails td, Cluster 
cluster, final User to
                             if (evictAssignemnt != null && 
!evictAssignemnt.getSlots().isEmpty()) {
                                 Collection<WorkerSlot> workersToEvict = 
workingState.getUsedSlotsByTopologyId(topologyEvict.getId());
                                 
topologySchedulingResources.adjustResourcesForEvictedTopology(toSchedule, 
topologyEvict);
-
+                                evictedTopologies.add(topologyEvict.getId());
 
 Review comment:
   One last thing, we can have a boolean like `forTests`, which by default to 
false and we can set it to true from unit tests. This is to avoid unnecessary 
computation/operations. And make it clear that this is only for tests. 
   
   As for `getEvictedTopologies`, we can throw exceptions if `forTests` is 
false. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to