Author: smohanty
Date: Sun Oct 19 22:53:22 2014
New Revision: 1633020

URL: http://svn.apache.org/r1633020
Log:
Doc update for label

Modified:
    
incubator/slider/site/trunk/content/docs/slider_specs/resource_specification.md

Modified: 
incubator/slider/site/trunk/content/docs/slider_specs/resource_specification.md
URL: 
http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/slider_specs/resource_specification.md?rev=1633020&r1=1633019&r2=1633020&view=diff
==============================================================================
--- 
incubator/slider/site/trunk/content/docs/slider_specs/resource_specification.md 
(original)
+++ 
incubator/slider/site/trunk/content/docs/slider_specs/resource_specification.md 
Sun Oct 19 22:53:22 2014
@@ -184,7 +184,55 @@ YARN cluster and hardware.
 ## <a name="labels"></a>Using Labels
 The resources.json file can be used to specify the labels to be used when 
allocating containers for the components. The details of the YARN Label feature 
can be found at [YARN-796](https://issues.apache.org/jira/browse/YARN-796).
 
-The feature is not yet committed.
+In summary: 
+
+* Nodes can be assigned one or more labels
+* Capacity Queues can be defined with access to one or more labels
+* Ensure application components are associated with appropriate label 
expressions 
+* Create the application using specific queue
+
+This way, you can guarantee that a certain set of nodes are reserved for an 
application or for a component within an application.
+
+Label expression is specified through property "yarn.label.expression". When 
no label expression is specified then it is assumed that only non-labeled nodes 
are used when allocating containers for component instances.
+
+If label expression is specified for slider-appmaster then it also becomes the 
default label expression for all component. To take advantage of default label 
expression leave out the property (see HBASE_REGIONSERVER in the example). 
Label expression with empty string ("yarn.label.expression":"") means nodes 
without labels.
+
+Example
+Here is a resource.json file for an HBase cluster which uses labels. The label 
for the application instance is "hbase1" and the label expression for the 
HBASE_MASTER components is "hbase1_master". HBASE_REGIONSERVER instances will 
automatically use label "hbase1". Alternatively, if you specify 
("yarn.label.expression":"") for HBASE_REGIONSERVER then the containers will 
only be allocated on nodes with no labels.
+
+    {
+        "schema": "http://example.org/specification/v2.0.0";,
+        "metadata": {
+        },
+        "global": {
+        },
+        "components": {
+            "HBASE_MASTER": {
+                "yarn.role.priority": "1",
+                "yarn.component.instances": "1",
+                "yarn.label.expression":"hbase1_master"
+            },
+            "HBASE_REGIONSERVER": {
+                "yarn.role.priority": "1",
+                "yarn.component.instances": "1",
+            },
+            "slider-appmaster": {
+                "yarn.label.expression":"hbase1"
+            }
+        }
+    }
+
+Specifically, for the above example you will need: 
+
+* Create two labels, hbase1 and hbase1_master (use yarn rmadmin commands) 
+* Assign the labels to nodes (use yarn rmadmin commands) 
+* Perform refresh queue (yarn -refreshqueue) 
+* Create a queue by defining it in the capacity scheduler config 
+* Allow the queue to access to the labels and ensure that appropriate min/max 
capacity is assigned 
+* Perform refresh queue (yarn -refreshqueue) 
+* Create the Slider application against the above queue using parameter 
--queue while creating the application
+
 
 ## <a name="logagg"></a>Using Log Aggregation
 The feature is not yet committed.
+    
\ No newline at end of file


Reply via email to