You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by GitBox <gi...@apache.org> on 2019/08/23 19:38:22 UTC

[GitHub] [storm] Ethanlm commented on a change in pull request #3114: STORM-3488 Scheduling can cause RAS_Node resources to become negative

Ethanlm commented on a change in pull request #3114: STORM-3488 Scheduling can cause RAS_Node resources to become negative
URL: https://github.com/apache/storm/pull/3114#discussion_r316899725
 
 

 ##########
 File path: storm-server/src/test/java/org/apache/storm/scheduler/resource/strategies/scheduling/TestDefaultResourceAwareStrategy.java
 ##########
 @@ -201,6 +201,74 @@ public void testMultipleSharedMemoryWithOneExecutorPerWorker(SharedMemoryType me
         }
     }
 
+    /*
+     * test scheduling does not cause negative resources
+     */
+    @Test
+    public void testSchedulingNegativeResources() {
+        int spoutParallelism = 2;
+        int boltParallelism = 2;
+        double cpuPercent = 10;
+        double memoryOnHeap = 10;
+        double memoryOffHeap = 10;
+        double sharedOnHeap = 400;
+        double sharedOffHeapNode = 700;
+        double sharedOffHeapWorker = 500;
+
+        Config conf = createClusterConfig(cpuPercent, memoryOnHeap, memoryOffHeap, null);
+        TopologyDetails topo[] = new TopologyDetails[2];
+
+        // 1st topology
+        TopologyBuilder builder = new TopologyBuilder();
+        builder.setSpout("spout", new TestSpout(),
+                spoutParallelism);
+        builder.setBolt("bolt-1", new TestBolt(),
+                boltParallelism).addSharedMemory(new SharedOffHeapWithinWorker(sharedOffHeapWorker, "bolt-1 shared off heap worker")).shuffleGrouping("spout");
 
 Review comment:
   change to `bolt-1 shared off heap within worker`?

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