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<String>] : [amount<Double>]}
+```
+Example of Usage:
+```
+ supervisor.resources.map: {"gpu.count" : 2.0}
+```
+
+
+### Generic Resources in UI
+
+
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:
[email protected]
With regards,
Apache Git Services