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 #3128: STORM-3509 Improved RAS scheduling
Date Wed, 02 Oct 2019 17:49:43 GMT
Ethanlm commented on a change in pull request #3128: STORM-3509 Improved RAS scheduling
URL: https://github.com/apache/storm/pull/3128#discussion_r330619016
 
 

 ##########
 File path: storm-server/src/test/java/org/apache/storm/scheduler/resource/strategies/scheduling/TestGenericResourceAwareStrategy.java
 ##########
 @@ -236,6 +237,72 @@ public void testGenericResourceAwareStrategy() {
         assertEquals(expectedScheduling, foundScheduling);
     }
 
+    private TopologyDetails createTestStormTopology(StormTopology stormTopology, int priority,
String name, Config conf) {
+        conf.put(Config.TOPOLOGY_PRIORITY, priority);
+        conf.put(Config.TOPOLOGY_NAME, name);
+        return new TopologyDetails(name , conf, stormTopology, 0,
+                genExecsAndComps(stormTopology), currentTime, "user");
+    }
+
+    /*
+     * test requiring eviction until Generic Resource (gpu) is evicted.
+     */
+    @Test
+    public void testGrasRequiringEviction() {
+        int spoutParallelism = 3;
+        double cpuPercent = 10;
+        double memoryOnHeap = 10;
+        double memoryOffHeap = 10;
+        // Sufficient Cpu/Memory. But insufficient gpu to schedule all topologies (gpu1,
noGpu, gpu2).
+
+        // gpu topology (requires 3 gpu's in total)
+        TopologyBuilder builder = new TopologyBuilder();
+        builder.setSpout("spout", new TestSpout(), spoutParallelism).addResource("gpu.count",
1.0);
+        StormTopology stormTopologyWithGpu = builder.createTopology();
+
+        // non-gpu topology
+        builder = new TopologyBuilder();
+        builder.setSpout("spout", new TestSpout(), spoutParallelism);
+        StormTopology stormTopologyNoGpu = builder.createTopology();
+
+        Config conf = createGrasClusterConfig(cpuPercent, memoryOnHeap, memoryOffHeap, null,
Collections.emptyMap());
+        conf.put(DaemonConfig.RESOURCE_AWARE_SCHEDULER_MAX_TOPOLOGY_SCHEDULING_ATTEMPTS,
2);    // allow 1 round of evictions
+        //conf.put(Config.TOPOLOGY_WORKER_MAX_HEAP_SIZE_MB, 2000);
 
 Review comment:
   Delete if not used.

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