You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by sm...@apache.org on 2014/11/15 00:21:36 UTC

svn commit: r1639803 - in /incubator/slider/site/trunk/content/docs: examples.md getting_started.md slider_specs/specifying_exports.md

Author: smohanty
Date: Fri Nov 14 23:21:36 2014
New Revision: 1639803

URL: http://svn.apache.org/r1639803
Log:
Update to exports documentation and some more clarification on Getting Started doc

Modified:
    incubator/slider/site/trunk/content/docs/examples.md
    incubator/slider/site/trunk/content/docs/getting_started.md
    incubator/slider/site/trunk/content/docs/slider_specs/specifying_exports.md

Modified: incubator/slider/site/trunk/content/docs/examples.md
URL: http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/examples.md?rev=1639803&r1=1639802&r2=1639803&view=diff
==============================================================================
--- incubator/slider/site/trunk/content/docs/examples.md (original)
+++ incubator/slider/site/trunk/content/docs/examples.md Fri Nov 14 23:21:36 2014
@@ -17,6 +17,9 @@
 
 # Apache Slider Examples
 
+`Note: These examples use HBase providers written for Slider.`
+To use the HBase application package refer to [Getting Started](/docs/getting_started.html).
+
  
 ## Setup
  

Modified: incubator/slider/site/trunk/content/docs/getting_started.md
URL: http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/getting_started.md?rev=1639803&r1=1639802&r2=1639803&view=diff
==============================================================================
--- incubator/slider/site/trunk/content/docs/getting_started.md (original)
+++ incubator/slider/site/trunk/content/docs/getting_started.md Fri Nov 14 23:21:36 2014
@@ -204,6 +204,9 @@ Create one or more Slider application pa
 
     slider install-package --name *package name* --package *sample-application-package*
     
+Package gets deployed on HDFS at `<User home dir>/.slider/package/<name provided in the command>`
+This path is also reflected in appConfig.json through property `"application.def"` So the path and the property value must be in sync.
+    
 For example, you can use the following command for HBase application package.
 
     slider install-package --name HBASE --package path-to-hbase-package.zip

Modified: incubator/slider/site/trunk/content/docs/slider_specs/specifying_exports.md
URL: http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/slider_specs/specifying_exports.md?rev=1639803&r1=1639802&r2=1639803&view=diff
==============================================================================
--- incubator/slider/site/trunk/content/docs/slider_specs/specifying_exports.md (original)
+++ incubator/slider/site/trunk/content/docs/slider_specs/specifying_exports.md Fri Nov 14 23:21:36 2014
@@ -29,8 +29,10 @@ All exports are specified in the metadat
 
 Slider application packages accept an appConfig.json file for all application configuration supplied by the user. Any property whose name starts with "site" are considered configuration. [Specifications InstanceConfiguration](application_instance_configuration.html) describes the naming convention.
 
+### Export specific configs
 By default all configurations are exported (e.g. http://hos1:44500/ws/v1/slider/publisher/slider/storm-site). They can be disabled by specifying `<exportedConfigs>None</exportedConfigs>` under `<application>`. If you want to explicitly specify what to publish you can use comma separated named such as `<exportedConfigs>storm-site,another-site</exportedConfigs>`.
 
+### Which component is responsible for export
 By default an arbitrary master is chosen as the master responsible for exporting the config. *What this means is that when this master is STARTED the applied config known at that time is exported*. Otherwise, you can specify which master component type should export configuration by specifying `<publishConfig>true</publishConfig>` under `<component>`.
 
 ## Exporting formatted data at application instance level
@@ -41,7 +43,7 @@ At application level one or more exportG
         <name>QuickLinks</name>
         <exports>
           <export>
-            <name>app.monitor</name>
+            <name>org.apache.slider.monitor/name>
             <value>http://${STORM_UI_SERVER_HOST}:${site.storm-site.ui.port}</value>
           </export>
           <export>
@@ -54,21 +56,107 @@ At application level one or more exportG
 
 You also need to specify as to which component type should export which data item. This is specified via `<appExports>` tag such as `<appExports>QuickLinks-nimbus.host_port</appExports>` for NIMBUS component type.
 
+    <components>
+      <component>
+        <name>NIMBUS</name>
+        <category>MASTER</category>
+        <appExports>QuickLinks-org.apache.slider.monitor,QuickLinks-nimbus.host_port</appExports>
+        ...
+
 ## Exporting formatted data at component instance level
-Occasionally, component instances may need to export data on a per component instance basis. This is true if your application is a set of peers - e.g. memcached daemons, or you may have a need for each slave component instance to export some data. Currently, only the host and dynamically allocated port values can be exported.
+Occasionally, component instances may need to export data on a per component instance basis. This is true if your application is a set of peers - e.g. memcached daemons, or you may have a need for each slave component instance to export some data. Currently, only the host name and dynamically allocated port values can be exported.
+
+A component export can be declaraed within the component definition or along with application export group. When declared along the `exportGroups` you also need to specify the component that is responsible.
 
-To export, specify componentExports sections for components. For example:
-`<componentExports>
-   <componentExport>
-     <name>log_viewer_port</name>
-     <value>${THIS_HOST}:${site.storm-site.logviewer.port}</value>
-   </componentExport>
- </componentExports>` is used to specify that all Storm Supervisor component instances export the log viewer port.
+Add the export.
+
+    <exportGroup>
+      <name>Servers</name>
+      <exports>
+        <export>
+          <name>host_port</name>
+          <value>${MEMCACHED_HOST}:${site.global.listen_port}</value>
+        </export>
+      </exports>
+    </exportGroup>
+      
+Define the component that exports it.
+
+    <components>
+      <component>
+        <name>MEMCACHED</name>
+        <category>MASTER</category>
+        <compExports>Servers-host_port</compExports>
+        ...
+
+Alternatively specify the export in the components section. For example:
+    
+    <componentExports>
+       <componentExport>
+         <name>log_viewer_port</name>
+         <value>${MEMCACHED_HOST}:${site.storm-site.logviewer.port}</value>
+       </componentExport>
+    </componentExports>` 
+ 
+is used to specify that all Storm Supervisor component instances export the log viewer port. `${MEMCACHED_HOST}` refers to the host of the component instances that is exporting. You can use `${THIS_HOST}` as well.
  
-When any component instance comes up the value for the component instance is exported and when a component instance goes down the export is removed. Sample export:
+When any component instance comes up the value for the component instance is exported and when a component instance goes down the export is removed. Exports are available @ `.../ws/v1/slider/publisher/slider/componentinstancedata` Sample export:
  
     http://host1:44500/ws/v1/slider/publisher/slider/componentinstancedata
     entries": {
        "container_1407354284611_0059_01_000006.log_viewer_port": "host2:60515"
     }
 
+A structured JOSN for component exports are available @ `.../ws/v1/slider/publisher/exports`. The container log and work directories are automatically made available.
+
+Sample:
+
+    GET http://c6403.ambari.apache.org:8088/proxy/application_1415914904020_0015/ws/v1/slider/publisher/exports
+    
+    {
+
+      "exports": {
+        "servers": {
+            "description": "Servers",
+            "updated": 1415991500805,
+            "updatedTime": "Fri Nov 14 18:58:20 UTC 2014",
+            "entries": { },
+            "empty": true
+        },
+        "container_log_dirs": {
+            "description": "container_log_dirs",
+            "updated": 1415991500807,
+            "updatedTime": "Fri Nov 14 18:58:20 UTC 2014",
+            "entries": { },
+            "empty": true
+        },
+        "container_work_dirs": {
+            "description": "container_work_dirs",
+            "updated": 1415991500807,
+            "updatedTime": "Fri Nov 14 18:58:20 UTC 2014",
+            "entries": { },
+            "empty": true
+        }
+      }
+    }
+    
+    
+    GET http://c6403.ambari.apache.org:8088/proxy/application_1415914904020_0016/ws/v1/slider/publisher/exports/servers
+
+    {
+      "description": "Servers",
+      "updated": 1415991750794,
+      "updatedTime": "Fri Nov 14 19:02:30 UTC 2014",
+      "entries": {
+          "host_port": [
+              {
+                  "value": "c6403.ambari.apache.org:33387",
+                  "containerId": "container_1415914904020_0016_01_000002",
+                  "tag": "1",
+                  "level": "component",
+                  "updatedTime": "Fri Nov 14 19:02:30 UTC 2014"
+              }
+          ]
+      },
+      "empty": false
+    }
\ No newline at end of file