Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2764#discussion_r208721202
  
    --- Diff: 
storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java ---
    @@ -2219,21 +2305,16 @@ private void mkAssignments(String scratchTopoId) 
throws Exception {
                     newAssignments.put(topoId, newAssignment);
                 }
     
    -            if (!newAssignments.equals(existingAssignments)) {
    +            boolean assignmentChanged = 
inspectSchduling(existingAssignments, newAssignments);
    +            if (assignmentChanged) {
                     LOG.debug("RESETTING id->resources and 
id->worker-resources cache!");
    -                LOG.info("Fragmentation after scheduling is: {} MB, {} 
PCore CPUs", fragmentedMemory(), fragmentedCpu());
    -                nodeIdToResources.get().forEach((id, node) ->
    -                                                    LOG.info(
    -                                                        "Node Id: {} Total 
Mem: {}, Used Mem: {}, Available Mem: {}, Total CPU: {}, Used "
    -                                                        + "CPU: {}, 
Available CPU: {}, fragmented: {}",
    -                                                        id, 
node.getTotalMem(), node.getUsedMem(), node.getAvailableMem(),
    -                                                        
node.getTotalCpu(), node.getUsedCpu(), node.getAvailableCpu(), 
isFragmented(node)));
                     idToResources.set(new HashMap<>());
                     idToWorkerResources.set(new HashMap<>());
                 }
     
                 //tasks figure out what tasks to talk to by looking at 
topology at runtime
                 // only log/set when there's been a change to the assignment
    +            // TODO: why do we have loop fission here
    --- End diff --
    
    My guess would be for readability. If you want to refactor go ahead. 


---

Reply via email to