<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html">Compatibilty between Hadoop 1.x and Hadoop 2.x</a>
<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">
<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>
<resourceManagerBuildVersion>0.23.1-SNAPSHOT from 1214049 by user1 source checksum 050cd664439d931c8743a6428fd6a693</resourceManagerBuildVersion>
<resourceManagerVersionBuiltOn>Tue Dec 13 22:12:48 CST 2011</resourceManagerVersionBuiltOn>
<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>
<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>
<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>
<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>
<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&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>
<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>
<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>
<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'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>
<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>
<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>
<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>