storm-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [storm] srdo commented on a change in pull request #3096: STORM-3480 Implement One Worker Per Executor RAS Option
Date Wed, 07 Aug 2019 09:02:04 GMT
srdo commented on a change in pull request #3096: STORM-3480 Implement One Worker Per Executor
RAS Option
URL: https://github.com/apache/storm/pull/3096#discussion_r311437770
 
 

 ##########
 File path: storm-server/src/test/java/org/apache/storm/scheduler/resource/strategies/scheduling/TestDefaultResourceAwareStrategy.java
 ##########
 @@ -120,198 +128,194 @@ public void testMultipleSharedMemoryWithOneWorkerPerExecutor() {
         double sharedOffHeapNode = 600;
         double sharedOffHeapWorker = 400;
 
-        for (sharedMemoryTypes memoryType : sharedMemoryTypes.values()) {
-            TopologyBuilder builder = new TopologyBuilder();
-            switch (memoryType) {
-                case sharedOffHeapNodeType:
-                    builder.setSpout("spout", new TestSpout(), spoutParallelism).
-                            addSharedMemory(new SharedOffHeapWithinNode(sharedOffHeapNode,
"spout shared node"));
-                    break;
-                case sharedOffHeapWorkerType:
-                    builder.setSpout("spout", new TestSpout(), spoutParallelism).
-                            addSharedMemory(new SharedOffHeapWithinWorker(sharedOffHeapWorker,
"spout shared off heap worker"));
-                    break;
-                case sharedOnHeapType:
-                    builder.setSpout("spout", new TestSpout(), spoutParallelism).
-                            addSharedMemory(new SharedOnHeap(sharedOnHeap, "spout shared
worker"));
-                    break;
-            }
-            StormTopology stormToplogy = builder.createTopology();
-            INimbus iNimbus = new INimbusTest();
-            Map<String, SupervisorDetails> supMap = genSupervisors(4, 4, 500, 1000);
-            Config conf = createClusterConfig(cpuPercent, memoryOnHeap, memoryOffHeap, null);
-
-            conf.put(Config.TOPOLOGY_PRIORITY, 0);
-            conf.put(Config.TOPOLOGY_NAME, "testTopology");
-            conf.put(Config.TOPOLOGY_WORKER_MAX_HEAP_SIZE_MB, 2000);
-            conf.put(Config.TOPOLOGY_RAS_ONE_WORKER_PER_EXECUTOR, true);
-            TopologyDetails topo = new TopologyDetails("testTopology-id", conf, stormToplogy,
0,
-                    genExecsAndComps(stormToplogy), CURRENT_TIME, "user");
+        TopologyBuilder builder = new TopologyBuilder();
+        switch (memoryType) {
+            case SHARED_OFF_HEAP_NODE_TYPE:
+                builder.setSpout("spout", new TestSpout(), spoutParallelism).
 
 Review comment:
   Nit: The last dot should go on the next line. I'm surprised checkstyle doesn't catch this.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message