From dev-return-61040-archive-asf-public=cust-asf.ponee.io@storm.apache.org Thu Nov 14 16:29:11 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 65EB0180607 for ; Thu, 14 Nov 2019 17:29:11 +0100 (CET) Received: (qmail 14007 invoked by uid 500); 14 Nov 2019 16:29:10 -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 13995 invoked by uid 99); 14 Nov 2019 16:29:10 -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; Thu, 14 Nov 2019 16:29:10 +0000 From: GitBox To: dev@storm.apache.org Subject: [GitHub] [storm] srdo commented on a change in pull request #3166: STORM-3536 Add Generic-resources.md Message-ID: <157374895028.6956.5762650717673140420.gitbox@gitbox.apache.org> Date: Thu, 14 Nov 2019 16:29:10 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit srdo commented on a change in pull request #3166: STORM-3536 Add Generic-resources.md URL: https://github.com/apache/storm/pull/3166#discussion_r346415838 ########## File path: docs/Generic-resources.md ########## @@ -0,0 +1,39 @@ +--- +title: Generic Resources +layout: documentation +documentation: true +--- + +### Generic Resources +Generic Resources allow Storm to reference arbitrary resource types. Generic Resources may be considered an extension of the resources enumerated by the [Resource Aware Scheduler](Resource_Aware_Scheduler_overview.html), which accounts for CPU and memory. + +### API Overview +For a Storm Topology, the user can now specify the amount of generic resources a topology component (i.e. Spout or Bolt) is required to run a single instance of the component. The user can specify the resource requirement for a topology component by using the following API call. +``` + public T addResource(String resourceName, Number resourceValue) +``` +Parameters: +- resourceName – The name of the generic resource +- resourceValue – The amount of the generic resource + +Example of Usage: +``` + SpoutDeclarer s1 = builder.setSpout("word", new TestWordSpout(), 10); + s1.addResouce("gpu.count", 1.0); +``` + +### Specifying Generic Cluster Resources + +A storm administrator can specify node resource availability by modifying the _conf/storm.yaml_ file located in the storm home directory of that node. +``` + supervisor.resources.map: {[type] : [amount]} +``` +Example of Usage: +``` + supervisor.resources.map: {"gpu.count" : 2.0} +``` + + +### Generic Resources in UI + +![Storm Cluster UI](https://user-images.githubusercontent.com/50145295/68497812-06d1b280-021b-11ea-9f96-8946bf4193fc.png) Review comment: I think you can put this image in the /images directory instead, that way we avoid the site breaking if this image disappears. ---------------------------------------------------------------- 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