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

 ##########
 File path: 
storm-server/src/main/java/org/apache/storm/scheduler/resource/ResourceAwareScheduler.java
 ##########
 @@ -196,21 +204,18 @@ private void scheduleTopology(TopologyDetails td, 
Cluster cluster, final User to
                     } else if (result.getStatus() == 
SchedulingStatus.FAIL_NOT_ENOUGH_RESOURCES) {
                         LOG.debug("Not enough resources to schedule {}", 
td.getName());
                         List<TopologyDetails> reversedList = 
ImmutableList.copyOf(orderedTopologies).reverse();
-                        boolean evictedSomething = false;
-                        LOG.debug("attempting to make space for topo {} from 
user {}", td.getName(), td.getTopologySubmitter());
+                        LOG.debug("Attempting to make space for topo {} from 
user {}", td.getName(), td.getTopologySubmitter());
                         int tdIndex = reversedList.indexOf(td);
                         
topologySchedulingResources.setRemainingRequiredResources(toSchedule, td);
 
+                        Set<String> tmpEvictedTopos = new HashSet<>();
                         for (int index = 0; index < tdIndex; index++) {
                             TopologyDetails topologyEvict = 
reversedList.get(index);
                             SchedulerAssignment evictAssignemnt = 
workingState.getAssignmentById(topologyEvict.getId());
                             if (evictAssignemnt != null && 
!evictAssignemnt.getSlots().isEmpty()) {
-                                Collection<WorkerSlot> workersToEvict = 
workingState.getUsedSlotsByTopologyId(topologyEvict.getId());
                                 
topologySchedulingResources.adjustResourcesForEvictedTopology(toSchedule, 
topologyEvict);
-
-                                LOG.debug("Evicting Topology {} with workers: 
{} from user {}", topologyEvict.getName(), workersToEvict,
 
 Review comment:
   As for log info. I feel the worker and user information is not useful here 
since all workers will be evicted when evicting topologies. We are more 
concerned about for what topology the evictions happen. And we can easily know 
user info from topology info.

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