storm-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [storm] Ethanlm commented on a change in pull request #3096: STORM-3480 Implement One Worker Per Executor RAS Option
Date Thu, 08 Aug 2019 14:18:02 GMT
Ethanlm 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_r312060599
 
 

 ##########
 File path: storm-server/src/test/java/org/apache/storm/scheduler/resource/strategies/scheduling/TestDefaultResourceAwareStrategy.java
 ##########
 @@ -93,31 +104,119 @@ public TestDNSToSwitchMapping(Map<String, SupervisorDetails>
... racks) {
         }
     };
 
-    @Rule
-    public NormalizedResourcesRule nrRule = new NormalizedResourcesRule();
-
-    @After
+    @AfterEach
     public void cleanup() {
         if (scheduler != null) {
             scheduler.cleanup();
             scheduler = null;
         }
     }
 
+    /*
+     * test assigned memory with shared memory types and oneWorkerPerExecutor
+     */
+    @ParameterizedTest
+    @EnumSource(TestDefaultResourceAwareStrategy.sharedMemoryTypes.class)
+    public void testMultipleSharedMemoryWithOneWorkerPerExecutor(sharedMemoryTypes memoryType)
{
+        int spoutParallelism = 4;
+        double cpuPercent = 10;
+        double memoryOnHeap = 10;
+        double memoryOffHeap = 10;
+        double sharedOnHeap = 450;
+        double sharedOffHeapNode = 600;
+        double sharedOffHeapWorker = 400;
+
+        TopologyBuilder builder = new TopologyBuilder();
+        switch (memoryType) {
+            case SHARED_OFF_HEAP_NODE_TYPE:
+                builder.setSpout("spout", new TestSpout(), spoutParallelism)
+                        .addSharedMemory(new SharedOffHeapWithinNode(sharedOffHeapNode, "spout
shared node"));
 
 Review comment:
   Should at least include "off heap" to make it more clear

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