Page MenuHomec4science

NodeManagerRest.html
No OneTemporary

File Metadata

Created
Tue, Feb 25, 08:53

NodeManagerRest.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia at 2014-02-11 -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Apache Hadoop 2.3.0 - NodeManager REST API's.</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="Date-Revision-yyyymmdd" content="20140211" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body class="composite">
<div id="banner">
<a href="http://hadoop.apache.org/" id="bannerLeft">
<img src="http://hadoop.apache.org/images/hadoop-logo.jpg" alt="" />
</a>
<a href="http://www.apache.org/" id="bannerRight">
<img src="http://www.apache.org/images/asf_logo_wide.png" alt="" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<a href="http://www.apache.org/" class="externalLink">Apache</a>
&gt;
<a href="http://hadoop.apache.org/" class="externalLink">Hadoop</a>
&gt;
<a href="../">hadoop-yarn</a>
&gt;
Apache Hadoop 2.3.0
</div>
<div class="xright"> <a href="http://wiki.apache.org/hadoop" class="externalLink">Wiki</a>
|
<a href="https://svn.apache.org/repos/asf/hadoop/" class="externalLink">SVN</a>
|
<a href="http://hadoop.apache.org/" class="externalLink">Apache Hadoop</a>
&nbsp;| Last Published: 2014-02-11
&nbsp;| Version: 2.3.0
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>General</h5>
<ul>
<li class="none">
<a href="../../index.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/SingleCluster.html">Single Node Setup</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/ClusterSetup.html">Cluster Setup</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CommandsManual.html">Hadoop Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/FileSystemShell.html">File System Shell</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Compatibility.html">Hadoop Compatibility</a>
</li>
</ul>
<h5>Common</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CLIMiniCluster.html">CLI Mini Cluster</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/NativeLibraries.html">Native Libraries</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Superusers.html">Superusers</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/SecureMode.html">Secure Mode</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/ServiceLevelAuth.html">Service Level Authorization</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/HttpAuthentication.html">HTTP Authentication</a>
</li>
</ul>
<h5>HDFS</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html">HDFS User Guide</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithQJM.html">High Availability With QJM</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html">High Availability With NFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/Federation.html">Federation</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html">HDFS Snapshots</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsDesign.html">HDFS Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsEditsViewer.html">Edits Viewer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsImageViewer.html">Image Viewer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html">Permissions and HDFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsQuotaAdminGuide.html">Quotas and HDFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/Hftp.html">HFTP</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/LibHdfs.html">C API libhdfs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/WebHDFS.html">WebHDFS REST API</a>
</li>
<li class="none">
<a href="../../hadoop-hdfs-httpfs/index.html">HttpFS Gateway</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ShortCircuitLocalReads.html">Short Circuit Local Reads</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/CentralizedCacheManagement.html">Centralized Cache Management</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsNfsGateway.html">HDFS NFS Gateway</a>
</li>
</ul>
<h5>MapReduce</h5>
<ul>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html">Compatibilty between Hadoop 1.x and Hadoop 2.x</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/EncryptedShuffle.html">Encrypted Shuffle</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/PluggableShuffleAndPluggableSort.html">Pluggable Shuffle/Sort</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/DistributedCacheDeploy.html">Distributed Cache Deploy</a>
</li>
</ul>
<h5>YARN</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YARN.html">YARN Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html">Writing YARN Applications</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/CapacityScheduler.html">Capacity Scheduler</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/FairScheduler.html">Fair Scheduler</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WebApplicationProxy.html">Web Application Proxy</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YarnCommands.html">YARN Commands</a>
</li>
<li class="none">
<a href="../../hadoop-sls/SchedulerLoadSimulator.html">Scheduler Load Simulator</a>
</li>
</ul>
<h5>YARN REST APIs</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WebServicesIntro.html">Introduction</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html">Resource Manager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeManagerRest.html">Node Manager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/MapredAppMasterRest.html">MR Application Master</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/HistoryServerRest.html">History Server</a>
</li>
</ul>
<h5>Auth</h5>
<ul>
<li class="none">
<a href="../../hadoop-auth/index.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-auth/Examples.html">Examples</a>
</li>
<li class="none">
<a href="../../hadoop-auth/Configuration.html">Configuration</a>
</li>
<li class="none">
<a href="../../hadoop-auth/BuildingIt.html">Building</a>
</li>
</ul>
<h5>Reference</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/releasenotes.html">Release Notes</a>
</li>
<li class="none">
<a href="../../api/index.html">API docs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CHANGES.txt">Common CHANGES.txt</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/CHANGES.txt">HDFS CHANGES.txt</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-mapreduce/CHANGES.txt">MapReduce CHANGES.txt</a>
</li>
</ul>
<h5>Configuration</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/core-default.xml">core-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/hdfs-default.xml">hdfs-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml">mapred-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-common/yarn-default.xml">yarn-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/DeprecatedProperties.html">Deprecated Properties</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img alt="Built by Maven" src="./images/logos/maven-feather.png"/>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<!-- Licensed under the Apache License, Version 2.0 (the "License"); --><!-- you may not use this file except in compliance with the License. --><!-- You may obtain a copy of the License at --><!-- --><!-- http://www.apache.org/licenses/LICENSE-2.0 --><!-- --><!-- Unless required by applicable law or agreed to in writing, software --><!-- distributed under the License is distributed on an "AS IS" BASIS, --><!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --><!-- See the License for the specific language governing permissions and --><!-- limitations under the License. See accompanying LICENSE file. --><div class="section">
<h2>NodeManager REST API's.<a name="NodeManager_REST_APIs."></a></h2>
<p>[ <a href="./index.html">Go Back</a> ]</p>
<ul>
<li><a href="#NodeManager_REST_APIs.">NodeManager REST API's.</a>
<ul>
<li><a href="#Overview">Overview</a></li>
<li><a href="#NodeManager_Information_API">NodeManager Information API</a></li>
<li><a href="#Applications_API">Applications API</a></li>
<li><a href="#Application_API">Application API</a></li>
<li><a href="#Containers_API">Containers API</a></li>
<li><a href="#Container_API">Container API</a></li></ul></li></ul>
<div class="section">
<h3>Overview<a name="Overview"></a></h3>
<p>The NodeManager REST API's allow the user to get status on the node and information about applications and containers running on that node. </p></div>
<div class="section">
<h3>NodeManager Information API<a name="NodeManager_Information_API"></a></h3>
<p>The node information resource provides overall information about that particular node.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<p>Both of the following URI's give you the cluster information.</p>
<div>
<pre> * http://&lt;nm http address:port&gt;/ws/v1/node
* http://&lt;nm http address:port&gt;/ws/v1/node/info</pre></div></div>
<div class="section">
<h4>HTTP Operations Supported<a name="HTTP_Operations_Supported"></a></h4>
<div>
<pre> * GET</pre></div></div>
<div class="section">
<h4>Query Parameters Supported<a name="Query_Parameters_Supported"></a></h4>
<div>
<pre> None</pre></div></div>
<div class="section">
<h4>Elements of the <i>nodeInfo</i> object<a name="Elements_of_the_nodeInfo_object"></a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">id</td>
<td align="left">long</td>
<td align="left">The NodeManager id</td></tr>
<tr class="a">
<td align="left">nodeHostName</td>
<td align="left">string</td>
<td align="left">The host name of the NodeManager</td></tr>
<tr class="b">
<td align="left">totalPmemAllocatedContainersMB</td>
<td align="left">long</td>
<td align="left">The amount of physical memory allocated for use by containers in MB</td></tr>
<tr class="a">
<td align="left">totalVmemAllocatedContainersMB</td>
<td align="left">long</td>
<td align="left">The amount of virtual memory allocated for use by containers in MB</td></tr>
<tr class="b">
<td align="left">lastNodeUpdateTime</td>
<td align="left">long</td>
<td align="left">The last timestamp at which the health report was received (in ms since epoch)</td></tr>
<tr class="a">
<td align="left">healthReport</td>
<td align="left">string</td>
<td align="left">The diagnostic health report of the node</td></tr>
<tr class="b">
<td align="left">nodeHealthy</td>
<td align="left">boolean</td>
<td align="left">true/false indicator of if the node is healthy</td></tr>
<tr class="a">
<td align="left">nodeManagerVersion</td>
<td align="left">string</td>
<td align="left">Version of the NodeManager</td></tr>
<tr class="b">
<td align="left">nodeManagerBuildVersion</td>
<td align="left">string</td>
<td align="left">NodeManager build string with build version, user, and checksum</td></tr>
<tr class="a">
<td align="left">nodeManagerVersionBuiltOn</td>
<td align="left">string</td>
<td align="left">Timestamp when NodeManager was built(in ms since epoch)</td></tr>
<tr class="b">
<td align="left">hadoopVersion</td>
<td align="left">string</td>
<td align="left">Version of hadoop common</td></tr>
<tr class="a">
<td align="left">hadoopBuildVersion</td>
<td align="left">string</td>
<td align="left">Hadoop common build string with build version, user, and checksum</td></tr>
<tr class="b">
<td align="left">hadoopVersionBuiltOn</td>
<td align="left">string</td>
<td align="left">Timestamp when hadoop common was built(in ms since epoch)</td></tr></table></div>
<div class="section">
<h4>Response Examples<a name="Response_Examples"></a></h4>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;nm http address:port&gt;/ws/v1/node/info</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>{
&quot;nodeInfo&quot; : {
&quot;hadoopVersionBuiltOn&quot; : &quot;Mon Jan 9 14:58:42 UTC 2012&quot;,
&quot;nodeManagerBuildVersion&quot; : &quot;0.23.1-SNAPSHOT from 1228355 by user1 source checksum 20647f76c36430e888cc7204826a445c&quot;,
&quot;lastNodeUpdateTime&quot; : 1326222266126,
&quot;totalVmemAllocatedContainersMB&quot; : 17203,
&quot;nodeHealthy&quot; : true,
&quot;healthReport&quot; : &quot;&quot;,
&quot;totalPmemAllocatedContainersMB&quot; : 8192,
&quot;nodeManagerVersionBuiltOn&quot; : &quot;Mon Jan 9 15:01:59 UTC 2012&quot;,
&quot;nodeManagerVersion&quot; : &quot;0.23.1-SNAPSHOT&quot;,
&quot;id&quot; : &quot;host.domain.com:8041&quot;,
&quot;hadoopBuildVersion&quot; : &quot;0.23.1-SNAPSHOT from 1228292 by user1 source checksum 3eba233f2248a089e9b28841a784dd00&quot;,
&quot;nodeHostName&quot; : &quot;host.domain.com&quot;,
&quot;hadoopVersion&quot; : &quot;0.23.1-SNAPSHOT&quot;
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> Accept: application/xml
GET http://&lt;nm http address:port&gt;/ws/v1/node/info</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 983
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;nodeInfo&gt;
&lt;healthReport/&gt;
&lt;totalVmemAllocatedContainersMB&gt;17203&lt;/totalVmemAllocatedContainersMB&gt;
&lt;totalPmemAllocatedContainersMB&gt;8192&lt;/totalPmemAllocatedContainersMB&gt;
&lt;lastNodeUpdateTime&gt;1326222386134&lt;/lastNodeUpdateTime&gt;
&lt;nodeHealthy&gt;true&lt;/nodeHealthy&gt;
&lt;nodeManagerVersion&gt;0.23.1-SNAPSHOT&lt;/nodeManagerVersion&gt;
&lt;nodeManagerBuildVersion&gt;0.23.1-SNAPSHOT from 1228355 by user1 source checksum 20647f76c36430e888cc7204826a445c&lt;/nodeManagerBuildVersion&gt;
&lt;nodeManagerVersionBuiltOn&gt;Mon Jan 9 15:01:59 UTC 2012&lt;/nodeManagerVersionBuiltOn&gt;
&lt;hadoopVersion&gt;0.23.1-SNAPSHOT&lt;/hadoopVersion&gt;
&lt;hadoopBuildVersion&gt;0.23.1-SNAPSHOT from 1228292 by user1 source checksum 3eba233f2248a089e9b28841a784dd00&lt;/hadoopBuildVersion&gt;
&lt;hadoopVersionBuiltOn&gt;Mon Jan 9 14:58:42 UTC 2012&lt;/hadoopVersionBuiltOn&gt;
&lt;id&gt;host.domain.com:8041&lt;/id&gt;
&lt;nodeHostName&gt;host.domain.com&lt;/nodeHostName&gt;
&lt;/nodeInfo&gt;</pre></div></div></div>
<div class="section">
<h3>Applications API<a name="Applications_API"></a></h3>
<p>With the Applications API, you can obtain a collection of resources, each of which represents an application. When you run a GET operation on this resource, you obtain a collection of Application Objects. See also <a href="#Application_API">Application API</a> for syntax of the application object.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<div>
<pre> * http://&lt;nm http address:port&gt;/ws/v1/node/apps</pre></div></div>
<div class="section">
<h4>HTTP Operations Supported <a name="HTTP_Operations_Supported"></a></h4>
<div>
<pre> * GET</pre></div></div>
<div class="section">
<h4>Query Parameters Supported<a name="Query_Parameters_Supported"></a></h4>
<p>Multiple paramters can be specified. </p>
<div>
<pre> * state - application state
* user - user name</pre></div></div>
<div class="section">
<h4>Elements of the <i>apps</i> (Applications) object<a name="Elements_of_the_apps_Applications_object"></a></h4>
<p>When you make a request for the list of applications, the information will be returned as a collection of app objects. See also <a href="#Application_API">Application API</a> for syntax of the app object.</p>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">app</td>
<td align="left">array of app objects(JSON)/zero or more app objects(XML)</td>
<td align="left">A collection of application objects</td></tr></table></div>
<div class="section">
<h4>Response Examples<a name="Response_Examples"></a></h4>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;nm http address:port&gt;/ws/v1/node/apps</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>{
&quot;apps&quot; : {
&quot;app&quot; : [
{
&quot;containerids&quot; : [
&quot;container_1326121700862_0003_01_000001&quot;,
&quot;container_1326121700862_0003_01_000002&quot;
],
&quot;user&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;application_1326121700862_0003&quot;,
&quot;state&quot; : &quot;RUNNING&quot;
},
{
&quot;user&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;application_1326121700862_0002&quot;,
&quot;state&quot; : &quot;FINISHED&quot;
}
]
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;nm http address:port&gt;/ws/v1/node/apps
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 400
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;apps&gt;
&lt;app&gt;
&lt;id&gt;application_1326121700862_0002&lt;/id&gt;
&lt;state&gt;FINISHED&lt;/state&gt;
&lt;user&gt;user1&lt;/user&gt;
&lt;/app&gt;
&lt;app&gt;
&lt;id&gt;application_1326121700862_0003&lt;/id&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;user&gt;user1&lt;/user&gt;
&lt;containerids&gt;container_1326121700862_0003_01_000002&lt;/containerids&gt;
&lt;containerids&gt;container_1326121700862_0003_01_000001&lt;/containerids&gt;
&lt;/app&gt;
&lt;/apps&gt;
</pre></div></div></div>
<div class="section">
<h3><a name="Application_API">Application API</a></h3>
<p>An application resource contains information about a particular application that was run or is running on this NodeManager.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<p>Use the following URI to obtain an app Object, for a application identified by the <a name="appid">appid</a> value. </p>
<div>
<pre> * http://&lt;nm http address:port&gt;/ws/v1/node/apps/{appid}</pre></div></div>
<div class="section">
<h4>HTTP Operations Supported <a name="HTTP_Operations_Supported"></a></h4>
<div>
<pre> * GET</pre></div></div>
<div class="section">
<h4>Query Parameters Supported<a name="Query_Parameters_Supported"></a></h4>
<div>
<pre> None</pre></div></div>
<div class="section">
<h4>Elements of the <i>app</i> (Application) object<a name="Elements_of_the_app_Application_object"></a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">id</td>
<td align="left">string</td>
<td align="left">The application id</td></tr>
<tr class="a">
<td align="left">user</td>
<td align="left">string</td>
<td align="left">The user who started the application</td></tr>
<tr class="b">
<td align="left">state</td>
<td align="left">string</td>
<td align="left">The state of the application - valid states are: NEW, INITING, RUNNING, FINISHING_CONTAINERS_WAIT, APPLICATION_RESOURCES_CLEANINGUP, FINISHED</td></tr>
<tr class="a">
<td align="left">containerids</td>
<td align="left">array of containerids(JSON)/zero or more containerids(XML)</td>
<td align="left">The list of containerids currently being used by the application on this node. If not present then no containers are currently running for this application.</td></tr></table></div>
<div class="section">
<h4>Response Examples<a name="Response_Examples"></a></h4>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;nm http address:port&gt;/ws/v1/node/apps/application_1326121700862_0005</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>{
&quot;app&quot; : {
&quot;containerids&quot; : [
&quot;container_1326121700862_0005_01_000003&quot;,
&quot;container_1326121700862_0005_01_000001&quot;
],
&quot;user&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;application_1326121700862_0005&quot;,
&quot;state&quot; : &quot;RUNNING&quot;
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;nm http address:port&gt;/ws/v1/node/apps/application_1326121700862_0005
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 281
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;app&gt;
&lt;id&gt;application_1326121700862_0005&lt;/id&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;user&gt;user1&lt;/user&gt;
&lt;containerids&gt;container_1326121700862_0005_01_000003&lt;/containerids&gt;
&lt;containerids&gt;container_1326121700862_0005_01_000001&lt;/containerids&gt;
&lt;/app&gt;</pre></div></div></div>
<div class="section">
<h3>Containers API<a name="Containers_API"></a></h3>
<p>With the containers API, you can obtain a collection of resources, each of which represents a container. When you run a GET operation on this resource, you obtain a collection of Container Objects. See also <a href="#Container_API">Container API</a> for syntax of the container object.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<div>
<pre> * http://&lt;nm http address:port&gt;/ws/v1/node/containers</pre></div></div>
<div class="section">
<h4>HTTP Operations Supported <a name="HTTP_Operations_Supported"></a></h4>
<div>
<pre> * GET</pre></div></div>
<div class="section">
<h4>Query Parameters Supported<a name="Query_Parameters_Supported"></a></h4>
<div>
<pre> None</pre></div></div>
<div class="section">
<h4>Elements of the <i>containers</i> object<a name="Elements_of_the_containers_object"></a></h4>
<p>When you make a request for the list of containers, the information will be returned as collection of container objects. See also <a href="#Container_API">Container API</a> for syntax of the container object.</p>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">containers</td>
<td align="left">array of container objects(JSON)/zero or more container objects(XML)</td>
<td align="left">A collection of container objects</td></tr></table></div>
<div class="section">
<h4>Response Examples<a name="Response_Examples"></a></h4>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;nm http address:port&gt;/ws/v1/node/containers</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>{
&quot;containers&quot; : {
&quot;container&quot; : [
{
&quot;nodeId&quot; : &quot;host.domain.com:8041&quot;,
&quot;totalMemoryNeededMB&quot; : 2048,
&quot;state&quot; : &quot;RUNNING&quot;,
&quot;diagnostics&quot; : &quot;&quot;,
&quot;containerLogsLink&quot; : &quot;http://host.domain.com:8042/node/containerlogs/container_1326121700862_0006_01_000001/user1&quot;,
&quot;user&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;container_1326121700862_0006_01_000001&quot;,
&quot;exitCode&quot; : -1000
},
{
&quot;nodeId&quot; : &quot;host.domain.com:8041&quot;,
&quot;totalMemoryNeededMB&quot; : 2048,
&quot;state&quot; : &quot;RUNNING&quot;,
&quot;diagnostics&quot; : &quot;&quot;,
&quot;containerLogsLink&quot; : &quot;http://host.domain.com:8042/node/containerlogs/container_1326121700862_0006_01_000003/user1&quot;,
&quot;user&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;container_1326121700862_0006_01_000003&quot;,
&quot;exitCode&quot; : -1000
}
]
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;nm http address:port&gt;/ws/v1/node/containers
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 988
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;containers&gt;
&lt;container&gt;
&lt;id&gt;container_1326121700862_0006_01_000001&lt;/id&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;exitCode&gt;-1000&lt;/exitCode&gt;
&lt;diagnostics/&gt;
&lt;user&gt;user1&lt;/user&gt;
&lt;totalMemoryNeededMB&gt;2048&lt;/totalMemoryNeededMB&gt;
&lt;containerLogsLink&gt;http://host.domain.com:8042/node/containerlogs/container_1326121700862_0006_01_000001/user1&lt;/containerLogsLink&gt;
&lt;nodeId&gt;host.domain.com:8041&lt;/nodeId&gt;
&lt;/container&gt;
&lt;container&gt;
&lt;id&gt;container_1326121700862_0006_01_000003&lt;/id&gt;
&lt;state&gt;DONE&lt;/state&gt;
&lt;exitCode&gt;0&lt;/exitCode&gt;
&lt;diagnostics&gt;Container killed by the ApplicationMaster.&lt;/diagnostics&gt;
&lt;user&gt;user1&lt;/user&gt;
&lt;totalMemoryNeededMB&gt;2048&lt;/totalMemoryNeededMB&gt;
&lt;containerLogsLink&gt;http://host.domain.com:8042/node/containerlogs/container_1326121700862_0006_01_000003/user1&lt;/containerLogsLink&gt;
&lt;nodeId&gt;host.domain.com:8041&lt;/nodeId&gt;
&lt;/container&gt;
&lt;/containers&gt;</pre></div></div></div>
<div class="section">
<h3><a name="Container_API">Container API</a></h3>
<p>A container resource contains information about a particular container that is running on this NodeManager.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<p>Use the following URI to obtain a Container Object, from a container identified by the <a name="containerid">containerid</a> value. </p>
<div>
<pre> * http://&lt;nm http address:port&gt;/ws/v1/node/containers/{containerid}</pre></div></div>
<div class="section">
<h4>HTTP Operations Supported <a name="HTTP_Operations_Supported"></a></h4>
<div>
<pre> * GET</pre></div></div>
<div class="section">
<h4>Query Parameters Supported<a name="Query_Parameters_Supported"></a></h4>
<div>
<pre> None</pre></div></div>
<div class="section">
<h4>Elements of the <i>container</i> object<a name="Elements_of_the_container_object"></a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">id</td>
<td align="left">string</td>
<td align="left">The container id</td></tr>
<tr class="a">
<td align="left">state</td>
<td align="left">string</td>
<td align="left">State of the container - valid states are: NEW, LOCALIZING, LOCALIZATION_FAILED, LOCALIZED, RUNNING, EXITED_WITH_SUCCESS, EXITED_WITH_FAILURE, KILLING, CONTAINER_CLEANEDUP_AFTER_KILL, CONTAINER_RESOURCES_CLEANINGUP, DONE</td></tr>
<tr class="b">
<td align="left">nodeId</td>
<td align="left">string</td>
<td align="left">The id of the node the container is on</td></tr>
<tr class="a">
<td align="left">containerLogsLink</td>
<td align="left">string</td>
<td align="left">The http link to the container logs</td></tr>
<tr class="b">
<td align="left">user</td>
<td align="left">string</td>
<td align="left">The user name of the user which started the container</td></tr>
<tr class="a">
<td align="left">exitCode</td>
<td align="left">int</td>
<td align="left">Exit code of the container</td></tr>
<tr class="b">
<td align="left">diagnostics</td>
<td align="left">string</td>
<td align="left">A diagnostic message for failed containers</td></tr>
<tr class="a">
<td align="left">totalMemoryNeededMB</td>
<td align="left">long</td>
<td align="left">Total amout of memory needed by the container (in MB)</td></tr></table></div>
<div class="section">
<h4>Response Examples<a name="Response_Examples"></a></h4>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;nm http address:port&gt;/ws/v1/nodes/containers/container_1326121700862_0007_01_000001</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>{
&quot;container&quot; : {
&quot;nodeId&quot; : &quot;host.domain.com:8041&quot;,
&quot;totalMemoryNeededMB&quot; : 2048,
&quot;state&quot; : &quot;RUNNING&quot;,
&quot;diagnostics&quot; : &quot;&quot;,
&quot;containerLogsLink&quot; : &quot;http://host.domain.com:8042/node/containerlogs/container_1326121700862_0007_01_000001/user1&quot;,
&quot;user&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;container_1326121700862_0007_01_000001&quot;,
&quot;exitCode&quot; : -1000
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;nm http address:port&gt;/ws/v1/node/containers/container_1326121700862_0007_01_000001
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 491
Server: Jetty(6.1.26)</pre></div>
<p>Response Body:</p>
<div class="source">
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;container&gt;
&lt;id&gt;container_1326121700862_0007_01_000001&lt;/id&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;exitCode&gt;-1000&lt;/exitCode&gt;
&lt;diagnostics/&gt;
&lt;user&gt;user1&lt;/user&gt;
&lt;totalMemoryNeededMB&gt;2048&lt;/totalMemoryNeededMB&gt;
&lt;containerLogsLink&gt;http://host.domain.com:8042/node/containerlogs/container_1326121700862_0007_01_000001/user1&lt;/containerLogsLink&gt;
&lt;nodeId&gt;host.domain.com:8041&lt;/nodeId&gt;
&lt;/container&gt;</pre></div></div></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">&#169; 2014
Apache Software Foundation
- <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a></div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>

Event Timeline