bipinprasad commented on a change in pull request #3244: [STORM-3600] Add 
caching in Cluster.calculateSharedOffHeapNodeMemory
URL: https://github.com/apache/storm/pull/3244#discussion_r406481252
 
 

 ##########
 File path: storm-server/src/main/java/org/apache/storm/scheduler/Cluster.java
 ##########
 @@ -709,6 +720,33 @@ public void assign(SchedulerAssignment assignment, 
boolean ignoreSingleException
         }
     }
 
+    /**
+     * Initialize the flag to true if specified topology uses 
SharedOffHeapNodeMemory, false otherwise.
+     *
+     * @param td TopologyDetails to examine
+     */
+    private void initializeTopoSharedOffHeapNodeMemoryFlag(TopologyDetails td) 
{
+        String topoId = td.getId();
+        topoSharedOffHeapMemoryNodeFlag.put(topoId, false);
+        StormTopology topology = td.getTopology();
+        if (topology == null) {
+            return; // accomodate multitenant_scheduler_test.clj
+        }
+        if (topology.is_set_component_to_shared_memory()) {
 
 Review comment:
   (1) topology == null check is required weirdly enough due to some other 
tests failure (later I also found note in 
TopologyDetails.getSharedMemoryRequests()
   (2) In StormTopology shared_memory and component_to_shared_memory are two 
different thrift fields. And setters don't seem to cross set. If I change this 
code then this will change the prior logic in Cluster.java. How are these two 
different fields equivalent?

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