YARN-2300. Improved the documentation of the sample requests for RM REST API - submitting an app. Contributed by Varun Vasudev.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1612981 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhijie Shen 2014-07-24 03:12:45 +00:00
parent 9bfae42538
commit 06e5c5cb2d
2 changed files with 50 additions and 62 deletions

View File

@ -303,6 +303,9 @@ Release 2.5.0 - UNRELEASED
YARN-1408 Preemption caused Invalid State Event: ACQUIRED at KILLED and YARN-1408 Preemption caused Invalid State Event: ACQUIRED at KILLED and
caused a task timeout for 30mins. (Sunil G via mayank) caused a task timeout for 30mins. (Sunil G via mayank)
YARN-2300. Improved the documentation of the sample requests for RM REST API -
submitting an app. (Varun Vasudev via zjshen)
OPTIMIZATIONS OPTIMIZATIONS
BUG FIXES BUG FIXES

View File

@ -2228,68 +2228,48 @@ _01_000001</amContainerLogs>
{ {
"application-id":"application_1404203615263_0001", "application-id":"application_1404203615263_0001",
"application-name":"test", "application-name":"test",
"queue":"testqueue",
"priority":"3",
"am-container-spec": "am-container-spec":
{ {
"local-resources": "local-resources":
{ {
"entry": "entry":
[
{ {
"key":"example", "key":"AppMaster.jar",
"value": "value":
{ {
"resource":"http://www.test.com/file.txt", "resource":"hdfs://hdfs-namenode:9000/user/testuser/DistributedShell/demo-app/AppMaster.jar",
"type":"FILE", "type":"FILE",
"visibility":"APPLICATION", "visibility":"APPLICATION",
"size":"100", "size": "43004",
"timestamp":"1404203616003" "timestamp": "1405452071209"
} }
} }
]
},
"commands":
{
"command":"{{JAVA_HOME}}/bin/java -Xmx10m org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster --container_memory 10 --container_vcores 1 --num_containers 1 --priority 0 1><LOG_DIR>/AppMaster.stdout 2><LOG_DIR>/AppMaster.stderr"
}, },
"environment": "environment":
{
"entry":
{
"key":"APP_VAR",
"value":"ENV_SETTING"
}
},
"commands":
{
"command":"/bin/sleep 5"
},
"service-data":
{
"entry":
{
"key":"test",
"value":"dmFsdWUxMg"
}
},
"credentials":
{
"tokens":null,
"secrets":
{
"entry":
{
"key":"secret1",
"value":"c2VjcmV0MQ"
}
}
},
"application-acls":
{ {
"entry": "entry":
[ [
{ {
"key":"VIEW_APP", "key": "DISTRIBUTEDSHELLSCRIPTTIMESTAMP",
"value":"testuser3, testuser4" "value": "1405459400754"
}, },
{ {
"key":"MODIFY_APP", "key": "CLASSPATH",
"value":"testuser1, testuser2" "value": "{{CLASSPATH}}<CPS>./*<CPS>{{HADOOP_CONF_DIR}}<CPS>{{HADOOP_COMMON_HOME}}/share/hadoop/common/*<CPS>{{HADOOP_COMMON_HOME}}/share/hadoop/common/lib/*<CPS>{{HADOOP_HDFS_HOME}}/share/hadoop/hdfs/*<CPS>{{HADOOP_HDFS_HOME}}/share/hadoop/hdfs/lib/*<CPS>{{HADOOP_YARN_HOME}}/share/hadoop/yarn/*<CPS>{{HADOOP_YARN_HOME}}/share/hadoop/yarn/lib/*<CPS>./log4j.properties"
},
{
"key": "DISTRIBUTEDSHELLSCRIPTLEN",
"value": "6"
},
{
"key": "DISTRIBUTEDSHELLSCRIPTLOCATION",
"value": "hdfs://hdfs-namenode:9000/user/testuser/demo-app/shellCommands"
} }
] ]
} }
@ -2302,16 +2282,9 @@ _01_000001</amContainerLogs>
"vCores":"1" "vCores":"1"
}, },
"application-type":"YARN", "application-type":"YARN",
"keep-containers-across-application-attempts":"false", "keep-containers-across-application-attempts":"false"
"application-tags":
{
"tag":
[
"tag 2",
"tag1"
]
}
} }
+---+ +---+
Response Header: Response Header:
@ -2349,22 +2322,34 @@ _01_000001</amContainerLogs>
<entry> <entry>
<key>example</key> <key>example</key>
<value> <value>
<resource>http://www.test.com/file.txt</resource> <resource>hdfs://hdfs-namenode:9000/user/testuser/DistributedShell/demo-app/AppMaster.jar</resource>
<type>FILE</type> <type>FILE</type>
<visibility>APPLICATION</visibility> <visibility>APPLICATION</visibility>
<size>100</size> <size>43004</size>
<timestamp>1404204892877</timestamp> <timestamp>1405452071209</timestamp>
</value> </value>
</entry> </entry>
</local-resources> </local-resources>
<environment> <environment>
<entry> <entry>
<key>APP_VAR</key> <key>DISTRIBUTEDSHELLSCRIPTTIMESTAMP</key>
<value>ENV_SETTING</value> <value>1405459400754</value>
</entry>
<entry>
<key>CLASSPATH</key>
<value>{{CLASSPATH}}&lt;CPS&gt;./*&lt;CPS&gt;{{HADOOP_CONF_DIR}}&lt;CPS&gt;{{HADOOP_COMMON_HOME}}/share/hadoop/common/*&lt;CPS&gt;{{HADOOP_COMMON_HOME}}/share/hadoop/common/lib/*&lt;CPS&gt;{{HADOOP_HDFS_HOME}}/share/hadoop/hdfs/*&lt;CPS&gt;{{HADOOP_HDFS_HOME}}/share/hadoop/hdfs/lib/*&lt;CPS&gt;{{HADOOP_YARN_HOME}}/share/hadoop/yarn/*&lt;CPS&gt;{{HADOOP_YARN_HOME}}/share/hadoop/yarn/lib/*&lt;CPS&gt;./log4j.properties</value>
</entry>
<entry>
<key>DISTRIBUTEDSHELLSCRIPTLEN</key>
<value>6</value>
</entry>
<entry>
<key>DISTRIBUTEDSHELLSCRIPTLOCATION</key>
<value>hdfs://hdfs-namenode:9000/user/testuser/demo-app/shellCommands</value>
</entry> </entry>
</environment> </environment>
<commands> <commands>
<command>/bin/sleep 5</command> <command>{{JAVA_HOME}}/bin/java -Xmx10m org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster --container_memory 10 --container_vcores 1 --num_containers 1 --priority 0 1&gt;&lt;LOG_DIR&gt;/AppMaster.stdout 2&gt;&lt;LOG_DIR&gt;/AppMaster.stderr</command>
</commands> </commands>
<service-data> <service-data>
<entry> <entry>