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_r405230149
 
 

 ##########
 File path: 
storm-server/src/main/java/org/apache/storm/scheduler/resource/ResourceAwareScheduler.java
 ##########
 @@ -239,6 +246,10 @@ private void scheduleTopology(TopologyDetails td, Cluster 
cluster, final User to
         markFailedTopology(topologySubmitter, cluster, td, "Failed to schedule 
within " + maxSchedulingAttempts + " attempts");
     }
 
+    public Set<String> getEvictedTopologies() {
 
 Review comment:
   I am seeing a possible race condition here. Since the `evictedTopologies` 
will be kept updated during scheduling, any function call to 
`getEvictedTopologies` doesn't guarantee to return a useful result.  This 
`evictedTopologies` includes every topology that is evicted during the 
scheduling process until the point when `getEvictedTopologies` is called.  It 
doesn't seem useful. 
   
   To know what topologies are being evicted, we already have
   ```
   LOG.debug("Evicting Topology {} with workers: {} from user {}", 
topologyEvict.getName(), workersToEvict,
                                       topologyEvict.getTopologySubmitter());
   ```
   code in place. We can change it to `warn` if we want it to show up in the 
regular logs.  
   
   @kishorvpatil  what do you think?
   

----------------------------------------------------------------
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