Page MenuHomec4science

ResourceManagerRest.html
No OneTemporary

File Metadata

Created
Tue, Feb 25, 19:22

ResourceManagerRest.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 - ResourceManager 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>ResourceManager REST API's.<a name="ResourceManager_REST_APIs."></a></h2>
<p>[ <a href="./index.html">Go Back</a> ]</p>
<ul>
<li><a href="#ResourceManager_REST_APIs.">ResourceManager REST API's.</a>
<ul>
<li><a href="#Overview">Overview</a></li>
<li><a href="#Cluster_Information_API">Cluster Information API</a></li>
<li><a href="#Cluster_Metrics_API">Cluster Metrics API</a></li>
<li><a href="#Cluster_Scheduler_API">Cluster Scheduler API</a></li>
<li><a href="#Cluster_Applications_API">Cluster Applications API</a></li>
<li><a href="#Cluster_Application_Statistics_API">Cluster Application Statistics API</a></li>
<li><a href="#Cluster_Application_API">Cluster Application API</a></li>
<li><a href="#Cluster_Application_Attempts_API">Cluster Application Attempts API</a></li>
<li><a href="#Cluster_Nodes_API">Cluster Nodes API</a></li>
<li><a href="#Cluster_Node_API">Cluster Node API</a></li></ul></li></ul>
<div class="section">
<h3>Overview<a name="Overview"></a></h3>
<p>The ResourceManager REST API's allow the user to get information about the cluster - status on the cluster, metrics on the cluster, scheduler information, information about nodes in the cluster, and information about applications on the cluster.</p></div>
<div class="section">
<h3>Cluster Information API<a name="Cluster_Information_API"></a></h3>
<p>The cluster information resource provides overall information about the cluster. </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;rm http address:port&gt;/ws/v1/cluster
* http://&lt;rm http address:port&gt;/ws/v1/cluster/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>clusterInfo</i> object<a name="Elements_of_the_clusterInfo_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 cluster id</td></tr>
<tr class="a">
<td align="left">startedOn</td>
<td align="left">long</td>
<td align="left">The time the cluster started (in ms since epoch)</td></tr>
<tr class="b">
<td align="left">state</td>
<td align="left">string</td>
<td align="left">The ResourceManager state - valid values are: NOTINITED, INITED, STARTED, STOPPED</td></tr>
<tr class="a">
<td align="left">haState</td>
<td align="left">string</td>
<td align="left">The ResourceManager HA state - valid values are: INITIALIZING, ACTIVE, STANDBY, STOPPED</td></tr>
<tr class="b">
<td align="left">resourceManagerVersion</td>
<td align="left">string</td>
<td align="left">Version of the ResourceManager</td></tr>
<tr class="a">
<td align="left">resourceManagerBuildVersion</td>
<td align="left">string</td>
<td align="left">ResourceManager build string with build version, user, and checksum</td></tr>
<tr class="b">
<td align="left">resourceManagerVersionBuiltOn</td>
<td align="left">string</td>
<td align="left">Timestamp when ResourceManager was built (in ms since epoch)</td></tr>
<tr class="a">
<td align="left">hadoopVersion</td>
<td align="left">string</td>
<td align="left">Version of hadoop common</td></tr>
<tr class="b">
<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="a">
<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;rm http address:port&gt;/ws/v1/cluster/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;clusterInfo&quot;:
{
&quot;id&quot;:1324053971963,
&quot;startedOn&quot;:1324053971963,
&quot;state&quot;:&quot;STARTED&quot;,
&quot;resourceManagerVersion&quot;:&quot;0.23.1-SNAPSHOT&quot;,
&quot;resourceManagerBuildVersion&quot;:&quot;0.23.1-SNAPSHOT from 1214049 by user1 source checksum 050cd664439d931c8743a6428fd6a693&quot;,
&quot;resourceManagerVersionBuiltOn&quot;:&quot;Tue Dec 13 22:12:48 CST 2011&quot;,
&quot;hadoopVersion&quot;:&quot;0.23.1-SNAPSHOT&quot;,
&quot;hadoopBuildVersion&quot;:&quot;0.23.1-SNAPSHOT from 1214049 by user1 source checksum 11458df3bb77342dca5f917198fad328&quot;,
&quot;hadoopVersionBuiltOn&quot;:&quot;Tue Dec 13 22:12:26 CST 2011&quot;
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> Accept: application/xml
GET http://&lt;rm http address:port&gt;/ws/v1/cluster/info</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 712
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;clusterInfo&gt;
&lt;id&gt;1324053971963&lt;/id&gt;
&lt;startedOn&gt;1324053971963&lt;/startedOn&gt;
&lt;state&gt;STARTED&lt;/state&gt;
&lt;resourceManagerVersion&gt;0.23.1-SNAPSHOT&lt;/resourceManagerVersion&gt;
&lt;resourceManagerBuildVersion&gt;0.23.1-SNAPSHOT from 1214049 by user1 source checksum 050cd664439d931c8743a6428fd6a693&lt;/resourceManagerBuildVersion&gt;
&lt;resourceManagerVersionBuiltOn&gt;Tue Dec 13 22:12:48 CST 2011&lt;/resourceManagerVersionBuiltOn&gt;
&lt;hadoopVersion&gt;0.23.1-SNAPSHOT&lt;/hadoopVersion&gt;
&lt;hadoopBuildVersion&gt;0.23.1-SNAPSHOT from 1214049 by user1 source checksum 11458df3bb77342dca5f917198fad328&lt;/hadoopBuildVersion&gt;
&lt;hadoopVersionBuiltOn&gt;Tue Dec 13 22:12:48 CST 2011&lt;/hadoopVersionBuiltOn&gt;
&lt;/clusterInfo&gt;</pre></div></div></div>
<div class="section">
<h3>Cluster Metrics API<a name="Cluster_Metrics_API"></a></h3>
<p>The cluster metrics resource provides some overall metrics about the cluster. More detailed metrics should be retrieved from the jmx interface.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<div>
<pre> * http://&lt;rm http address:port&gt;/ws/v1/cluster/metrics</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>clusterMetrics</i> object<a name="Elements_of_the_clusterMetrics_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">appsSubmitted</td>
<td align="left">int</td>
<td align="left">The number of applications submitted</td></tr>
<tr class="a">
<td align="left">appsCompleted</td>
<td align="left">int</td>
<td align="left">The number of applications completed</td></tr>
<tr class="b">
<td align="left">appsPending</td>
<td align="left">int</td>
<td align="left">The number of applications pending</td></tr>
<tr class="a">
<td align="left">appsRunning</td>
<td align="left">int</td>
<td align="left">The number of applications running</td></tr>
<tr class="b">
<td align="left">appsFailed</td>
<td align="left">int</td>
<td align="left">The number of applications failed</td></tr>
<tr class="a">
<td align="left">appsKilled</td>
<td align="left">int</td>
<td align="left">The number of applications killed</td></tr>
<tr class="b">
<td align="left">reservedMB</td>
<td align="left">long</td>
<td align="left">The amount of memory reserved in MB</td></tr>
<tr class="a">
<td align="left">availableMB</td>
<td align="left">long</td>
<td align="left">The amount of memory available in MB</td></tr>
<tr class="b">
<td align="left">allocatedMB</td>
<td align="left">long</td>
<td align="left">The amount of memory allocated in MB</td></tr>
<tr class="a">
<td align="left">totalMB</td>
<td align="left">long</td>
<td align="left">The amount of total memory in MB</td></tr>
<tr class="b">
<td align="left">containersAllocated</td>
<td align="left">int</td>
<td align="left">The number of containers allocated</td></tr>
<tr class="a">
<td align="left">containersReserved</td>
<td align="left">int</td>
<td align="left">The number of containers reserved</td></tr>
<tr class="b">
<td align="left">containersPending</td>
<td align="left">int</td>
<td align="left">The number of containers pending</td></tr>
<tr class="a">
<td align="left">totalNodes</td>
<td align="left">int</td>
<td align="left">The total number of nodes</td></tr>
<tr class="b">
<td align="left">activeNodes</td>
<td align="left">int</td>
<td align="left">The number of active nodes</td></tr>
<tr class="a">
<td align="left">lostNodes</td>
<td align="left">int</td>
<td align="left">The number of lost nodes</td></tr>
<tr class="b">
<td align="left">unhealthyNodes</td>
<td align="left">int</td>
<td align="left">The number of unhealthy nodes</td></tr>
<tr class="a">
<td align="left">decommissionedNodes</td>
<td align="left">int</td>
<td align="left">The number of nodes decommissioned</td></tr>
<tr class="b">
<td align="left">rebootedNodes</td>
<td align="left">int</td>
<td align="left">The number of nodes rebooted</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;rm http address:port&gt;/ws/v1/cluster/metrics</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;clusterMetrics&quot;:{
&quot;appsSubmitted&quot;:0,
&quot;appsCompleted&quot;:0,
&quot;appsPending&quot;:0,
&quot;appsRunning&quot;:0,
&quot;appsFailed&quot;:0,
&quot;appsKilled&quot;:0,
&quot;reservedMB&quot;:0,
&quot;availableMB&quot;:17408,
&quot;allocatedMB&quot;:0,
&quot;containersAllocated&quot;:0,
&quot;containersReserved&quot;:0,
&quot;containersPending&quot;:0,
&quot;totalMB&quot;:17408,
&quot;totalNodes&quot;:1,
&quot;lostNodes&quot;:0,
&quot;unhealthyNodes&quot;:0,
&quot;decommissionedNodes&quot;:0,
&quot;rebootedNodes&quot;:0,
&quot;activeNodes&quot;:1
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/metrics
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 432
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;clusterMetrics&gt;
&lt;appsSubmitted&gt;0&lt;/appsSubmitted&gt;
&lt;appsCompleted&gt;0&lt;/appsCompleted&gt;
&lt;appsPending&gt;0&lt;/appsPending&gt;
&lt;appsRunning&gt;0&lt;/appsRunning&gt;
&lt;appsFailed&gt;0&lt;/appsFailed&gt;
&lt;appsKilled&gt;0&lt;/appsKilled&gt;
&lt;reservedMB&gt;0&lt;/reservedMB&gt;
&lt;availableMB&gt;17408&lt;/availableMB&gt;
&lt;allocatedMB&gt;0&lt;/allocatedMB&gt;
&lt;containersAllocated&gt;0&lt;/containersAllocated&gt;
&lt;containersReserved&gt;0&lt;/containersReserved&gt;
&lt;containersPending&gt;0&lt;/containersPending&gt;
&lt;totalMB&gt;17408&lt;/totalMB&gt;
&lt;totalNodes&gt;1&lt;/totalNodes&gt;
&lt;lostNodes&gt;0&lt;/lostNodes&gt;
&lt;unhealthyNodes&gt;0&lt;/unhealthyNodes&gt;
&lt;decommissionedNodes&gt;0&lt;/decommissionedNodes&gt;
&lt;rebootedNodes&gt;0&lt;/rebootedNodes&gt;
&lt;activeNodes&gt;1&lt;/activeNodes&gt;
&lt;/clusterMetrics&gt;</pre></div></div></div>
<div class="section">
<h3>Cluster Scheduler API<a name="Cluster_Scheduler_API"></a></h3>
<p>A scheduler resource contains information about the current scheduler configured in a cluster. It currently supports both the Fifo and Capacity Scheduler. You will get different information depending on which scheduler is configured so be sure to look at the type information.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<div>
<pre> * http://&lt;rm http address:port&gt;/ws/v1/cluster/scheduler</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>Capacity Scheduler API<a name="Capacity_Scheduler_API"></a></h4>
<p>The capacity scheduler supports hierarchical queues. This one request will print information about all the queues and any subqueues they have. Queues that can actually have jobs submitted to them are referred to as leaf queues. These queues have additional data associated with them.</p></div>
<div class="section">
<h4>Elements of the <i>schedulerInfo</i> object<a name="Elements_of_the_schedulerInfo_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">type</td>
<td align="left">string</td>
<td align="left">Scheduler type - capacityScheduler</td></tr>
<tr class="a">
<td align="left">capacity</td>
<td align="left">float</td>
<td align="left">Configured queue capacity in percentage relative to its parent queue</td></tr>
<tr class="b">
<td align="left">usedCapacity</td>
<td align="left">float</td>
<td align="left">Used queue capacity in percentage</td></tr>
<tr class="a">
<td align="left">maxCapacity</td>
<td align="left">float</td>
<td align="left">Configured maximum queue capacity in percentage relative to its parent queue</td></tr>
<tr class="b">
<td align="left">queueName</td>
<td align="left">string</td>
<td align="left">Name of the queue</td></tr>
<tr class="a">
<td align="left">queues</td>
<td align="left">array of queues(JSON)/zero or more queue objects(XML)</td>
<td align="left">A collection of queue resources</td></tr></table></div>
<div class="section">
<h4>Elements of the queues object for a Parent queue<a name="Elements_of_the_queues_object_for_a_Parent_queue"></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">capacity</td>
<td align="left">float</td>
<td align="left">Configured queue capacity in percentage relative to its parent queue</td></tr>
<tr class="a">
<td align="left">usedCapacity</td>
<td align="left">float</td>
<td align="left">Used queue capacity in percentage</td></tr>
<tr class="b">
<td align="left">maxCapacity</td>
<td align="left">float</td>
<td align="left">Configured maximum queue capacity in percentage relative to its parent queue</td></tr>
<tr class="a">
<td align="left">absoluteCapacity</td>
<td align="left">float</td>
<td align="left">Absolute capacity percentage this queue can use of entire cluster</td></tr>
<tr class="b">
<td align="left">absoluteMaxCapacity</td>
<td align="left">float</td>
<td align="left">Absolute maximum capacity percentage this queue can use of the entire cluster</td></tr>
<tr class="a">
<td align="left">absoluteUsedCapacity</td>
<td align="left">float</td>
<td align="left">Absolute used capacity percentage this queue is using of the entire cluster</td></tr>
<tr class="b">
<td align="left">numApplications</td>
<td align="left">int</td>
<td align="left">The number of applications currently in the queue</td></tr>
<tr class="a">
<td align="left">usedResources</td>
<td align="left">string</td>
<td align="left">A string describing the current resources used by the queue</td></tr>
<tr class="b">
<td align="left">queueName</td>
<td align="left">string</td>
<td align="left">The name of the queue</td></tr>
<tr class="a">
<td align="left">state</td>
<td align="left">string of QueueState</td>
<td align="left">The state of the queue</td></tr>
<tr class="b">
<td align="left">queues</td>
<td align="left">array of queues(JSON)/zero or more queue objects(XML)</td>
<td align="left">A collection of sub-queue information</td></tr>
<tr class="a">
<td align="left">resourcesUsed</td>
<td align="left">A single resource object</td>
<td align="left">The total amount of resources used by this queue</td></tr></table></div>
<div class="section">
<h4>Elements of the queues object for a Leaf queue - contains all elements in parent plus the following:<a name="Elements_of_the_queues_object_for_a_Leaf_queue_-_contains_all_elements_in_parent_plus_the_following:"></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">type</td>
<td align="left">String</td>
<td align="left">type of the queue - capacitySchedulerLeafQueueInfo</td></tr>
<tr class="a">
<td align="left">numActiveApplications</td>
<td align="left">int</td>
<td align="left">The number of active applications in this queue</td></tr>
<tr class="b">
<td align="left">numPendingApplications</td>
<td align="left">int</td>
<td align="left">The number of pending applications in this queue</td></tr>
<tr class="a">
<td align="left">numContainers</td>
<td align="left">int</td>
<td align="left">The number of containers being used</td></tr>
<tr class="b">
<td align="left">maxApplications</td>
<td align="left">int</td>
<td align="left">The maximum number of applications this queue can have</td></tr>
<tr class="a">
<td align="left">maxApplicationsPerUser</td>
<td align="left">int</td>
<td align="left">The maximum number of applications per user this queue can have</td></tr>
<tr class="b">
<td align="left">maxActiveApplications</td>
<td align="left">int</td>
<td align="left">The maximum number of active applications this queue can have</td></tr>
<tr class="a">
<td align="left">maxActiveApplicationsPerUser</td>
<td align="left">int</td>
<td align="left">The maximum number of active applications per user this queue can have</td></tr>
<tr class="b">
<td align="left">userLimit</td>
<td align="left">int</td>
<td align="left">The minimum user limit percent set in the configuration</td></tr>
<tr class="a">
<td align="left">userLimitFactor</td>
<td align="left">float</td>
<td align="left">The user limit factor set in the configuration</td></tr>
<tr class="b">
<td align="left">users</td>
<td align="left">array of users(JSON)/zero or more user objects(XML)</td>
<td align="left">A collection of user objects containing resources used</td></tr></table></div>
<div class="section">
<h4>Elements of the user object for users:<a name="Elements_of_the_user_object_for_users:"></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">username</td>
<td align="left">String</td>
<td align="left">The username of the user using the resources</td></tr>
<tr class="a">
<td align="left">resourcesUsed</td>
<td align="left">A single resource object</td>
<td align="left">The amount of resources used by the user in this queue</td></tr>
<tr class="b">
<td align="left">numActiveApplications</td>
<td align="left">int</td>
<td align="left">The number of active applications for this user in this queue</td></tr>
<tr class="a">
<td align="left">numPendingApplications</td>
<td align="left">int</td>
<td align="left">The number of pending applications for this user in this queue</td></tr></table></div>
<div class="section">
<h4>Elements of the resource object for resourcesUsed in user and queues:<a name="Elements_of_the_resource_object_for_resourcesUsed_in_user_and_queues:"></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">memory</td>
<td align="left">int</td>
<td align="left">The amount of memory used (in MB)</td></tr>
<tr class="a">
<td align="left">vCores</td>
<td align="left">int</td>
<td align="left">The number of virtual cores</td></tr></table>
<div class="section">
<h5>Response Examples<a name="Response_Examples"></a></h5>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/scheduler</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;scheduler&quot;: {
&quot;schedulerInfo&quot;: {
&quot;capacity&quot;: 100.0,
&quot;maxCapacity&quot;: 100.0,
&quot;queueName&quot;: &quot;root&quot;,
&quot;queues&quot;: {
&quot;queue&quot;: [
{
&quot;absoluteCapacity&quot;: 10.5,
&quot;absoluteMaxCapacity&quot;: 50.0,
&quot;absoluteUsedCapacity&quot;: 0.0,
&quot;capacity&quot;: 10.5,
&quot;maxCapacity&quot;: 50.0,
&quot;numApplications&quot;: 0,
&quot;queueName&quot;: &quot;a&quot;,
&quot;queues&quot;: {
&quot;queue&quot;: [
{
&quot;absoluteCapacity&quot;: 3.15,
&quot;absoluteMaxCapacity&quot;: 25.0,
&quot;absoluteUsedCapacity&quot;: 0.0,
&quot;capacity&quot;: 30.000002,
&quot;maxCapacity&quot;: 50.0,
&quot;numApplications&quot;: 0,
&quot;queueName&quot;: &quot;a1&quot;,
&quot;queues&quot;: {
&quot;queue&quot;: [
{
&quot;absoluteCapacity&quot;: 2.6775,
&quot;absoluteMaxCapacity&quot;: 25.0,
&quot;absoluteUsedCapacity&quot;: 0.0,
&quot;capacity&quot;: 85.0,
&quot;maxActiveApplications&quot;: 1,
&quot;maxActiveApplicationsPerUser&quot;: 1,
&quot;maxApplications&quot;: 267,
&quot;maxApplicationsPerUser&quot;: 267,
&quot;maxCapacity&quot;: 100.0,
&quot;numActiveApplications&quot;: 0,
&quot;numApplications&quot;: 0,
&quot;numContainers&quot;: 0,
&quot;numPendingApplications&quot;: 0,
&quot;queueName&quot;: &quot;a1a&quot;,
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;state&quot;: &quot;RUNNING&quot;,
&quot;type&quot;: &quot;capacitySchedulerLeafQueueInfo&quot;,
&quot;usedCapacity&quot;: 0.0,
&quot;usedResources&quot;: &quot;&lt;memory:0, vCores:0&gt;&quot;,
&quot;userLimit&quot;: 100,
&quot;userLimitFactor&quot;: 1.0,
&quot;users&quot;: null
},
{
&quot;absoluteCapacity&quot;: 0.47250003,
&quot;absoluteMaxCapacity&quot;: 25.0,
&quot;absoluteUsedCapacity&quot;: 0.0,
&quot;capacity&quot;: 15.000001,
&quot;maxActiveApplications&quot;: 1,
&quot;maxActiveApplicationsPerUser&quot;: 1,
&quot;maxApplications&quot;: 47,
&quot;maxApplicationsPerUser&quot;: 47,
&quot;maxCapacity&quot;: 100.0,
&quot;numActiveApplications&quot;: 0,
&quot;numApplications&quot;: 0,
&quot;numContainers&quot;: 0,
&quot;numPendingApplications&quot;: 0,
&quot;queueName&quot;: &quot;a1b&quot;,
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;state&quot;: &quot;RUNNING&quot;,
&quot;type&quot;: &quot;capacitySchedulerLeafQueueInfo&quot;,
&quot;usedCapacity&quot;: 0.0,
&quot;usedResources&quot;: &quot;&lt;memory:0, vCores:0&gt;&quot;,
&quot;userLimit&quot;: 100,
&quot;userLimitFactor&quot;: 1.0,
&quot;users&quot;: null
}
]
},
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;state&quot;: &quot;RUNNING&quot;,
&quot;usedCapacity&quot;: 0.0,
&quot;usedResources&quot;: &quot;&lt;memory:0, vCores:0&gt;&quot;
},
{
&quot;absoluteCapacity&quot;: 7.35,
&quot;absoluteMaxCapacity&quot;: 50.0,
&quot;absoluteUsedCapacity&quot;: 0.0,
&quot;capacity&quot;: 70.0,
&quot;maxActiveApplications&quot;: 1,
&quot;maxActiveApplicationsPerUser&quot;: 100,
&quot;maxApplications&quot;: 735,
&quot;maxApplicationsPerUser&quot;: 73500,
&quot;maxCapacity&quot;: 100.0,
&quot;numActiveApplications&quot;: 0,
&quot;numApplications&quot;: 0,
&quot;numContainers&quot;: 0,
&quot;numPendingApplications&quot;: 0,
&quot;queueName&quot;: &quot;a2&quot;,
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;state&quot;: &quot;RUNNING&quot;,
&quot;type&quot;: &quot;capacitySchedulerLeafQueueInfo&quot;,
&quot;usedCapacity&quot;: 0.0,
&quot;usedResources&quot;: &quot;&lt;memory:0, vCores:0&gt;&quot;,
&quot;userLimit&quot;: 100,
&quot;userLimitFactor&quot;: 100.0,
&quot;users&quot;: null
}
]
},
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;state&quot;: &quot;RUNNING&quot;,
&quot;usedCapacity&quot;: 0.0,
&quot;usedResources&quot;: &quot;&lt;memory:0, vCores:0&gt;&quot;
},
{
&quot;absoluteCapacity&quot;: 89.5,
&quot;absoluteMaxCapacity&quot;: 100.0,
&quot;absoluteUsedCapacity&quot;: 0.0,
&quot;capacity&quot;: 89.5,
&quot;maxCapacity&quot;: 100.0,
&quot;numApplications&quot;: 2,
&quot;queueName&quot;: &quot;b&quot;,
&quot;queues&quot;: {
&quot;queue&quot;: [
{
&quot;absoluteCapacity&quot;: 53.7,
&quot;absoluteMaxCapacity&quot;: 100.0,
&quot;absoluteUsedCapacity&quot;: 0.0,
&quot;capacity&quot;: 60.000004,
&quot;maxActiveApplications&quot;: 1,
&quot;maxActiveApplicationsPerUser&quot;: 100,
&quot;maxApplications&quot;: 5370,
&quot;maxApplicationsPerUser&quot;: 537000,
&quot;maxCapacity&quot;: 100.0,
&quot;numActiveApplications&quot;: 1,
&quot;numApplications&quot;: 2,
&quot;numContainers&quot;: 0,
&quot;numPendingApplications&quot;: 1,
&quot;queueName&quot;: &quot;b1&quot;,
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;state&quot;: &quot;RUNNING&quot;,
&quot;type&quot;: &quot;capacitySchedulerLeafQueueInfo&quot;,
&quot;usedCapacity&quot;: 0.0,
&quot;usedResources&quot;: &quot;&lt;memory:0, vCores:0&gt;&quot;,
&quot;userLimit&quot;: 100,
&quot;userLimitFactor&quot;: 100.0,
&quot;users&quot;: {
&quot;user&quot;: [
{
&quot;numActiveApplications&quot;: 0,
&quot;numPendingApplications&quot;: 1,
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;username&quot;: &quot;user2&quot;
},
{
&quot;numActiveApplications&quot;: 1,
&quot;numPendingApplications&quot;: 0,
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;username&quot;: &quot;user1&quot;
}
]
}
},
{
&quot;absoluteCapacity&quot;: 35.3525,
&quot;absoluteMaxCapacity&quot;: 100.0,
&quot;absoluteUsedCapacity&quot;: 0.0,
&quot;capacity&quot;: 39.5,
&quot;maxActiveApplications&quot;: 1,
&quot;maxActiveApplicationsPerUser&quot;: 100,
&quot;maxApplications&quot;: 3535,
&quot;maxApplicationsPerUser&quot;: 353500,
&quot;maxCapacity&quot;: 100.0,
&quot;numActiveApplications&quot;: 0,
&quot;numApplications&quot;: 0,
&quot;numContainers&quot;: 0,
&quot;numPendingApplications&quot;: 0,
&quot;queueName&quot;: &quot;b2&quot;,
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;state&quot;: &quot;RUNNING&quot;,
&quot;type&quot;: &quot;capacitySchedulerLeafQueueInfo&quot;,
&quot;usedCapacity&quot;: 0.0,
&quot;usedResources&quot;: &quot;&lt;memory:0, vCores:0&gt;&quot;,
&quot;userLimit&quot;: 100,
&quot;userLimitFactor&quot;: 100.0,
&quot;users&quot;: null
},
{
&quot;absoluteCapacity&quot;: 0.4475,
&quot;absoluteMaxCapacity&quot;: 100.0,
&quot;absoluteUsedCapacity&quot;: 0.0,
&quot;capacity&quot;: 0.5,
&quot;maxActiveApplications&quot;: 1,
&quot;maxActiveApplicationsPerUser&quot;: 100,
&quot;maxApplications&quot;: 44,
&quot;maxApplicationsPerUser&quot;: 4400,
&quot;maxCapacity&quot;: 100.0,
&quot;numActiveApplications&quot;: 0,
&quot;numApplications&quot;: 0,
&quot;numContainers&quot;: 0,
&quot;numPendingApplications&quot;: 0,
&quot;queueName&quot;: &quot;b3&quot;,
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;state&quot;: &quot;RUNNING&quot;,
&quot;type&quot;: &quot;capacitySchedulerLeafQueueInfo&quot;,
&quot;usedCapacity&quot;: 0.0,
&quot;usedResources&quot;: &quot;&lt;memory:0, vCores:0&gt;&quot;,
&quot;userLimit&quot;: 100,
&quot;userLimitFactor&quot;: 100.0,
&quot;users&quot;: null
}
]
},
&quot;resourcesUsed&quot;: {
&quot;memory&quot;: 0,
&quot;vCores&quot;: 0
},
&quot;state&quot;: &quot;RUNNING&quot;,
&quot;usedCapacity&quot;: 0.0,
&quot;usedResources&quot;: &quot;&lt;memory:0, vCores:0&gt;&quot;
}
]
},
&quot;type&quot;: &quot;capacityScheduler&quot;,
&quot;usedCapacity&quot;: 0.0
}
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> Accept: application/xml
GET http://&lt;rm http address:port&gt;/ws/v1/cluster/scheduler</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 5778
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;scheduler&gt;
&lt;schedulerInfo xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;capacityScheduler&quot;&gt;
&lt;capacity&gt;100.0&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;100.0&lt;/maxCapacity&gt;
&lt;queueName&gt;root&lt;/queueName&gt;
&lt;queues&gt;
&lt;queue&gt;
&lt;capacity&gt;10.5&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;50.0&lt;/maxCapacity&gt;
&lt;absoluteCapacity&gt;10.5&lt;/absoluteCapacity&gt;
&lt;absoluteMaxCapacity&gt;50.0&lt;/absoluteMaxCapacity&gt;
&lt;absoluteUsedCapacity&gt;0.0&lt;/absoluteUsedCapacity&gt;
&lt;numApplications&gt;0&lt;/numApplications&gt;
&lt;usedResources&gt;&amp;lt;memory:0, vCores:0&amp;gt;&lt;/usedResources&gt;
&lt;queueName&gt;a&lt;/queueName&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;queues&gt;
&lt;queue&gt;
&lt;capacity&gt;30.000002&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;50.0&lt;/maxCapacity&gt;
&lt;absoluteCapacity&gt;3.15&lt;/absoluteCapacity&gt;
&lt;absoluteMaxCapacity&gt;25.0&lt;/absoluteMaxCapacity&gt;
&lt;absoluteUsedCapacity&gt;0.0&lt;/absoluteUsedCapacity&gt;
&lt;numApplications&gt;0&lt;/numApplications&gt;
&lt;usedResources&gt;&amp;lt;memory:0, vCores:0&amp;gt;&lt;/usedResources&gt;
&lt;queueName&gt;a1&lt;/queueName&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;queues&gt;
&lt;queue xsi:type=&quot;capacitySchedulerLeafQueueInfo&quot;&gt;
&lt;capacity&gt;85.0&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;100.0&lt;/maxCapacity&gt;
&lt;absoluteCapacity&gt;2.6775&lt;/absoluteCapacity&gt;
&lt;absoluteMaxCapacity&gt;25.0&lt;/absoluteMaxCapacity&gt;
&lt;absoluteUsedCapacity&gt;0.0&lt;/absoluteUsedCapacity&gt;
&lt;numApplications&gt;0&lt;/numApplications&gt;
&lt;usedResources&gt;&amp;lt;memory:0, vCores:0&amp;gt;&lt;/usedResources&gt;
&lt;queueName&gt;a1a&lt;/queueName&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;numActiveApplications&gt;0&lt;/numActiveApplications&gt;
&lt;numPendingApplications&gt;0&lt;/numPendingApplications&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;maxApplications&gt;267&lt;/maxApplications&gt;
&lt;maxApplicationsPerUser&gt;267&lt;/maxApplicationsPerUser&gt;
&lt;maxActiveApplications&gt;1&lt;/maxActiveApplications&gt;
&lt;maxActiveApplicationsPerUser&gt;1&lt;/maxActiveApplicationsPerUser&gt;
&lt;userLimit&gt;100&lt;/userLimit&gt;
&lt;users/&gt;
&lt;userLimitFactor&gt;1.0&lt;/userLimitFactor&gt;
&lt;/queue&gt;
&lt;queue xsi:type=&quot;capacitySchedulerLeafQueueInfo&quot;&gt;
&lt;capacity&gt;15.000001&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;100.0&lt;/maxCapacity&gt;
&lt;absoluteCapacity&gt;0.47250003&lt;/absoluteCapacity&gt;
&lt;absoluteMaxCapacity&gt;25.0&lt;/absoluteMaxCapacity&gt;
&lt;absoluteUsedCapacity&gt;0.0&lt;/absoluteUsedCapacity&gt;
&lt;numApplications&gt;0&lt;/numApplications&gt;
&lt;usedResources&gt;&amp;lt;memory:0, vCores:0&amp;gt;&lt;/usedResources&gt;
&lt;queueName&gt;a1b&lt;/queueName&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;numActiveApplications&gt;0&lt;/numActiveApplications&gt;
&lt;numPendingApplications&gt;0&lt;/numPendingApplications&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;maxApplications&gt;47&lt;/maxApplications&gt;
&lt;maxApplicationsPerUser&gt;47&lt;/maxApplicationsPerUser&gt;
&lt;maxActiveApplications&gt;1&lt;/maxActiveApplications&gt;
&lt;maxActiveApplicationsPerUser&gt;1&lt;/maxActiveApplicationsPerUser&gt;
&lt;userLimit&gt;100&lt;/userLimit&gt;
&lt;users/&gt;
&lt;userLimitFactor&gt;1.0&lt;/userLimitFactor&gt;
&lt;/queue&gt;
&lt;/queues&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;/queue&gt;
&lt;queue xsi:type=&quot;capacitySchedulerLeafQueueInfo&quot;&gt;
&lt;capacity&gt;70.0&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;100.0&lt;/maxCapacity&gt;
&lt;absoluteCapacity&gt;7.35&lt;/absoluteCapacity&gt;
&lt;absoluteMaxCapacity&gt;50.0&lt;/absoluteMaxCapacity&gt;
&lt;absoluteUsedCapacity&gt;0.0&lt;/absoluteUsedCapacity&gt;
&lt;numApplications&gt;0&lt;/numApplications&gt;
&lt;usedResources&gt;&amp;lt;memory:0, vCores:0&amp;gt;&lt;/usedResources&gt;
&lt;queueName&gt;a2&lt;/queueName&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;numActiveApplications&gt;0&lt;/numActiveApplications&gt;
&lt;numPendingApplications&gt;0&lt;/numPendingApplications&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;maxApplications&gt;735&lt;/maxApplications&gt;
&lt;maxApplicationsPerUser&gt;73500&lt;/maxApplicationsPerUser&gt;
&lt;maxActiveApplications&gt;1&lt;/maxActiveApplications&gt;
&lt;maxActiveApplicationsPerUser&gt;100&lt;/maxActiveApplicationsPerUser&gt;
&lt;userLimit&gt;100&lt;/userLimit&gt;
&lt;users/&gt;
&lt;userLimitFactor&gt;100.0&lt;/userLimitFactor&gt;
&lt;/queue&gt;
&lt;/queues&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;/queue&gt;
&lt;queue&gt;
&lt;capacity&gt;89.5&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;100.0&lt;/maxCapacity&gt;
&lt;absoluteCapacity&gt;89.5&lt;/absoluteCapacity&gt;
&lt;absoluteMaxCapacity&gt;100.0&lt;/absoluteMaxCapacity&gt;
&lt;absoluteUsedCapacity&gt;0.0&lt;/absoluteUsedCapacity&gt;
&lt;numApplications&gt;2&lt;/numApplications&gt;
&lt;usedResources&gt;&amp;lt;memory:0, vCores:0&amp;gt;&lt;/usedResources&gt;
&lt;queueName&gt;b&lt;/queueName&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;queues&gt;
&lt;queue xsi:type=&quot;capacitySchedulerLeafQueueInfo&quot;&gt;
&lt;capacity&gt;60.000004&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;100.0&lt;/maxCapacity&gt;
&lt;absoluteCapacity&gt;53.7&lt;/absoluteCapacity&gt;
&lt;absoluteMaxCapacity&gt;100.0&lt;/absoluteMaxCapacity&gt;
&lt;absoluteUsedCapacity&gt;0.0&lt;/absoluteUsedCapacity&gt;
&lt;numApplications&gt;2&lt;/numApplications&gt;
&lt;usedResources&gt;&amp;lt;memory:0, vCores:0&amp;gt;&lt;/usedResources&gt;
&lt;queueName&gt;b1&lt;/queueName&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;numActiveApplications&gt;1&lt;/numActiveApplications&gt;
&lt;numPendingApplications&gt;1&lt;/numPendingApplications&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;maxApplications&gt;5370&lt;/maxApplications&gt;
&lt;maxApplicationsPerUser&gt;537000&lt;/maxApplicationsPerUser&gt;
&lt;maxActiveApplications&gt;1&lt;/maxActiveApplications&gt;
&lt;maxActiveApplicationsPerUser&gt;100&lt;/maxActiveApplicationsPerUser&gt;
&lt;userLimit&gt;100&lt;/userLimit&gt;
&lt;users&gt;
&lt;user&gt;
&lt;username&gt;user2&lt;/username&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;numPendingApplications&gt;1&lt;/numPendingApplications&gt;
&lt;numActiveApplications&gt;0&lt;/numActiveApplications&gt;
&lt;/user&gt;
&lt;user&gt;
&lt;username&gt;user1&lt;/username&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;numPendingApplications&gt;0&lt;/numPendingApplications&gt;
&lt;numActiveApplications&gt;1&lt;/numActiveApplications&gt;
&lt;/user&gt;
&lt;/users&gt;
&lt;userLimitFactor&gt;100.0&lt;/userLimitFactor&gt;
&lt;/queue&gt;
&lt;queue xsi:type=&quot;capacitySchedulerLeafQueueInfo&quot;&gt;
&lt;capacity&gt;39.5&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;100.0&lt;/maxCapacity&gt;
&lt;absoluteCapacity&gt;35.3525&lt;/absoluteCapacity&gt;
&lt;absoluteMaxCapacity&gt;100.0&lt;/absoluteMaxCapacity&gt;
&lt;absoluteUsedCapacity&gt;0.0&lt;/absoluteUsedCapacity&gt;
&lt;numApplications&gt;0&lt;/numApplications&gt;
&lt;usedResources&gt;&amp;lt;memory:0, vCores:0&amp;gt;&lt;/usedResources&gt;
&lt;queueName&gt;b2&lt;/queueName&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;numActiveApplications&gt;0&lt;/numActiveApplications&gt;
&lt;numPendingApplications&gt;0&lt;/numPendingApplications&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;maxApplications&gt;3535&lt;/maxApplications&gt;
&lt;maxApplicationsPerUser&gt;353500&lt;/maxApplicationsPerUser&gt;
&lt;maxActiveApplications&gt;1&lt;/maxActiveApplications&gt;
&lt;maxActiveApplicationsPerUser&gt;100&lt;/maxActiveApplicationsPerUser&gt;
&lt;userLimit&gt;100&lt;/userLimit&gt;
&lt;users/&gt;
&lt;userLimitFactor&gt;100.0&lt;/userLimitFactor&gt;
&lt;/queue&gt;
&lt;queue xsi:type=&quot;capacitySchedulerLeafQueueInfo&quot;&gt;
&lt;capacity&gt;0.5&lt;/capacity&gt;
&lt;usedCapacity&gt;0.0&lt;/usedCapacity&gt;
&lt;maxCapacity&gt;100.0&lt;/maxCapacity&gt;
&lt;absoluteCapacity&gt;0.4475&lt;/absoluteCapacity&gt;
&lt;absoluteMaxCapacity&gt;100.0&lt;/absoluteMaxCapacity&gt;
&lt;absoluteUsedCapacity&gt;0.0&lt;/absoluteUsedCapacity&gt;
&lt;numApplications&gt;0&lt;/numApplications&gt;
&lt;usedResources&gt;&amp;lt;memory:0, vCores:0&amp;gt;&lt;/usedResources&gt;
&lt;queueName&gt;b3&lt;/queueName&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;numActiveApplications&gt;0&lt;/numActiveApplications&gt;
&lt;numPendingApplications&gt;0&lt;/numPendingApplications&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;maxApplications&gt;44&lt;/maxApplications&gt;
&lt;maxApplicationsPerUser&gt;4400&lt;/maxApplicationsPerUser&gt;
&lt;maxActiveApplications&gt;1&lt;/maxActiveApplications&gt;
&lt;maxActiveApplicationsPerUser&gt;100&lt;/maxActiveApplicationsPerUser&gt;
&lt;userLimit&gt;100&lt;/userLimit&gt;
&lt;users/&gt;
&lt;userLimitFactor&gt;100.0&lt;/userLimitFactor&gt;
&lt;/queue&gt;
&lt;/queues&gt;
&lt;resourcesUsed&gt;
&lt;memory&gt;0&lt;/memory&gt;
&lt;vCores&gt;0&lt;/vCores&gt;
&lt;/resourcesUsed&gt;
&lt;/queue&gt;
&lt;/queues&gt;
&lt;/schedulerInfo&gt;
&lt;/scheduler&gt;</pre></div></div></div>
<div class="section">
<h4>Fifo Scheduler API<a name="Fifo_Scheduler_API"></a></h4></div>
<div class="section">
<h4>Elements of the <i>schedulerInfo</i> object<a name="Elements_of_the_schedulerInfo_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">type</td>
<td align="left">string</td>
<td align="left">Scheduler type - fifoScheduler</td></tr>
<tr class="a">
<td align="left">capacity</td>
<td align="left">float</td>
<td align="left">Queue capacity in percentage</td></tr>
<tr class="b">
<td align="left">usedCapacity</td>
<td align="left">float</td>
<td align="left">Used queue capacity in percentage</td></tr>
<tr class="a">
<td align="left">qstate</td>
<td align="left">string</td>
<td align="left">State of the queue - valid values are: STOPPED, RUNNING</td></tr>
<tr class="b">
<td align="left">minQueueMemoryCapacity</td>
<td align="left">int</td>
<td align="left">Minimum queue memory capacity</td></tr>
<tr class="a">
<td align="left">maxQueueMemoryCapacity</td>
<td align="left">int</td>
<td align="left">Maximum queue memory capacity</td></tr>
<tr class="b">
<td align="left">numNodes</td>
<td align="left">int</td>
<td align="left">The total number of nodes</td></tr>
<tr class="a">
<td align="left">usedNodeCapacity</td>
<td align="left">int</td>
<td align="left">The used node capacity</td></tr>
<tr class="b">
<td align="left">availNodeCapacity</td>
<td align="left">int</td>
<td align="left">The available node capacity</td></tr>
<tr class="a">
<td align="left">totalNodeCapacity</td>
<td align="left">int</td>
<td align="left">The total node capacity</td></tr>
<tr class="b">
<td align="left">numContainers</td>
<td align="left">int</td>
<td align="left">The number of containers</td></tr></table>
<div class="section">
<h5>Response Examples<a name="Response_Examples"></a></h5>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/scheduler</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;scheduler&quot;:
{
&quot;schedulerInfo&quot;:
{
&quot;type&quot;:&quot;fifoScheduler&quot;,
&quot;capacity&quot;:1,
&quot;usedCapacity&quot;:&quot;NaN&quot;,
&quot;qstate&quot;:&quot;RUNNING&quot;,
&quot;minQueueMemoryCapacity&quot;:1024,
&quot;maxQueueMemoryCapacity&quot;:10240,
&quot;numNodes&quot;:0,
&quot;usedNodeCapacity&quot;:0,
&quot;availNodeCapacity&quot;:0,
&quot;totalNodeCapacity&quot;:0,
&quot;numContainers&quot;:0
}
}
}</pre></div>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/scheduler
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 432
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;scheduler&gt;
&lt;schedulerInfo xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;fifoScheduler&quot;&gt;
&lt;capacity&gt;1.0&lt;/capacity&gt;
&lt;usedCapacity&gt;NaN&lt;/usedCapacity&gt;
&lt;qstate&gt;RUNNING&lt;/qstate&gt;
&lt;minQueueMemoryCapacity&gt;1024&lt;/minQueueMemoryCapacity&gt;
&lt;maxQueueMemoryCapacity&gt;10240&lt;/maxQueueMemoryCapacity&gt;
&lt;numNodes&gt;0&lt;/numNodes&gt;
&lt;usedNodeCapacity&gt;0&lt;/usedNodeCapacity&gt;
&lt;availNodeCapacity&gt;0&lt;/availNodeCapacity&gt;
&lt;totalNodeCapacity&gt;0&lt;/totalNodeCapacity&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;/schedulerInfo&gt;
&lt;/scheduler&gt;</pre></div></div></div></div>
<div class="section">
<h3>Cluster Applications API<a name="Cluster_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. </p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<div>
<pre> * http://&lt;rm http address:port&gt;/ws/v1/cluster/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 parameters can be specified. The started and finished times have a begin and end parameter to allow you to specify ranges. For example, one could request all applications that started between 1:00am and 2:00pm on 12/19/2011 with startedTimeBegin=1324256400&amp;startedTimeEnd=1324303200. If the Begin parameter is not specified, it defaults to 0, and if the End parameter is not specified, it defaults to infinity.</p>
<div>
<pre> * state [deprecated] - state of the application
* states - applications matching the given application states, specified as a comma-separated list.
* finalStatus - the final status of the application - reported by the application itself
* user - user name
* queue - queue name
* limit - total number of app objects to be returned
* startedTimeBegin - applications with start time beginning with this time, specified in ms since epoch
* startedTimeEnd - applications with start time ending with this time, specified in ms since epoch
* finishedTimeBegin - applications with finish time beginning with this time, specified in ms since epoch
* finishedTimeEnd - applications with finish time ending with this time, specified in ms since epoch
* applicationTypes - applications matching the given application types, specified as a comma-separated list.</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 application objects(XML)</td>
<td align="left">The 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;rm http address:port&gt;/ws/v1/cluster/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;finishedTime&quot; : 1326815598530,
&quot;amContainerLogs&quot; : &quot;http://host.domain.com:8042/node/containerlogs/container_1326815542473_0001_01_000001&quot;,
&quot;trackingUI&quot; : &quot;History&quot;,
&quot;state&quot; : &quot;FINISHED&quot;,
&quot;user&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;application_1326815542473_0001&quot;,
&quot;clusterId&quot; : 1326815542473,
&quot;finalStatus&quot; : &quot;SUCCEEDED&quot;,
&quot;amHostHttpAddress&quot; : &quot;host.domain.com:8042&quot;,
&quot;progress&quot; : 100,
&quot;name&quot; : &quot;word count&quot;,
&quot;startedTime&quot; : 1326815573334,
&quot;elapsedTime&quot; : 25196,
&quot;diagnostics&quot; : &quot;&quot;,
&quot;trackingUrl&quot; : &quot;http://host.domain.com:8088/proxy/application_1326815542473_0001/jobhistory/job/job_1326815542473_1_1&quot;,
&quot;queue&quot; : &quot;default&quot;,
&quot;allocatedMB&quot; : 0,
&quot;allocatedVCores&quot; : 0,
&quot;runningContainers&quot; : 0
},
{
&quot;finishedTime&quot; : 1326815789546,
&quot;amContainerLogs&quot; : &quot;http://host.domain.com:8042/node/containerlogs/container_1326815542473_0002_01_000001&quot;,
&quot;trackingUI&quot; : &quot;History&quot;,
&quot;state&quot; : &quot;FINISHED&quot;,
&quot;user&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;application_1326815542473_0002&quot;,
&quot;clusterId&quot; : 1326815542473,
&quot;finalStatus&quot; : &quot;SUCCEEDED&quot;,
&quot;amHostHttpAddress&quot; : &quot;host.domain.com:8042&quot;,
&quot;progress&quot; : 100,
&quot;name&quot; : &quot;Sleep job&quot;,
&quot;startedTime&quot; : 1326815641380,
&quot;elapsedTime&quot; : 148166,
&quot;diagnostics&quot; : &quot;&quot;,
&quot;trackingUrl&quot; : &quot;http://host.domain.com:8088/proxy/application_1326815542473_0002/jobhistory/job/job_1326815542473_2_2&quot;,
&quot;queue&quot; : &quot;default&quot;,
&quot;allocatedMB&quot; : 0,
&quot;allocatedVCores&quot; : 0,
&quot;runningContainers&quot; : 1
}
]
}
}</pre></div>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/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: 2459
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_1326815542473_0001&lt;/id&gt;
&lt;user&gt;user1&lt;/user&gt;
&lt;name&gt;word count&lt;/name&gt;
&lt;applicationType&gt;MAPREDUCE&lt;/applicationType&gt;
&lt;queue&gt;default&lt;/queue&gt;
&lt;state&gt;FINISHED&lt;/state&gt;
&lt;finalStatus&gt;SUCCEEDED&lt;/finalStatus&gt;
&lt;progress&gt;100.0&lt;/progress&gt;
&lt;trackingUI&gt;History&lt;/trackingUI&gt;
&lt;trackingUrl&gt;http://host.domain.com:8088/proxy/application_1326815542473_0001/jobhistory/job
/job_1326815542473_1_1&lt;/trackingUrl&gt;
&lt;diagnostics/&gt;
&lt;clusterId&gt;1326815542473&lt;/clusterId&gt;
&lt;startedTime&gt;1326815573334&lt;/startedTime&gt;
&lt;finishedTime&gt;1326815598530&lt;/finishedTime&gt;
&lt;elapsedTime&gt;25196&lt;/elapsedTime&gt;
&lt;amContainerLogs&gt;http://host.domain.com:8042/node/containerlogs/container_1326815542473_0001
_01_000001&lt;/amContainerLogs&gt;
&lt;amHostHttpAddress&gt;host.domain.com:8042&lt;/amHostHttpAddress&gt;
&lt;allocatedMB&gt;0&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;0&lt;/allocatedVCores&gt;
&lt;runningContainers&gt;0&lt;/runningContainers&gt;
&lt;/app&gt;
&lt;app&gt;
&lt;id&gt;application_1326815542473_0002&lt;/id&gt;
&lt;user&gt;user1&lt;/user&gt;
&lt;name&gt;Sleep job&lt;/name&gt;
&lt;applicationType&gt;YARN&lt;/applicationType&gt;
&lt;queue&gt;default&lt;/queue&gt;
&lt;state&gt;FINISHED&lt;/state&gt;
&lt;finalStatus&gt;SUCCEEDED&lt;/finalStatus&gt;
&lt;progress&gt;100.0&lt;/progress&gt;
&lt;trackingUI&gt;History&lt;/trackingUI&gt;
&lt;trackingUrl&gt;http://host.domain.com:8088/proxy/application_1326815542473_0002/jobhistory/job/job_1326815542473_2_2&lt;/trackingUrl&gt;
&lt;diagnostics/&gt;
&lt;clusterId&gt;1326815542473&lt;/clusterId&gt;
&lt;startedTime&gt;1326815641380&lt;/startedTime&gt;
&lt;finishedTime&gt;1326815789546&lt;/finishedTime&gt;
&lt;elapsedTime&gt;148166&lt;/elapsedTime&gt;
&lt;amContainerLogs&gt;http://host.domain.com:8042/node/containerlogs/container_1326815542473_0002_01_000001&lt;/amContainerLogs&gt;
&lt;amHostHttpAddress&gt;host.domain.com:8042&lt;/amHostHttpAddress&gt;
&lt;allocatedMB&gt;0&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;0&lt;/allocatedVCores&gt;
&lt;runningContainers&gt;0&lt;/runningContainers&gt;
&lt;/app&gt;
&lt;/apps&gt;
</pre></div></div></div>
<div class="section">
<h3>Cluster Application Statistics API<a name="Cluster_Application_Statistics_API"></a></h3>
<p>With the Application Statistics API, you can obtain a collection of triples, each of which contains the application type, the application state and the number of applications of this type and this state in ResourceManager context. Note that with the performance concern, we currently only support at most one applicationType per query. We may support multiple applicationTypes per query as well as more statistics in the future. When you run a GET operation on this resource, you obtain a collection of statItem objects. </p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<div>
<pre> * http://&lt;rm http address:port&gt;/ws/v1/cluster/appstatistics</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 Required<a name="Query_Parameters_Required"></a></h4>
<p>Two paramters can be specified. The parameters are case insensitive.</p>
<div>
<pre> * states - states of the applications, specified as a comma-separated list. If states is not provided, the API will enumerate all application states and return the counts of them.
* applicationTypes - types of the applications, specified as a comma-separated list. If applicationTypes is not provided, the API will count the applications of any application type. In this case, the response shows * to indicate any application type. Note that we only support at most one applicationType temporarily. Otherwise, users will expect an BadRequestException.</pre></div></div>
<div class="section">
<h4>Elements of the <i>appStatInfo</i> (statItems) object<a name="Elements_of_the_appStatInfo_statItems_object"></a></h4>
<p>When you make a request for the list of statistics items, the information will be returned as a collection of statItem objects</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">statItem</td>
<td align="left">array of statItem objects(JSON)/zero or more statItem objects(XML)</td>
<td align="left">The collection of statItem 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;rm http address:port&gt;/ws/v1/cluster/appstatistics?states=accepted,running,finished&amp;applicationTypes=mapreduce</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;appStatInfo&quot;:
{
&quot;statItem&quot;:
[
{
&quot;state&quot; : &quot;accepted&quot;,
&quot;type&quot; : &quot;mapreduce&quot;,
&quot;count&quot; : 4
},
{
&quot;state&quot; : &quot;running&quot;,
&quot;type&quot; : &quot;mapreduce&quot;,
&quot;count&quot; : 1
},
{
&quot;state&quot; : &quot;finished&quot;,
&quot;type&quot; : &quot;mapreduce&quot;,
&quot;count&quot; : 7
}
]
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/appstatistics?states=accepted,running,finished&amp;applicationTypes=mapreduce
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 2459
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;appStatInfo&gt;
&lt;statItem&gt;
&lt;state&gt;accepted&lt;/state&gt;
&lt;type&gt;mapreduce&lt;/type&gt;
&lt;count&gt;4&lt;/count&gt;
&lt;/statItem&gt;
&lt;statItem&gt;
&lt;state&gt;running&lt;/state&gt;
&lt;type&gt;mapreduce&lt;/type&gt;
&lt;count&gt;1&lt;/count&gt;
&lt;/statItem&gt;
&lt;statItem&gt;
&lt;state&gt;finished&lt;/state&gt;
&lt;type&gt;mapreduce&lt;/type&gt;
&lt;count&gt;7&lt;/count&gt;
&lt;/statItem&gt;
&lt;/appStatInfo&gt;</pre></div></div></div>
<div class="section">
<h3>Cluster <a name="Application_API">Application API</a><a name="Cluster_Application_API"></a></h3>
<p>An application resource contains information about a particular application that was submitted to a cluster.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<p>Use the following URI to obtain an app object, from a application identified by the <a name="appid">appid</a> value. </p>
<div>
<pre> * http://&lt;rm http address:port&gt;/ws/v1/cluster/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>
<p>Note that depending on security settings a user might not be able to see all the fields. </p>
<table border="1" class="bodyTable"><caption>| allocatedVCores | int | The sum of virtual cores allocated to the application&apos;s running containers | +---------------------------------------------------------------+ | runningContainers | int | The number of containers currently running for the application | +---------------------------------------------------------------+</caption>
<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">name</td>
<td align="left">string</td>
<td align="left">The application name</td></tr>
<tr class="a">
<td align="left">Application Type</td>
<td align="left">string</td>
<td align="left">The application type</td></tr>
<tr class="b">
<td align="left">queue</td>
<td align="left">string</td>
<td align="left">The queue the application was submitted to</td></tr>
<tr class="a">
<td align="left">state</td>
<td align="left">string</td>
<td align="left">The application state according to the ResourceManager - valid values are members of the YarnApplicationState enum: NEW, NEW_SAVING, SUBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED</td></tr>
<tr class="b">
<td align="left">finalStatus</td>
<td align="left">string</td>
<td align="left">The final status of the application if finished - reported by the application itself - valid values are: UNDEFINED, SUCCEEDED, FAILED, KILLED</td></tr>
<tr class="a">
<td align="left">progress</td>
<td align="left">float</td>
<td align="left">The progress of the application as a percent</td></tr>
<tr class="b">
<td align="left">trackingUI</td>
<td align="left">string</td>
<td align="left">Where the tracking url is currently pointing - History (for history server) or ApplicationMaster</td></tr>
<tr class="a">
<td align="left">trackingUrl</td>
<td align="left">string</td>
<td align="left">The web URL that can be used to track the application</td></tr>
<tr class="b">
<td align="left">diagnostics</td>
<td align="left">string</td>
<td align="left">Detailed diagnostics information</td></tr>
<tr class="a">
<td align="left">clusterId</td>
<td align="left">long</td>
<td align="left">The cluster id</td></tr>
<tr class="b">
<td align="left">startedTime</td>
<td align="left">long</td>
<td align="left">The time in which application started (in ms since epoch)</td></tr>
<tr class="a">
<td align="left">finishedTime</td>
<td align="left">long</td>
<td align="left">The time in which the application finished (in ms since epoch)</td></tr>
<tr class="b">
<td align="left">elapsedTime</td>
<td align="left">long</td>
<td align="left">The elapsed time since the application started (in ms)</td></tr>
<tr class="a">
<td align="left">amContainerLogs</td>
<td align="left">string</td>
<td align="left">The URL of the application master container logs</td></tr>
<tr class="b">
<td align="left">amHostHttpAddress</td>
<td align="left">string</td>
<td align="left">The nodes http address of the application master</td></tr>
<tr class="a">
<td align="left">allocatedMB</td>
<td align="left">int</td>
<td align="left">The sum of memory in MB allocated to the application's running containers</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;rm http address:port&gt;/ws/v1/cluster/apps/application_1326821518301_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;finishedTime&quot; : 1326824991300,
&quot;amContainerLogs&quot; : &quot;http://host.domain.com:8042/node/containerlogs/container_1326821518301_0005_01_000001&quot;,
&quot;trackingUI&quot; : &quot;History&quot;,
&quot;state&quot; : &quot;FINISHED&quot;,
&quot;user&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;application_1326821518301_0005&quot;,
&quot;clusterId&quot; : 1326821518301,
&quot;finalStatus&quot; : &quot;SUCCEEDED&quot;,
&quot;amHostHttpAddress&quot; : &quot;host.domain.com:8042&quot;,
&quot;progress&quot; : 100,
&quot;name&quot; : &quot;Sleep job&quot;,
&quot;applicationType&quot; : &quot;Yarn&quot;,
&quot;startedTime&quot; : 1326824544552,
&quot;elapsedTime&quot; : 446748,
&quot;diagnostics&quot; : &quot;&quot;,
&quot;trackingUrl&quot; : &quot;http://host.domain.com:8088/proxy/application_1326821518301_0005/jobhistory/job/job_1326821518301_5_5&quot;,
&quot;queue&quot; : &quot;a1&quot;
}
}</pre></div>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/apps/application_1326821518301_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: 847
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_1326821518301_0005&lt;/id&gt;
&lt;user&gt;user1&lt;/user&gt;
&lt;name&gt;Sleep job&lt;/name&gt;
&lt;queue&gt;a1&lt;/queue&gt;
&lt;state&gt;FINISHED&lt;/state&gt;
&lt;finalStatus&gt;SUCCEEDED&lt;/finalStatus&gt;
&lt;progress&gt;100.0&lt;/progress&gt;
&lt;trackingUI&gt;History&lt;/trackingUI&gt;
&lt;trackingUrl&gt;http://host.domain.com:8088/proxy/application_1326821518301_0005/jobhistory/job/job_1326821518301_5_5&lt;/trackingUrl&gt;
&lt;diagnostics/&gt;
&lt;clusterId&gt;1326821518301&lt;/clusterId&gt;
&lt;startedTime&gt;1326824544552&lt;/startedTime&gt;
&lt;finishedTime&gt;1326824991300&lt;/finishedTime&gt;
&lt;elapsedTime&gt;446748&lt;/elapsedTime&gt;
&lt;amContainerLogs&gt;http://host.domain.com:8042/node/containerlogs/container_1326821518301_0005_01_000001&lt;/amContainerLogs&gt;
&lt;amHostHttpAddress&gt;host.domain.com:8042&lt;/amHostHttpAddress&gt;
&lt;/app&gt;</pre></div></div></div>
<div class="section">
<h3>Cluster Application Attempts API<a name="Cluster_Application_Attempts_API"></a></h3>
<p>With the application attempts API, you can obtain a collection of resources that represent an application attempt. When you run a GET operation on this resource, you obtain a collection of App Attempt Objects. </p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<div>
<pre> * http://&lt;rm http address:port&gt;/ws/v1/cluster/apps/{appid}/appattempts</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>appAttempts</i> object<a name="Elements_of_the_appAttempts_object"></a></h4>
<p>When you make a request for the list of app attempts, the information will be returned as an array of app attempt objects. </p>
<p>appAttempts:</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">appAttempt</td>
<td align="left">array of app attempt objects(JSON)/zero or more app attempt objects(XML)</td>
<td align="left">The collection of app attempt objects</td></tr></table></div>
<div class="section">
<h4>Elements of the <i>appAttempt</i> object<a name="Elements_of_the_appAttempt_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 app attempt id</td></tr>
<tr class="a">
<td align="left">nodeId</td>
<td align="left">string</td>
<td align="left">The node id of the node the attempt ran on</td></tr>
<tr class="b">
<td align="left">nodeHttpAddress</td>
<td align="left">string</td>
<td align="left">The node http address of the node the attempt ran on</td></tr>
<tr class="a">
<td align="left">logsLink</td>
<td align="left">string</td>
<td align="left">The http link to the app attempt logs</td></tr>
<tr class="b">
<td align="left">containerId</td>
<td align="left">string</td>
<td align="left">The id of the container for the app attempt</td></tr>
<tr class="a">
<td align="left">startTime</td>
<td align="left">long</td>
<td align="left">The start time of the attempt (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;rm http address:port&gt;/ws/v1/cluster/apps/application_1326821518301_0005/appattempts</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;appAttempts&quot; : {
&quot;appAttempt&quot; : [
{
&quot;nodeId&quot; : &quot;host.domain.com:8041&quot;,
&quot;nodeHttpAddress&quot; : &quot;host.domain.com:8042&quot;,
&quot;startTime&quot; : 1326381444693,
&quot;id&quot; : 1,
&quot;logsLink&quot; : &quot;http://host.domain.com:8042/node/containerlogs/container_1326821518301_0005_01_000001/user1&quot;,
&quot;containerId&quot; : &quot;container_1326821518301_0005_01_000001&quot;
}
]
}
}</pre></div>
<p><b>XML response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/apps/application_1326821518301_0005/appattempts
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 575
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;appAttempts&gt;
&lt;appttempt&gt;
&lt;nodeHttpAddress&gt;host.domain.com:8042&lt;/nodeHttpAddress&gt;
&lt;nodeId&gt;host.domain.com:8041&lt;/nodeId&gt;
&lt;id&gt;1&lt;/id&gt;
&lt;startTime&gt;1326381444693&lt;/startTime&gt;
&lt;containerId&gt;container_1326821518301_0005_01_000001&lt;/containerId&gt;
&lt;logsLink&gt;http://host.domain.com:8042/node/containerlogs/container_1326821518301_0005_01_000001/user1&lt;/logsLink&gt;
&lt;/appAttempt&gt;
&lt;/appAttempts&gt;</pre></div></div></div>
<div class="section">
<h3>Cluster Nodes API<a name="Cluster_Nodes_API"></a></h3>
<p>With the Nodes API, you can obtain a collection of resources, each of which represents a node. When you run a GET operation on this resource, you obtain a collection of Node Objects. </p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<div>
<pre> * http://&lt;rm http address:port&gt;/ws/v1/cluster/nodes</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> * state - the state of the node
* healthy - true or false </pre></div></div>
<div class="section">
<h4>Elements of the <i>nodes</i> object<a name="Elements_of_the_nodes_object"></a></h4>
<p>When you make a request for the list of nodes, the information will be returned as a collection of node objects. See also <a href="#Node_API">Node API</a> for syntax of the node 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">node</td>
<td align="left">array of node objects(JSON)/zero or more node objects(XML)</td>
<td align="left">A collection of node 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;rm http address:port&gt;/ws/v1/cluster/nodes</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;nodes&quot;:
{
&quot;node&quot;:
[
{
&quot;rack&quot;:&quot;\/default-rack&quot;,
&quot;state&quot;:&quot;NEW&quot;,
&quot;id&quot;:&quot;h2:1235&quot;,
&quot;nodeHostName&quot;:&quot;h2&quot;,
&quot;nodeHTTPAddress&quot;:&quot;h2:2&quot;,
&quot;healthStatus&quot;:&quot;Healthy&quot;,
&quot;lastHealthUpdate&quot;:1324056895432,
&quot;healthReport&quot;:&quot;Healthy&quot;,
&quot;numContainers&quot;:0,
&quot;usedMemoryMB&quot;:0
&quot;availMemoryMB&quot;:8192
},
{
&quot;rack&quot;:&quot;\/default-rack&quot;,
&quot;state&quot;:&quot;NEW&quot;,
&quot;id&quot;:&quot;h1:1234&quot;,
&quot;nodeHostName&quot;:&quot;h1&quot;,
&quot;nodeHTTPAddress&quot;:&quot;h1:2&quot;,
&quot;healthStatus&quot;:&quot;Healthy&quot;,
&quot;lastHealthUpdate&quot;:1324056895092,
&quot;healthReport&quot;:&quot;Healthy&quot;,
&quot;numContainers&quot;:0,
&quot;usedMemoryMB&quot;:0,
&quot;availMemoryMB&quot;:8192
}
]
}
}</pre></div>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/nodes
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1104
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;nodes&gt;
&lt;node&gt;
&lt;rack&gt;/default-rack&lt;/rack&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;id&gt;h2:1234&lt;/id&gt;
&lt;nodeHostName&gt;h2&lt;/nodeHostName&gt;
&lt;nodeHTTPAddress&gt;h2:2&lt;/nodeHTTPAddress&gt;
&lt;healthStatus&gt;Healthy&lt;/healthStatus&gt;
&lt;lastHealthUpdate&gt;1324333268447&lt;/lastHealthUpdate&gt;
&lt;healthReport&gt;Healthy&lt;/healthReport&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;usedMemoryMB&gt;0&lt;/usedMemoryMB&gt;
&lt;availMemoryMB&gt;5120&lt;/availMemoryMB&gt;
&lt;/node&gt;
&lt;node&gt;
&lt;rack&gt;/default-rack&lt;/rack&gt;
&lt;state&gt;RUNNING&lt;/state&gt;
&lt;id&gt;h1:1234&lt;/id&gt;
&lt;nodeHostName&gt;h1&lt;/nodeHostName&gt;
&lt;nodeHTTPAddress&gt;h1:2&lt;/nodeHTTPAddress&gt;
&lt;healthStatus&gt;Healthy&lt;/healthStatus&gt;
&lt;lastHealthUpdate&gt;1324333268447&lt;/lastHealthUpdate&gt;
&lt;healthReport&gt;Healthy&lt;/healthReport&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;usedMemoryMB&gt;0&lt;/usedMemoryMB&gt;
&lt;availMemoryMB&gt;5120&lt;/availMemoryMB&gt;
&lt;/node&gt;
&lt;/nodes&gt;</pre></div></div></div>
<div class="section">
<h3>Cluster <a name="Node_API">Node API</a><a name="Cluster_Node_API"></a></h3>
<p>A node resource contains information about a node in the cluster. </p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<p>Use the following URI to obtain a Node Object, from a node identified by the <a name="nodeid">nodeid</a> value. </p>
<div>
<pre> * http://&lt;rm http address:port&gt;/ws/v1/cluster/nodes/{nodeid}</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>node</i> object<a name="Elements_of_the_node_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">rack</td>
<td align="left">string</td>
<td align="left">The rack location of this node</td></tr>
<tr class="a">
<td align="left">state</td>
<td align="left">string</td>
<td align="left">State of the node - valid values are: NEW, RUNNING, UNHEALTHY, DECOMMISSIONED, LOST, REBOOTED</td></tr>
<tr class="b">
<td align="left">id</td>
<td align="left">string</td>
<td align="left">The node id</td></tr>
<tr class="a">
<td align="left">nodeHostName</td>
<td align="left">string</td>
<td align="left">The host name of the node</td></tr>
<tr class="b">
<td align="left">nodeHTTPAddress</td>
<td align="left">string</td>
<td align="left">The nodes HTTP address</td></tr>
<tr class="a">
<td align="left">healthStatus</td>
<td align="left">string</td>
<td align="left">The health status of the node - Healthy or Unhealthy</td></tr>
<tr class="b">
<td align="left">healthReport</td>
<td align="left">string</td>
<td align="left">A detailed health report</td></tr>
<tr class="a">
<td align="left">lastHealthUpdate</td>
<td align="left">long</td>
<td align="left">The last time the node reported its health (in ms since epoch)</td></tr>
<tr class="b">
<td align="left">usedMemoryMB</td>
<td align="left">long</td>
<td align="left">The total about of memory currently used on the node (in MB)</td></tr>
<tr class="a">
<td align="left">availMemoryMB</td>
<td align="left">long</td>
<td align="left">The total amount of memory currently available on the node (in MB)</td></tr>
<tr class="b">
<td align="left">numContainers</td>
<td align="left">int</td>
<td align="left">The total number of containers currently running on the node</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;rm http address:port&gt;/ws/v1/cluster/nodes/h2:1235</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;node&quot;:
{
&quot;rack&quot;:&quot;\/default-rack&quot;,
&quot;state&quot;:&quot;NEW&quot;,
&quot;id&quot;:&quot;h2:1235&quot;,
&quot;nodeHostName&quot;:&quot;h2&quot;,
&quot;nodeHTTPAddress&quot;:&quot;h2:2&quot;,
&quot;healthStatus&quot;:&quot;Healthy&quot;,
&quot;lastHealthUpdate&quot;:1324056895432,
&quot;healthReport&quot;:&quot;Healthy&quot;,
&quot;numContainers&quot;:0,
&quot;usedMemoryMB&quot;:0,
&quot;availMemoryMB&quot;:5120
}
}</pre></div>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<div>
<pre> GET http://&lt;rm http address:port&gt;/ws/v1/cluster/node/h2:1235
Accept: application/xml</pre></div>
<p>Response Header:</p>
<div class="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 552
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;node&gt;
&lt;rack&gt;/default-rack&lt;/rack&gt;
&lt;state&gt;NEW&lt;/state&gt;
&lt;id&gt;h2:1235&lt;/id&gt;
&lt;nodeHostName&gt;h2&lt;/nodeHostName&gt;
&lt;nodeHTTPAddress&gt;h2:2&lt;/nodeHTTPAddress&gt;
&lt;healthStatus&gt;Healthy&lt;/healthStatus&gt;
&lt;lastHealthUpdate&gt;1324333268447&lt;/lastHealthUpdate&gt;
&lt;healthReport&gt;Healthy&lt;/healthReport&gt;
&lt;numContainers&gt;0&lt;/numContainers&gt;
&lt;usedMemoryMB&gt;0&lt;/usedMemoryMB&gt;
&lt;availMemoryMB&gt;5120&lt;/availMemoryMB&gt;
&lt;/node&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