From dev-return-60833-archive-asf-public=cust-asf.ponee.io@storm.apache.org Wed Oct 2 17:49:46 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 4F3FB18064F for ; Wed, 2 Oct 2019 19:49:46 +0200 (CEST) Received: (qmail 29324 invoked by uid 500); 2 Oct 2019 17:49:43 -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 29235 invoked by uid 99); 2 Oct 2019 17:49:43 -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; Wed, 02 Oct 2019 17:49:43 +0000 From: GitBox To: dev@storm.apache.org Subject: [GitHub] [storm] Ethanlm commented on a change in pull request #3128: STORM-3509 Improved RAS scheduling Message-ID: <157003858355.11357.6443499126523195277.gitbox@gitbox.apache.org> Date: Wed, 02 Oct 2019 17:49:43 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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