From dev-return-60369-archive-asf-public=cust-asf.ponee.io@storm.apache.org Sat Aug 3 08:47:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 987951802C7 for ; Sat, 3 Aug 2019 10:47:03 +0200 (CEST) Received: (qmail 89358 invoked by uid 500); 3 Aug 2019 08:46:56 -0000 Mailing-List: contact dev-help@storm.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@storm.apache.org Delivered-To: mailing list dev@storm.apache.org Received: (qmail 88944 invoked by uid 99); 3 Aug 2019 08:46:55 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Aug 2019 08:46:55 +0000 From: GitBox To: dev@storm.apache.org Subject: [GitHub] [storm] srdo commented on a change in pull request #3096: STORM-3480 Implement One Worker Per Executor RAS Option Message-ID: <156482201575.30588.14011170794590053550.gitbox@gitbox.apache.org> Date: Sat, 03 Aug 2019 08:46:55 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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_r310344465 ########## File path: storm-server/src/test/java/org/apache/storm/scheduler/resource/strategies/scheduling/TestDefaultResourceAwareStrategy.java ########## @@ -104,79 +107,214 @@ public void cleanup() { } } - /** - * test if the scheduling logic for the DefaultResourceAwareStrategy is correct + /* + * test assigned memory with shared memory types and oneWorkerPerExecutor */ @Test - public void testDefaultResourceAwareStrategySharedMemory() { - int spoutParallelism = 2; - int boltParallelism = 2; - int numBolts = 3; + public void testMultipleSharedMemoryWithOneWorkerPerExecutor() { + int spoutParallelism = 4; double cpuPercent = 10; double memoryOnHeap = 10; double memoryOffHeap = 10; - double sharedOnHeap = 500; - double sharedOffHeapNode = 700; - double sharedOffHeapWorker = 500; - 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"); - builder.setBolt("bolt-2", new TestBolt(), - boltParallelism).addSharedMemory(new SharedOffHeapWithinNode(sharedOffHeapNode, "bolt-2 shared node")).shuffleGrouping("bolt-1"); - builder.setBolt("bolt-3", new TestBolt(), - boltParallelism).addSharedMemory(new SharedOnHeap(sharedOnHeap, "bolt-3 shared worker")).shuffleGrouping("bolt-2"); - - StormTopology stormToplogy = builder.createTopology(); - - INimbus iNimbus = new INimbusTest(); - Map supMap = genSupervisors(4, 4, 500, 2000); - 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); - TopologyDetails topo = new TopologyDetails("testTopology-id", conf, stormToplogy, 0, - genExecsAndComps(stormToplogy), CURRENT_TIME, "user"); - - Topologies topologies = new Topologies(topo); - Cluster cluster = new Cluster(iNimbus, new ResourceMetrics(new StormMetricsRegistry()), supMap, new HashMap<>(), topologies, conf); + double sharedOnHeap = 450; + double sharedOffHeapNode = 600; + double sharedOffHeapWorker = 400; + + for (sharedMemoryTypes memoryType : sharedMemoryTypes.values()) { Review comment: This needs us to switch this test class to use JUnit 5 annotations. Let me know if you don't want to do this, and we can just raise an issue to do it later. ---------------------------------------------------------------- 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