Author: stevel
Date: Fri Feb  5 21:47:14 2016
New Revision: 1728735

URL: http://svn.apache.org/viewvc?rev=1728735&view=rev
Log:
slider token command

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

Modified: incubator/slider/site/trunk/content/docs/manpage.md
URL: 
http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/manpage.md?rev=1728735&r1=1728734&r2=1728735&view=diff
==============================================================================
--- incubator/slider/site/trunk/content/docs/manpage.md (original)
+++ incubator/slider/site/trunk/content/docs/manpage.md Fri Feb  5 21:47:14 2016
@@ -89,6 +89,25 @@ URL of the YARN resource manager
 Use the specific filesystem URI as an argument to the operation.
 
 
+<!--- ======================================================================= 
-->
+
+
+## Instance Naming
+
+Application instance names must:
+
+1. be at least one character long
+1. begin with a lower case letter
+1. All other characters must be in the range \[a-z,0-9,_]
+1. All upper case characters are converted to lower case
+ 
+Example valid names:
+
+    slider1
+    storm4
+    hbase_instance
+    accumulo_m1_tserve4
+
 
 <!--- ======================================================================= 
-->
 
@@ -417,7 +436,7 @@ and the principal to log in as. The file
 If the JVM does not support this length, the command will fail.
 The default value is to 256, as needed for the `AES256` encryption scheme.
 A JVM without the Java Cryptography Extensions installed does not support
-`--keylength 256`: Kerberos will not work Kerberos itself is configured to use
+a key length of 256 bits: Kerberos will unless configured to use
 an encryption scheme with a shorter key length.
 
 * `--secure`: fail if the command is not executed on a secure cluster.
@@ -427,11 +446,14 @@ Although there is a `--out outfile` opti
 (to `stderr`) and via log4j (to `stdout`). To get all the output, it is best
 to redirect both these output streams to the same file, and omit the `--out` 
option.
 
-    slider kdiag --keytab zk.service.keytab --principal zookeeper/devix@REALM 
> out.txt 2>&1
+    slider kdiag --keytab zk.service.keytab --principal 
zookeeper/devix.example.org@REALM > out.txt 2>&1
 
 For extra logging during the operation
 
 1. Set the environment variable `HADOOP_JAAS_DEBUG` to `true`.
+
+        export HADOOP_JAAS_DEBUG=true
+
 1. Edit the `log4j.properties` file for the slider client:
 
         log4j.logger.org.apache.hadoop.security=DEBUG
@@ -686,8 +708,7 @@ that can be obtained in the status opera
 ## Commands for testing
 
 
-These are clearly abnormal operations; they are here primarily for testing
--and documented for completeness.
+These operations are here primarily for testing.
 
 ### `kill-container <name> --id container-id`
 
@@ -710,22 +731,23 @@ Example
 
     slider am-suicide --exitcode 1 --wait 5000 -message "test"
 
-<!--- ======================================================================= 
-->
+### `tokens [--source <file>] [--out file] [--keytab <keytab> --principal 
<principal>]`
 
+Lists current delegation tokens, or, on a secure cluster creates new ones.
 
-## Instance Naming
+This is useful for testing
+the delegation token mechanism offered by Oozie, in which Oozie collects
+the tokens needed by slider, saves them to a file, then starts slider in
+with the environment variable `HADOOP_TOKEN_FILE_LOCATION` set to the location
+of this file. For ease of doing that, the bash command to set the property is
+printed.
 
-Application instance names must:
+For reference the tokens needed are:
 
-1. be at least one character long
-1. begin with a lower case letter
-1. All other characters must be in the range \[a-z,0-9,_]
-1. All upper case characters are converted to lower case
- 
-Example valid names:
+* An HDFS token.
+* A YARN client token to interact with the RM.
+* If the timeline server is enabled, a timeline server delegation token.
 
-    slider1
-    storm4
-    hbase_instance
-    accumulo_m1_tserve4
+If the `--keytab` and `--principal` arguments are supplied, then the 
credentials
+will be generated with the named principal logged in from the specific keytab.
 

Modified: 
incubator/slider/site/trunk/content/docs/slider_specs/writing_app_command_scripts.md
URL: 
http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/slider_specs/writing_app_command_scripts.md?rev=1728735&r1=1728734&r2=1728735&view=diff
==============================================================================
--- 
incubator/slider/site/trunk/content/docs/slider_specs/writing_app_command_scripts.md
 (original)
+++ 
incubator/slider/site/trunk/content/docs/slider_specs/writing_app_command_scripts.md
 Fri Feb  5 21:47:14 2016
@@ -21,12 +21,13 @@ App command implementations follow a sta
 
     python SCRIPT COMMAND JSON_FILE PACKAGE_ROOT STRUCTURED_OUT_FILE LOG_LEVEL
 
-* SCRIPT is the top level script that implements the commands for the 
component. 
-* COMMAND is one of the following default commands - START, STOP, INSTALL, 
CONFIG, RESTART, STATUS or any custom commands. 
-* JSON_FILE includes all configuration parameters and the values. 
-* PACKAGE_ROOT is the root folder of the package. From this folder, its 
possible to access files, scripts, templates, packages (e.g. tarballs), etc. 
The Yarn-App author has complete control over the structure of the package as 
long as the PACKAGE_ROOT and SCRIPT path is known to the management tool. 
-* STRUCTURED_OUT_FILE is the file where the script can output structured data. 
-* LOG_LEVEL is the log level to use when executing the script - Slider 
defaults to INFO, use other levels while debugging
+* `SCRIPT` is the top level script that implements the commands for the 
component. 
+* `COMMAND` is one of the following default commands - `START`, `STOP`, 
`INSTALL`, `CONFIG`, `RESTART`, `STATUS` or any custom commands. 
+* `JSON_FILE` includes all configuration parameters and the values. 
+* `PACKAGE_ROOT` is the root folder of the package. From this folder, its 
possible to access files, scripts, templates, packages (e.g. tarballs), etc.
+The Yarn-App author has complete control over the structure of the package as 
long as the `PACKAGE_ROOT` and `SCRIPT` path is known to the management tool. 
+* `STRUCTURED_OUT_FILE` is the file where the script can output structured 
data. 
+* `LOG_LEVEL` is the log level to use when executing the script - Slider 
defaults to INFO, use other levels while debugging
 
 The management infrastructure is expected to automatically reports back 
STD_OUT and STD_ERR.
 
@@ -70,7 +71,8 @@ The parameters are organized as multi-la
 
 
 ### Sample configuration parameters
-While a script can access all the config parameters the key property bags are 
**hostLevelParams** and **configurations**.
+
+While a script can access all the config parameters the key property bags are 
**`hostLevelParams`** and **`configurations`**.
  
 
     {
@@ -173,10 +175,10 @@ A command script essentially implements
 
 At this point, you are free to implement as you wish. Slider provides a rich 
library for basic operations needed for application commands. So the structure 
we suggest is:
 
-* Create a params.py file to read the json config file into variables. This 
will allow you to provide initial validation, provide default values, or create 
complex values
+* Create a `params.py` file to read the json config file into variables. This 
will allow you to provide initial validation, provide default values, or create 
complex values
 * Use the above parameters in your scripts
 
-A params.py file may be as follows:
+A `params.py` file may be as follows:
 
 
     from resource_management import *


Reply via email to