<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></section><section>
<h2><aname="Enabling_CORS_support"></a>Enabling CORS support</h2>
<p>To enable cross-origin support (CORS) for the RM only(without enabling it for the NM), please set the following configuration parameters:</p>
<p>In core-site.xml, add org.apache.hadoop.security.HttpCrossOriginFilterInitializer to hadoop.http.filter.initializers. In yarn-site.xml, set yarn.resourcemanager.webapp.cross-origin.enabled to true.</p></section><section>
<h2><aname="Cluster_Information_API"></a>Cluster Information API</h2>
<p>The cluster information resource provides overall information about the cluster.</p><section>
<h3><aname="URI"></a>URI</h3>
<p>Both of the following URI’s give you the cluster information.</p>
<resourceManagerBuildVersion>3.0.0-SNAPSHOT from unknown by user1 source checksum 11111111111111111111111111111111</resourceManagerBuildVersion>
<p>The cluster metrics resource provides some overall metrics about the cluster. More detailed metrics should be retrieved from the jmx interface.</p><section>
<p>A scheduler resource contains information about the current scheduler configured in a cluster. It currently supports the Fifo, Capacity and Fair Scheduler. You will get different information depending on which scheduler is configured so be sure to look at the type information.</p><section>
<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></section><section>
<h3><aname="Elements_of_the_schedulerInfo_object"></a>Elements of the <i>schedulerInfo</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> type </td>
<tdalign="left"> string </td>
<tdalign="left"> Scheduler type - capacityScheduler </td></tr>
<trclass="a">
<tdalign="left"> capacity </td>
<tdalign="left"> float </td>
<tdalign="left"> Configured queue capacity in percentage relative to its parent queue </td></tr>
<trclass="b">
<tdalign="left"> usedCapacity </td>
<tdalign="left"> float </td>
<tdalign="left"> Used queue capacity in percentage </td></tr>
<trclass="a">
<tdalign="left"> maxCapacity </td>
<tdalign="left"> float </td>
<tdalign="left"> Configured maximum queue capacity in percentage relative to its parent queue </td></tr>
<trclass="b">
<tdalign="left"> queueName </td>
<tdalign="left"> string </td>
<tdalign="left"> Name of the queue </td></tr>
<trclass="a">
<tdalign="left"> queues </td>
<tdalign="left"> array of queues(JSON)/zero or more queue objects(XML) </td>
<tdalign="left"> A collection of queue resources </td></tr>
<trclass="b">
<tdalign="left"> health </td>
<tdalign="left"> A single health object </td>
<tdalign="left"> The health metrics of capacity scheduler. This metrics existed since 2.8.0, but the output was not well formatted. Hence users can not make use of this field cleanly, this is optimized from 3.2.0 onwards. </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_queues_object_for_a_Parent_queue"></a>Elements of the queues object for a Parent queue</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> capacity </td>
<tdalign="left"> float </td>
<tdalign="left"> Configured queue capacity in percentage relative to its parent queue </td></tr>
<trclass="a">
<tdalign="left"> usedCapacity </td>
<tdalign="left"> float </td>
<tdalign="left"> Used queue capacity in percentage </td></tr>
<trclass="b">
<tdalign="left"> maxCapacity </td>
<tdalign="left"> float </td>
<tdalign="left"> Configured maximum queue capacity in percentage relative to its parent queue </td></tr>
<trclass="a">
<tdalign="left"> absoluteCapacity </td>
<tdalign="left"> float </td>
<tdalign="left"> Absolute capacity percentage this queue can use of entire cluster </td></tr>
<trclass="b">
<tdalign="left"> absoluteMaxCapacity </td>
<tdalign="left"> float </td>
<tdalign="left"> Absolute maximum capacity percentage this queue can use of the entire cluster </td></tr>
<trclass="a">
<tdalign="left"> absoluteUsedCapacity </td>
<tdalign="left"> float </td>
<tdalign="left"> Absolute used capacity percentage this queue is using of the entire cluster </td></tr>
<trclass="b">
<tdalign="left"> numApplications </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of applications currently in the queue </td></tr>
<trclass="a">
<tdalign="left"> maxParallelApps </td>
<tdalign="left"> int </td>
<tdalign="left"> Maximum number of applications that can run at the same time </td></tr>
<trclass="b">
<tdalign="left"> usedResources </td>
<tdalign="left"> string </td>
<tdalign="left"> A string describing the current resources used by the queue </td></tr>
<trclass="a">
<tdalign="left"> queueName </td>
<tdalign="left"> string </td>
<tdalign="left"> The name of the queue </td></tr>
<trclass="b">
<tdalign="left"> state </td>
<tdalign="left"> string of QueueState </td>
<tdalign="left"> The state of the queue </td></tr>
<trclass="a">
<tdalign="left"> queues </td>
<tdalign="left"> array of queues(JSON)/zero or more queue objects(XML) </td>
<tdalign="left"> A collection of sub-queue information. Omitted if the queue has no sub-queues. </td></tr>
<trclass="b">
<tdalign="left"> resourcesUsed </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The total amount of resources used by this queue </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_queues_object_for_a_Leaf_queue_-_contains_all_the_elements_in_parent_except_.E2.80.98queues.E2.80.99_plus_the_following:"></a>Elements of the queues object for a Leaf queue - contains all the elements in parent except ‘queues’ plus the following:</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> type </td>
<tdalign="left"> String </td>
<tdalign="left"> type of the queue - capacitySchedulerLeafQueueInfo </td></tr>
<trclass="a">
<tdalign="left"> numActiveApplications </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of active applications in this queue </td></tr>
<trclass="b">
<tdalign="left"> numPendingApplications </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of pending applications in this queue </td></tr>
<trclass="a">
<tdalign="left"> numContainers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of containers being used </td></tr>
<trclass="b">
<tdalign="left"> allocatedContainers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of allocated containers in this queue </td></tr>
<trclass="a">
<tdalign="left"> reservedContainers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of reserved containers in this queue </td></tr>
<trclass="b">
<tdalign="left"> pendingContainers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of pending containers in this queue </td></tr>
<trclass="a">
<tdalign="left"> maxApplications </td>
<tdalign="left"> int </td>
<tdalign="left"> The maximum number of applications this queue can have </td></tr>
<trclass="b">
<tdalign="left"> maxApplicationsPerUser </td>
<tdalign="left"> int </td>
<tdalign="left"> The maximum number of applications per user this queue can have </td></tr>
<trclass="a">
<tdalign="left"> maxActiveApplications </td>
<tdalign="left"> int </td>
<tdalign="left"> The maximum number of active applications this queue can have </td></tr>
<tdalign="left"> The maximum number of active applications per user this queue can have </td></tr>
<trclass="a">
<tdalign="left"> userLimit </td>
<tdalign="left"> int </td>
<tdalign="left"> The minimum user limit percent set in the configuration </td></tr>
<trclass="b">
<tdalign="left"> userLimitFactor </td>
<tdalign="left"> float </td>
<tdalign="left"> The user limit factor set in the configuration </td></tr>
<trclass="a">
<tdalign="left"> users </td>
<tdalign="left"> array of users(JSON)/zero or more user objects(XML) </td>
<tdalign="left"> A collection of user objects containing resources used </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_user_object_for_users:"></a>Elements of the user object for users:</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> username </td>
<tdalign="left"> String </td>
<tdalign="left"> The username of the user using the resources </td></tr>
<trclass="a">
<tdalign="left"> resourcesUsed </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The amount of resources used by the user in this queue </td></tr>
<trclass="b">
<tdalign="left"> numActiveApplications </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of active applications for this user in this queue </td></tr>
<trclass="a">
<tdalign="left"> numPendingApplications </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of pending applications for this user in this queue </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_resource_object_for_resourcesUsed_in_user_and_queues:"></a>Elements of the resource object for resourcesUsed in user and queues:</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> memory </td>
<tdalign="left"> int </td>
<tdalign="left"> The amount of memory used (in MB) </td></tr>
<trclass="a">
<tdalign="left"> vCores </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of virtual cores </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_health_object_in_schedulerInfo:"></a>Elements of the health object in schedulerInfo:</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> lastrun </td>
<tdalign="left"> long </td>
<tdalign="left"> The time in which application started (in ms since epoch) </td></tr>
<trclass="a">
<tdalign="left"> operationsInfo </td>
<tdalign="left"> array of operations(JSON)/operation objects(XML) </td>
<tdalign="left"> A collection of operation objects </td></tr>
<trclass="b">
<tdalign="left"> lastRunDetails </td>
<tdalign="left"> array of lastRunDetails(JSON)/lastRunDetail objects(XML) </td>
<tdalign="left"> A collection of lastRunDetail objects </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_operation_object_in_health:"></a>Elements of the operation object in health:</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> operation </td>
<tdalign="left"> string </td>
<tdalign="left"> The type of operation </td></tr>
<trclass="a">
<tdalign="left"> nodeId </td>
<tdalign="left"> string </td>
<tdalign="left"> The id of the node to which the operation relates </td></tr>
<trclass="b">
<tdalign="left"> containerId </td>
<tdalign="left"> string </td>
<tdalign="left"> The id of the container to which the operation relates </td></tr>
<trclass="a">
<tdalign="left"> queue </td>
<tdalign="left"> string </td>
<tdalign="left"> The name of the queue to which the operation relates </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_lastRunDetail_object_in_health:"></a>Elements of the lastRunDetail object in health:</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> operation </td>
<tdalign="left"> string </td>
<tdalign="left"> The type of operation </td></tr>
<trclass="a">
<tdalign="left"> count </td>
<tdalign="left"> long </td>
<tdalign="left"> The id of the node to which the operation relates </td></tr>
<trclass="b">
<tdalign="left"> resources </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The resources to which the operation relates </td></tr>
<h3><aname="Elements_of_the_schedulerInfo_object"></a>Elements of the <i>schedulerInfo</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> type </td>
<tdalign="left"> string </td>
<tdalign="left"> Scheduler type - fairScheduler </td></tr>
<trclass="a">
<tdalign="left"> rootQueue </td>
<tdalign="left"> The root queue object </td>
<tdalign="left"> A collection of root queue resources </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_all_queue_objects"></a>Elements of all queue objects</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> maxApps </td>
<tdalign="left"> int </td>
<tdalign="left"> The maximum number of applications the queue can have </td></tr>
<trclass="a">
<tdalign="left"> minResources </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The configured minimum resources that are guaranteed to the queue </td></tr>
<trclass="b">
<tdalign="left"> maxResources </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The configured maximum resources that are allowed to the queue </td></tr>
<trclass="a">
<tdalign="left"> usedResources </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The sum of resources allocated to containers within the queue </td></tr>
<trclass="b">
<tdalign="left"> fairResources </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The queue’s fair share of resources </td></tr>
<trclass="a">
<tdalign="left"> clusterResources </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The capacity of the cluster </td></tr>
<trclass="b">
<tdalign="left"> queueName </td>
<tdalign="left"> string </td>
<tdalign="left"> The name of the queue </td></tr>
<trclass="a">
<tdalign="left"> schedulingPolicy </td>
<tdalign="left"> string </td>
<tdalign="left"> The name of the scheduling policy used by the queue </td></tr>
<trclass="b">
<tdalign="left"> childQueues </td>
<tdalign="left"> array of queues(JSON)/queue objects(XML) </td>
<tdalign="left"> A collection of sub-queue information. Omitted if the queue has no childQueues or is a leaf queue. </td></tr>
<trclass="a">
<tdalign="left"> allocatedContainers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of allocated containers </td></tr>
<trclass="b">
<tdalign="left"> demandResources </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The resources that have been requested by containers in this queue which have not been fulfilled by the scheduler </td></tr>
<trclass="a">
<tdalign="left"> pendingContainers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of pending containers </td></tr>
<trclass="b">
<tdalign="left"> preemptable </td>
<tdalign="left"> boolean </td>
<tdalign="left"> true if containers in this queue can be preempted </td></tr>
<trclass="a">
<tdalign="left"> reservedContainers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of reserved containers </td></tr>
<trclass="b">
<tdalign="left"> steadyFairResources </td>
<tdalign="left"> A single resource object </td>
<tdalign="left"> The steady fair share for the queue </td></tr>
</tbody>
</table></section><section>
<h3><aname="Additional_elements_of_leaf_queue_objects_.28with_the_exception_of_the_.E2.80.98childQueues.E2.80.99_property.29"></a>Additional elements of leaf queue objects (with the exception of the ‘childQueues’ property)</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> type </td>
<tdalign="left"> string </td>
<tdalign="left"> The type of the queue - fairSchedulerLeafQueueInfo </td></tr>
<trclass="a">
<tdalign="left"> numActiveApps </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of active applications in this queue </td></tr>
<trclass="b">
<tdalign="left"> numPendingApps </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of pending applications in this queue </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_.28cluster.2Fdemand.2Ffair.2Fmax.2Fmin.2Fused.2F.2A.29Resources_object_in_queues"></a>Elements of the (cluster/demand/fair/max/min/used/*)Resources object in queues</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> memory </td>
<tdalign="left"> int </td>
<tdalign="left"> The amount of memory used (in MB) </td></tr>
<trclass="a">
<tdalign="left"> vCores </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of virtual cores </td></tr>
<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><section>
<p>Multiple parameters can be specified for GET operations. 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. All query parameters for this api will filter on all applications. However the <code>queue</code> query parameter will only implicitly filter on unfinished applications that are currently in the given queue.</p>
<ul>
<li>state [deprecated] - state of the application
<ul>
<li>states - applications matching the given application states, specified as a comma-separated list.</li>
<li>finalStatus - the final status of the application - reported by the application itself</li>
<li>user - user name</li>
<li>queue - unfinished applications that are currently in this queue</li>
<li>limit - total number of app objects to be returned</li>
<li>startedTimeBegin - applications with start time beginning with this time, specified in ms since epoch</li>
<li>startedTimeEnd - applications with start time ending with this time, specified in ms since epoch</li>
<li>finishedTimeBegin - applications with finish time beginning with this time, specified in ms since epoch</li>
<li>finishedTimeEnd - applications with finish time ending with this time, specified in ms since epoch</li>
<li>applicationTypes - applications matching the given application types, specified as a comma-separated list.</li>
<li>applicationTags - applications matching any of the given application tags, specified as a comma-separated list.</li>
<li>name - name of the application</li>
<li>deSelects - a generic fields which will be skipped in the result.</li>
</ul>
</li>
</ul></section><section>
<h3><aname="Elements_of_the_apps_.28Applications.29_object"></a>Elements of the <i>apps</i> (Applications) object</h3>
<p>When you make a request for the list of applications, the information will be returned as a collection of app objects. See also <ahref="#Application_API">Application API</a> for syntax of the app object.</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> app </td>
<tdalign="left"> array of app objects(JSON)/zero or more application objects(XML) </td>
<tdalign="left"> The collection of application objects </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_deSelects_parameter"></a>Elements of the <i>deSelects</i> parameter</h3>
<p>Help requesters who don’t need certain information to reduce the overhead.</p>
<p>Current supported items:</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> resourceRequests </td>
<tdalign="left"> comma separated string </td>
<tdalign="left"> Skip resource requests of application in return </td></tr>
<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><section>
<p>Two parameters can be specified. The parameters are case insensitive.</p>
<ul>
<li>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.
<ul>
<li>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.</li>
</ul>
</li>
</ul></section><section>
<h3><aname="Elements_of_the_appStatInfo_.28statItems.29_object"></a>Elements of the <i>appStatInfo</i> (statItems) object</h3>
<p>When you make a request for the list of statistics items, the information will be returned as a collection of statItem objects</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> statItem </td>
<tdalign="left"> array of statItem objects(JSON)/zero or more statItem objects(XML) </td>
<tdalign="left"> The collection of statItem objects </td></tr>
<h3><aname="Elements_of_the_app_.28Application.29_object"></a>Elements of the <i>app</i> (Application) object</h3>
<p>Note that depending on security settings a user might not be able to see all the fields.</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> id </td>
<tdalign="left"> string </td>
<tdalign="left"> The application id </td></tr>
<trclass="a">
<tdalign="left"> user </td>
<tdalign="left"> string </td>
<tdalign="left"> The user who started the application </td></tr>
<trclass="b">
<tdalign="left"> name </td>
<tdalign="left"> string </td>
<tdalign="left"> The application name </td></tr>
<trclass="a">
<tdalign="left"> queue </td>
<tdalign="left"> string </td>
<tdalign="left"> The queue the application was submitted to </td></tr>
<trclass="b">
<tdalign="left"> state </td>
<tdalign="left"> string </td>
<tdalign="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>
<trclass="a">
<tdalign="left"> finalStatus </td>
<tdalign="left"> string </td>
<tdalign="left"> The final status of the application if finished - reported by the application itself - valid values are the members of the FinalApplicationStatus enum: UNDEFINED, SUCCEEDED, FAILED, KILLED </td></tr>
<trclass="b">
<tdalign="left"> progress </td>
<tdalign="left"> float </td>
<tdalign="left"> The progress of the application as a percent </td></tr>
<trclass="a">
<tdalign="left"> trackingUI </td>
<tdalign="left"> string </td>
<tdalign="left"> Where the tracking url is currently pointing - History (for history server) or ApplicationMaster </td></tr>
<trclass="b">
<tdalign="left"> trackingUrl </td>
<tdalign="left"> string </td>
<tdalign="left"> The web URL that can be used to track the application </td></tr>
<trclass="a">
<tdalign="left"> diagnostics </td>
<tdalign="left"> string </td>
<tdalign="left"> Detailed diagnostics information </td></tr>
<trclass="b">
<tdalign="left"> clusterId </td>
<tdalign="left"> long </td>
<tdalign="left"> The cluster id </td></tr>
<trclass="a">
<tdalign="left"> applicationType </td>
<tdalign="left"> string </td>
<tdalign="left"> The application type </td></tr>
<trclass="b">
<tdalign="left"> applicationTags </td>
<tdalign="left"> string </td>
<tdalign="left"> Comma separated tags of an application </td></tr>
<trclass="a">
<tdalign="left"> priority </td>
<tdalign="left"> string </td>
<tdalign="left"> Priority of the submitted application </td></tr>
<trclass="b">
<tdalign="left"> startedTime </td>
<tdalign="left"> long </td>
<tdalign="left"> The time in which application started (in ms since epoch) </td></tr>
<trclass="a">
<tdalign="left"> finishedTime </td>
<tdalign="left"> long </td>
<tdalign="left"> The time in which the application finished (in ms since epoch) </td></tr>
<trclass="b">
<tdalign="left"> elapsedTime </td>
<tdalign="left"> long </td>
<tdalign="left"> The elapsed time since the application started (in ms) </td></tr>
<trclass="a">
<tdalign="left"> amContainerLogs </td>
<tdalign="left"> string </td>
<tdalign="left"> The URL of the application master container logs </td></tr>
<trclass="b">
<tdalign="left"> amHostHttpAddress </td>
<tdalign="left"> string </td>
<tdalign="left"> The nodes http address of the application master </td></tr>
<trclass="a">
<tdalign="left"> amRPCAddress </td>
<tdalign="left"> string </td>
<tdalign="left"> The RPC address of the application master </td></tr>
<trclass="b">
<tdalign="left"> allocatedMB </td>
<tdalign="left"> int </td>
<tdalign="left"> The sum of memory in MB allocated to the application’s running containers </td></tr>
<trclass="a">
<tdalign="left"> allocatedVCores </td>
<tdalign="left"> int </td>
<tdalign="left"> The sum of virtual cores allocated to the application’s running containers </td></tr>
<trclass="b">
<tdalign="left"> runningContainers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of containers currently running for the application </td></tr>
<trclass="a">
<tdalign="left"> memorySeconds </td>
<tdalign="left"> long </td>
<tdalign="left"> The amount of memory the application has allocated (megabyte-seconds) </td></tr>
<trclass="b">
<tdalign="left"> vcoreSeconds </td>
<tdalign="left"> long </td>
<tdalign="left"> The amount of CPU resources the application has allocated (virtual core-seconds) </td></tr>
<trclass="a">
<tdalign="left"> queueUsagePercentage </td>
<tdalign="left"> float </td>
<tdalign="left"> The percentage of resources of the queue that the app is using </td></tr>
<trclass="b">
<tdalign="left"> clusterUsagePercentage </td>
<tdalign="left"> float </td>
<tdalign="left"> The percentage of resources of the cluster that the app is using. </td></tr>
<trclass="a">
<tdalign="left"> preemptedResourceMB </td>
<tdalign="left"> long </td>
<tdalign="left"> Memory used by preempted container </td></tr>
<trclass="b">
<tdalign="left"> preemptedResourceVCores </td>
<tdalign="left"> long </td>
<tdalign="left"> Number of virtual cores used by preempted container </td></tr>
<trclass="a">
<tdalign="left"> numNonAMContainerPreempted </td>
<tdalign="left"> int </td>
<tdalign="left"> Number of standard containers preempted </td></tr>
<trclass="b">
<tdalign="left"> numAMContainerPreempted </td>
<tdalign="left"> int </td>
<tdalign="left"> Number of application master containers preempted </td></tr>
<trclass="a">
<tdalign="left"> logAggregationStatus </td>
<tdalign="left"> string </td>
<tdalign="left"> Status of log aggregation - valid values are the members of the LogAggregationStatus enum: DISABLED, NOT_START, RUNNING, RUNNING_WITH_FAILURE, SUCCEEDED, FAILED, TIME_OUT </td></tr>
<trclass="b">
<tdalign="left"> unmanagedApplication </td>
<tdalign="left"> boolean </td>
<tdalign="left"> Is the application unmanaged. </td></tr>
<trclass="a">
<tdalign="left"> appNodeLabelExpression </td>
<tdalign="left"> string </td>
<tdalign="left"> Node Label expression which is used to identify the nodes on which application’s containers are expected to run by default.</td></tr>
<trclass="b">
<tdalign="left"> amNodeLabelExpression </td>
<tdalign="left"> string </td>
<tdalign="left"> Node Label expression which is used to identify the node on which application’s AM container is expected to run.</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><section>
<h3><aname="Elements_of_the_appAttempts_object"></a>Elements of the <i>appAttempts</i> object</h3>
<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>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> appAttempt </td>
<tdalign="left"> array of app attempt objects(JSON)/zero or more app attempt objects(XML) </td>
<tdalign="left"> The collection of app attempt objects </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_appAttempt_object"></a>Elements of the <i>appAttempt</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> id </td>
<tdalign="left"> string </td>
<tdalign="left"> The app attempt id </td></tr>
<trclass="a">
<tdalign="left"> nodeId </td>
<tdalign="left"> string </td>
<tdalign="left"> The node id of the node the attempt ran on </td></tr>
<trclass="b">
<tdalign="left"> nodeHttpAddress </td>
<tdalign="left"> string </td>
<tdalign="left"> The node http address of the node the attempt ran on </td></tr>
<trclass="a">
<tdalign="left"> logsLink </td>
<tdalign="left"> string </td>
<tdalign="left"> The http link to the app attempt logs </td></tr>
<trclass="b">
<tdalign="left"> containerId </td>
<tdalign="left"> string </td>
<tdalign="left"> The id of the container for the app attempt </td></tr>
<trclass="a">
<tdalign="left"> startTime </td>
<tdalign="left"> long </td>
<tdalign="left"> The start time of the attempt (in ms since epoch) </td></tr>
<trclass="b">
<tdalign="left"> appAttemptState </td>
<tdalign="left"> string </td>
<tdalign="left"> The state of the application attempt - valid values are members of the RMAppAttemptState enum: NEW, SUBMITTED, SCHEDULED, ALLOCATED, LAUNCHED, FAILED, RUNNING, FINISHING, FINISHED, KILLED, ALLOCATED_SAVING, LAUNCHED_UNMANAGED_SAVING, FINAL_SAVING </td></tr>
<h2><aname="Specific_Container_for_an_Application_Attempt_API"></a>Specific Container for an Application Attempt API</h2>
<p>With Specific Container for an Application Attempt API you can obtain information about a specific container, which belongs to an Application Attempt and selected by the container id.</p><section>
<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><section>
<li>states - the states of the node, specified as a comma-separated list, valid values are: NEW, RUNNING, UNHEALTHY, DECOMMISSIONING, DECOMMISSIONED, LOST, REBOOTED, SHUTDOWN</li>
</ul></section><section>
<h3><aname="Elements_of_the_nodes_object"></a>Elements of the <i>nodes</i> object</h3>
<p>When you make a request for the list of nodes, the information will be returned as a collection of node objects. See also <ahref="#Node_API">Node API</a> for syntax of the node object.</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> node </td>
<tdalign="left"> array of node objects(JSON)/zero or more node objects(XML) </td>
<tdalign="left"> A collection of node objects </td></tr>
<p>The sections below refer to APIs which allow to create and modify applications. These APIs are currently in alpha and may change in the future.</p></section><section>
<h2><aname="Cluster_New_Application_API"></a>Cluster New Application API</h2>
<p>With the New Application API, you can obtain an application-id which can then be used as part of the <ahref="#Cluster_Applications_APISubmit_Application">Cluster Submit Applications API</a> to submit applications. The response also includes the maximum resource capabilities available on the cluster.</p>
<p>This feature is currently in the alpha stage and may change in the future.</p><section>
<p>The Submit Applications API can be used to submit applications. In case of submitting applications, you must first obtain an application-id using the <ahref="#Cluster_New_Application_API">Cluster New Application API</a>. The application-id must be part of the request body. The response contains a URL to the application page which can be used to track the state and progress of your application.</p><section>
<p>POST requests can be used to submit apps to the ResourceManager. As mentioned above, an application-id must be obtained first. Successful submissions result in a 202 response code and a Location header specifying where to get information about the app. Please note that in order to submit an app, you must have an authentication filter setup for the HTTP interface. The functionality requires that a username is set in the HttpServletRequest. If no filter is setup, the response will be an “UNAUTHORIZED” response.</p>
<p>Please note that this feature is currently in the alpha stage and may change in the future.</p><section>
<h4><aname="Elements_of_the_POST_request_object"></a>Elements of the POST request object</h4>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> application-id </td>
<tdalign="left"> string </td>
<tdalign="left"> The application id </td></tr>
<trclass="a">
<tdalign="left"> application-name </td>
<tdalign="left"> string </td>
<tdalign="left"> The application name </td></tr>
<trclass="b">
<tdalign="left"> queue </td>
<tdalign="left"> string </td>
<tdalign="left"> The name of the queue to which the application should be submitted </td></tr>
<trclass="a">
<tdalign="left"> priority </td>
<tdalign="left"> int </td>
<tdalign="left"> The priority of the application </td></tr>
<trclass="b">
<tdalign="left"> am-container-spec </td>
<tdalign="left"> object </td>
<tdalign="left"> The application master container launch context, described below </td></tr>
<trclass="a">
<tdalign="left"> unmanaged-AM </td>
<tdalign="left"> boolean </td>
<tdalign="left"> Is the application using an unmanaged application master </td></tr>
<trclass="b">
<tdalign="left"> max-app-attempts </td>
<tdalign="left"> int </td>
<tdalign="left"> The max number of attempts for this application </td></tr>
<trclass="a">
<tdalign="left"> resource </td>
<tdalign="left"> object </td>
<tdalign="left"> The resources the application master requires, described below </td></tr>
<trclass="b">
<tdalign="left"> application-type </td>
<tdalign="left"> string </td>
<tdalign="left"> The application type(MapReduce, Pig, Hive, etc) </td></tr>
<tdalign="left"> The failure number will no take attempt failures which happen out of the validityInterval into failure count</td></tr>
<trclass="a">
<tdalign="left"> reservation-id</td>
<tdalign="left"> string </td>
<tdalign="left"> Represent the unique id of the corresponding reserved resource allocation in the scheduler </td></tr>
<trclass="b">
<tdalign="left"> am-black-listing-requests</td>
<tdalign="left"> object </td>
<tdalign="left"> Contains blacklisting information such as “enable/disable AM blacklisting” and “disable failure threshold”</td></tr>
</tbody>
</table>
<p>Elements of the <i>am-container-spec</i> object</p>
<p>The am-container-spec object should be used to provide the container launch context for the application master.</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> local-resources </td>
<tdalign="left"> object </td>
<tdalign="left"> Object describing the resources that need to be localized, described below </td></tr>
<trclass="a">
<tdalign="left"> environment </td>
<tdalign="left"> object </td>
<tdalign="left"> Environment variables for your containers, specified as key value pairs </td></tr>
<trclass="b">
<tdalign="left"> commands </td>
<tdalign="left"> object </td>
<tdalign="left"> The commands for launching your container, in the order in which they should be executed </td></tr>
<trclass="a">
<tdalign="left"> service-data </td>
<tdalign="left"> object </td>
<tdalign="left"> Application specific service data; key is the name of the auxiliary service, value is base-64 encoding of the data you wish to pass </td></tr>
<trclass="b">
<tdalign="left"> credentials </td>
<tdalign="left"> object </td>
<tdalign="left"> The credentials required for your application to run, described below </td></tr>
<trclass="a">
<tdalign="left"> application-acls </td>
<tdalign="left"> objec </td>
<tdalign="left"> ACLs for your application; the key can be “VIEW_APP” or “MODIFY_APP”, the value is the list of users with the permissions </td></tr>
</tbody>
</table>
<p>Elements of the <i>local-resources</i> object</p>
<p>The object is a collection of key-value pairs. They key is an identifier for the resources to be localized and the value is the details of the resource. The elements of the value are described below:</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> resource </td>
<tdalign="left"> string </td>
<tdalign="left"> Location of the resource to be localized </td></tr>
<trclass="a">
<tdalign="left"> type </td>
<tdalign="left"> string </td>
<tdalign="left"> Type of the resource; options are “ARCHIVE”, “FILE”, and “PATTERN”</td></tr>
<trclass="b">
<tdalign="left"> visibility </td>
<tdalign="left"> string </td>
<tdalign="left"> Visibility the resource to be localized; options are “PUBLIC”, “PRIVATE”, and “APPLICATION”</td></tr>
<trclass="a">
<tdalign="left"> size </td>
<tdalign="left"> long </td>
<tdalign="left"> Size of the resource to be localized </td></tr>
<trclass="b">
<tdalign="left"> timestamp </td>
<tdalign="left"> long </td>
<tdalign="left"> Timestamp of the resource to be localized </td></tr>
</tbody>
</table>
<p>Elements of the <i>credentials</i> object</p>
<p>The credentials object should be used to pass data required for the application to authenticate itself such as delegation-tokens and secrets.</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> tokens </td>
<tdalign="left"> object </td>
<tdalign="left"> Tokens that you wish to pass to your application, specified as key-value pairs. The key is an identifier for the token and the value is the token(which should be obtained using the respective web-services) </td></tr>
<trclass="a">
<tdalign="left"> secrets </td>
<tdalign="left"> object </td>
<tdalign="left"> Secrets that you wish to use in your application, specified as key-value pairs. They key is an identifier and the value is the base-64 encoding of the secret </td></tr>
</tbody>
</table>
<p>Elements of the POST request body <i>resource</i> object</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> memory </td>
<tdalign="left"> int </td>
<tdalign="left"> Memory required for each container </td></tr>
<trclass="a">
<tdalign="left"> vCores </td>
<tdalign="left"> int </td>
<tdalign="left"> Virtual cores required for each container </td></tr>
</tbody>
</table>
<p>Elements of the POST request body <i>log-aggregation-context</i> object</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> log-include-pattern </td>
<tdalign="left"> string </td>
<tdalign="left"> The log files which match the defined include pattern will be uploaded when the application finishes </td></tr>
<trclass="a">
<tdalign="left"> log-exclude-pattern </td>
<tdalign="left"> string </td>
<tdalign="left"> The log files which match the defined exclude pattern will not be uploaded when the application finishes </td></tr>
<trclass="b">
<tdalign="left"> rolled-log-include-pattern </td>
<tdalign="left"> string </td>
<tdalign="left"> The log files which match the defined include pattern will be aggregated in a rolling fashion </td></tr>
<trclass="a">
<tdalign="left"> rolled-log-exclude-pattern </td>
<tdalign="left"> string </td>
<tdalign="left"> The log files which match the defined exclude pattern will not be aggregated in a rolling fashion </td></tr>
<h2><aname="Cluster_Application_State_API"></a>Cluster Application State API</h2>
<p>With the application state API, you can query the state of a submitted app as well kill a running app by modifying the state of a running app using a PUT request with the state set to “KILLED”. To perform the PUT operation, authentication has to be setup for the RM web services. In addition, you must be authorized to kill the app. Currently you can only change the state to “KILLED”; an attempt to change the state to any other results in a 400 error response. Examples of the unauthorized and bad request errors are below. When you carry out a successful PUT, the initial response may be a 202. You can confirm that the app is killed by repeating the PUT request until you get a 200, querying the state using the GET method or querying for app information and checking the state. In the examples below, we repeat the PUT request and get a 200 response.</p>
<p>Please note that in order to kill an app, you must have an authentication filter setup for the HTTP interface. The functionality requires that a username is set in the HttpServletRequest. If no filter is setup, the response will be an “UNAUTHORIZED” response.</p>
<p>This feature is currently in the alpha stage and may change in the future.</p><section>
<h3><aname="Elements_of_appstate_object"></a>Elements of <i>appstate</i> object</h3>
<p>When you make a request for the state of an app, the information returned has the following fields</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> state </td>
<tdalign="left"> string </td>
<tdalign="left"> The application state - can be one of “NEW”, “NEW_SAVING”, “SUBMITTED”, “ACCEPTED”, “RUNNING”, “FINISHED”, “FAILED”, “KILLED”</td></tr>
<p>With the application queue API, you can query the queue of a submitted app as well move a running app to another queue using a PUT request specifying the target queue. To perform the PUT operation, authentication has to be setup for the RM web services. In addition, you must be authorized to move the app. Currently you can only move the app if you’re using the Capacity scheduler or the Fair scheduler.</p>
<p>Please note that in order to move an app, you must have an authentication filter setup for the HTTP interface. The functionality requires that a username is set in the HttpServletRequest. If no filter is setup, the response will be an “UNAUTHORIZED” response.</p>
<p>This feature is currently in the alpha stage and may change in the future.</p><section>
<p>With the application priority API, you can query the priority of a submitted app as well update priority of a running or accepted app using a PUT request specifying the target priority. To perform the PUT operation, authentication has to be setup for the RM web services. In addition, you must be authorized to update the app priority. Currently you can only update the app priority if you’re using the Capacity scheduler.</p>
<p>Please note that in order to update priority of an app, you must have an authentication filter setup for the HTTP interface. The functionality requires that a username is set in the HttpServletRequest. If no filter is setup, the response will be an “UNAUTHORIZED” response.</p>
<p>This feature is currently in the alpha stage and may change in the future.</p><section>
<p>The Delegation Tokens API can be used to create, renew and cancel YARN ResourceManager delegation tokens. All delegation token requests must be carried out on a Kerberos authenticated connection(using SPNEGO). Carrying out operations on a non-kerberos connection will result in a FORBIDDEN response. In case of renewing a token, only the renewer specified when creating the token can renew the token. Other users(including the owner) are forbidden from renewing tokens. It should be noted that when cancelling or renewing a token, the token to be cancelled or renewed is specified by setting a header.</p>
<p>This feature is currently in the alpha stage and may change in the future.</p><section>
<h3><aname="URI"></a>URI</h3>
<p>Use the following URI to create and cancel delegation tokens.</p>
<h3><aname="Authentication_using_delegation_tokens"></a>Authentication using delegation tokens</h3>
<p>This feature is in the alpha mode and may change in the future.</p>
<p>You can use delegation tokens to authenticate yourself when using YARN RM webservices. However, this requires setting the right configurations. The conditions for this are:</p>
<ul>
<li>
<p>Hadoop is setup in secure mode with the authentication type set to kerberos.</p>
</li>
<li>
<p>Hadoop HTTP authentication is setup with the authentication type set to kerberos</p>
</li>
</ul>
<p>Once setup, delegation tokens can be fetched using the web services listed above and used as shown in an example below:</p>
<divclass="source">
<divclass="source">
<pre> PUT http://rm-http-address:port/ws/v1/cluster/apps/application_1399397633663_0003/state
<h2><aname="Cluster_Reservation_API_List"></a>Cluster Reservation API List</h2>
<p>The Cluster Reservation API can be used to list reservations. When listing reservations the user must specify the constraints in terms of a queue, reservation-id, start time or end time. The user must also specify whether or not to include the full resource allocations of the reservations being listed. The resulting page returns a response containing information related to the reservation such as the acceptance time, the user, the resource allocations, the reservation-id, as well as the reservation definition.</p><section>
<li>queue - the queue name containing the reservations to be listed. if not set, this value will default to “default”.
<ul>
<li>reservation-id - the reservation-id of the reservation which will be listed. If this parameter is present, start-time and end-time will be ignored.</li>
<li>start-time - reservations that end after this start-time will be listed. If unspecified or invalid, this will default to 0.</li>
<li>end-time - reservations that start after this end-time will be listed. If unspecified or invalid, this will default to Long.MaxValue.</li>
<li>include-resource-allocations - true or false. If true, the resource allocations of the reservation will be included in the response. If false, no resource allocations will be included in the response. This will default to false.</li>
</ul>
</li>
</ul></section><section>
<h3><aname="Elements_of_the_ReservationListInfo_object"></a>Elements of the <i>ReservationListInfo</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> reservations </td>
<tdalign="left"> array of ReservationInfo(JSON) / zero or more ReservationInfo objects(XML) </td>
<tdalign="left"> The reservations that are listed with the given query </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_reservations_object"></a>Elements of the <i>reservations</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> acceptance-time </td>
<tdalign="left"> long </td>
<tdalign="left"> Time that the reservation was accepted </td></tr>
<trclass="a">
<tdalign="left"> resource-allocations </td>
<tdalign="left"> array of ResourceAllocationInfo(JSON) / zero or more ResourceAllocationInfo objects(XML) </td>
<tdalign="left"> Resource allocation information for the reservation </td></tr>
<trclass="b">
<tdalign="left"> reservation-id </td>
<tdalign="left"> A single ReservationId string </td>
<tdalign="left"> The unique reservation identifier </td></tr>
<trclass="a">
<tdalign="left"> reservation-definition </td>
<tdalign="left"> A single ReservationDefinition Object </td>
<tdalign="left"> A set of constraints representing the need for resources over time of a user </td></tr>
<trclass="b">
<tdalign="left"> user </td>
<tdalign="left"> string </td>
<tdalign="left"> User who made the reservation </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_resource-allocations_object"></a>Elements of the <i>resource-allocations</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> resource </td>
<tdalign="left"> A single Resource object </td>
<tdalign="left"> The resources allocated for the reservation allocation </td></tr>
<trclass="a">
<tdalign="left"> startTime </td>
<tdalign="left"> long </td>
<tdalign="left"> Start time that the resource is allocated for </td></tr>
<trclass="b">
<tdalign="left"> endTime </td>
<tdalign="left"> long </td>
<tdalign="left"> End time that the resource is allocated for </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the__resource_object"></a>Elements of the <i>resource</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> memory </td>
<tdalign="left"> int </td>
<tdalign="left"> The memory allocated for the reservation allocation </td></tr>
<trclass="a">
<tdalign="left"> vCores </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of cores allocated for the reservation allocation </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_reservation-definition_object"></a>Elements of the <i>reservation-definition</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> arrival </td>
<tdalign="left"> long </td>
<tdalign="left"> The UTC time representation of the earliest time this reservation can be allocated from. </td></tr>
<trclass="a">
<tdalign="left"> deadline </td>
<tdalign="left"> long </td>
<tdalign="left"> The UTC time representation of the latest time within which this reservation can be allocated. </td></tr>
<trclass="b">
<tdalign="left"> reservation-name </td>
<tdalign="left"> string </td>
<tdalign="left"> A mnemonic name of the reservation (not a valid identifier). </td></tr>
<trclass="a">
<tdalign="left"> reservation-requests </td>
<tdalign="left"> object </td>
<tdalign="left"> A list of “stages” or phases of this reservation, each describing resource requirements and duration </td></tr>
<trclass="b">
<tdalign="left"> priority </td>
<tdalign="left"> int </td>
<tdalign="left"> An integer representing the priority of the reservation. A lower number for priority indicates a higher priority reservation. Recurring reservations are always higher priority than non-recurring reservations. Priority for non-recurring reservations are only compared with non-recurring reservations. Likewise with recurring reservations. </td></tr>
<trclass="a">
<tdalign="left"> recurrence-expression </td>
<tdalign="left"> string </td>
<tdalign="left"> A recurrence expression which represents the time period of a periodic job. Currently, only long values are supported. Later, support for regular expressions denoting arbitrary recurrence patterns (e.g., every Tuesday and Thursday) will be added. Recurrence is represented in milliseconds for periodic jobs. Recurrence is 0 for non-periodic jobs. Periodic jobs are valid until they are explicitly cancelled and have higher priority than non-periodic jobs (during initial placement and re-planning). Periodic job allocations are consistent across runs (flexibility in allocation is leveraged only during initial placement, allocations remain consistent thereafter). Note that the recurrence expression must be greater than the duration of the reservation (deadline - arrival). Also note that the configured max period must be divisible by the recurrence expression. </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_reservation-requests_object"></a>Elements of the <i>reservation-requests</i> object</h3>
<tdalign="left"> A numeric choice of how to interpret the set of ReservationRequest: 0 is an ANY, 1 for ALL, 2 for ORDER, 3 for ORDER_NO_GAP </td></tr>
<trclass="a">
<tdalign="left"> reservation-request </td>
<tdalign="left"> object </td>
<tdalign="left"> The description of the resource and time capabilities for a phase/stage of this reservation </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_reservation-request_object"></a>Elements of the <i>reservation-request</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> duration </td>
<tdalign="left"> long </td>
<tdalign="left"> The duration of a ReservationRequest in milliseconds (amount of consecutive milliseconds a satisfiable allocation for this portion of the reservation should exist for). </td></tr>
<trclass="a">
<tdalign="left"> num-containers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of containers required in this phase of the reservation (capture the maximum parallelism of the job(s) in this phase). </td></tr>
<trclass="b">
<tdalign="left"> min-concurrency </td>
<tdalign="left"> int </td>
<tdalign="left"> The minimum number of containers that must be concurrently allocated to satisfy this allocation (capture min-parallelism, useful to express gang semantics). </td></tr>
<trclass="a">
<tdalign="left"> capability </td>
<tdalign="left"> object </td>
<tdalign="left"> Allows to specify the size of each container (memory, vCores).</td></tr>
<p>Get requests can be used to list reservations to the ResourceManager. As mentioned above, information pertaining to the reservation is returned upon success (in the body of the answer). Successful list requests result in a 200 response. Please note that in order to submit a reservation, you must have an authentication filter setup for the HTTP interface. the functionality requires that the username is set in the HttpServletRequest. If no filter is setup, the response will be an “UNAUTHORIZED” response. Please note that this feature is currently in the alpha stage and may change in the future.</p>
<p><b>JSON response</b></p>
<p>This request return all active reservations within the start time 1455159355000 and 1475160036000. Since include-resource-allocations is set to true, the full set of resource allocations will be included in the response.</p>
<p>HTTP Request:</p>
<divclass="source">
<divclass="source">
<pre> GET http://rm-http-address:port/ws/v1/cluster/reservation/list?queue=dedicated&start-time=1455159355000&end-time=1475160036000&include-resource-allocations=true
<pre> GET http://rm-http-address:port/ws/v1/cluster/reservation/list?queue=dedicated&start-time=1455159355000&end-time=1475160036000&include-resource-allocations=true
<h2><aname="Cluster_Reservation_API_Create"></a>Cluster Reservation API Create</h2>
<p>Use the New Reservation API, to obtain a reservation-id which can then be used as part of the <ahref="#Cluster_Reservation_API_Submit">Cluster Reservation API Submit</a> to submit reservations.</p>
<p>This feature is currently in the alpha stage and may change in the future.</p><section>
<h2><aname="Cluster_Reservation_API_Submit"></a>Cluster Reservation API Submit</h2>
<p>The Cluster Reservation API can be used to submit reservations. When submitting a reservation the user specifies the constraints in terms of resources, and time that is required. The resulting response is successful if the reservation can be made. If a reservation-id is used to submit a reservation multiple times, the request will succeed if the reservation definition is the same, but only one reservation will be created. If the reservation definition is different, the server will respond with an error response. When the reservation is made, the user can use the reservation-id used to submit the reservation to get access to the resources by specifying it as part of <ahref="#Cluster_Applications_APISubmit_Application">Cluster Submit Applications API</a>.</p><section>
<p>POST requests can be used to submit reservations to the ResourceManager. As mentioned above, a reservation-id is returned upon success (in the body of the answer). Successful submissions result in a 200 response. Please note that in order to submit a reservation, you must have an authentication filter setup for the HTTP interface. The functionality requires that a username is set in the HttpServletRequest. If no filter is setup, the response will be an “UNAUTHORIZED” response.</p>
<p>Please note that this feature is currently in the alpha stage and may change in the future.</p><section>
<h4><aname="Elements_of_the_POST_request_object"></a>Elements of the POST request object</h4>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> queue </td>
<tdalign="left"> string </td>
<tdalign="left"> The (reservable) queue you are submitting to</td></tr>
<trclass="a">
<tdalign="left"> reservation-definition </td>
<tdalign="left"> object </td>
<tdalign="left"> A set of constraints representing the need for resources over time of a user. </td></tr>
<trclass="b">
<tdalign="left"> reservation-id </td>
<tdalign="left"> string </td>
<tdalign="left"> The reservation id to use to submit the reservation. </td></tr>
</tbody>
</table>
<p>Elements of the <i>reservation-definition</i> object</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left">arrival </td>
<tdalign="left"> long </td>
<tdalign="left"> The UTC time representation of the earliest time this reservation can be allocated from. </td></tr>
<trclass="a">
<tdalign="left"> deadline </td>
<tdalign="left"> long </td>
<tdalign="left"> The UTC time representation of the latest time within which this reservation can be allocated. </td></tr>
<trclass="b">
<tdalign="left"> reservation-name </td>
<tdalign="left"> string </td>
<tdalign="left"> A mnemonic name of the reservation (not a valid identifier). </td></tr>
<trclass="a">
<tdalign="left"> reservation-requests </td>
<tdalign="left"> object </td>
<tdalign="left"> A list of “stages” or phases of this reservation, each describing resource requirements and duration </td></tr>
<trclass="b">
<tdalign="left"> priority </td>
<tdalign="left"> int </td>
<tdalign="left"> An integer representing the priority of the reservation. A lower number for priority indicates a higher priority reservation. Recurring reservations are always higher priority than non-recurring reservations. Priority for non-recurring reservations are only compared with non-recurring reservations. Likewise with recurring reservations. </td></tr>
</tbody>
</table>
<p>Elements of the <i>reservation-requests</i> object</p>
<tdalign="left"> A numeric choice of how to interpret the set of ReservationRequest: 0 is an ANY, 1 for ALL, 2 for ORDER, 3 for ORDER_NO_GAP </td></tr>
<trclass="a">
<tdalign="left"> reservation-request </td>
<tdalign="left"> object </td>
<tdalign="left"> The description of the resource and time capabilities for a phase/stage of this reservation </td></tr>
</tbody>
</table>
<p>Elements of the <i>reservation-request</i> object</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> duration </td>
<tdalign="left"> long </td>
<tdalign="left"> The duration of a ReservationRequest in milliseconds (amount of consecutive milliseconds a satisfiable allocation for this portion of the reservation should exist for). </td></tr>
<trclass="a">
<tdalign="left"> num-containers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of containers required in this phase of the reservation (capture the maximum parallelism of the job(s) in this phase). </td></tr>
<trclass="b">
<tdalign="left"> min-concurrency </td>
<tdalign="left"> int </td>
<tdalign="left"> The minimum number of containers that must be concurrently allocated to satisfy this allocation (capture min-parallelism, useful to express gang semantics). </td></tr>
<trclass="a">
<tdalign="left"> capability </td>
<tdalign="left"> object </td>
<tdalign="left"> Allows to specify the size of each container (memory, vCores).</td></tr>
</tbody>
</table>
<p>Elements of the <i>capability</i> object</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> memory </td>
<tdalign="left"> int </td>
<tdalign="left"> the number of MB of memory for this container </td></tr>
<trclass="a">
<tdalign="left"> vCores </td>
<tdalign="left"> int </td>
<tdalign="left"> the number of virtual cores for this container </td></tr>
</tbody>
</table>
<p><b>JSON response</b></p>
<p>This examples contains a reservation composed of two stages (alternative to each other as the <i>reservation-request-interpreter</i> is set to 0), so that the first is shorter and “taller” and “gang” with exactly 220 containers for 60 seconds, while the second alternative is longer with 120 seconds duration and less tall with 110 containers (and a min-concurrency of 1 container, thus no gang semantics).</p>
<p>200 OK Cache-Control: no-cache Expires: Thu, 17 Dec 2015 23:49:21 GMT, Thu, 17 Dec 2015 23:49:21 GMT Date: Thu, 17 Dec 2015 23:49:21 GMT, Thu, 17 Dec 2015 23:49:21 GMT Pragma: no-cache, no-cache Content-Type: application/xml Content-Encoding: gzip Content-Length: 137 Server: Jetty(6.1.26)</p>
<p>Response Body:</p>
<divclass="source">
<divclass="source">
<pre> No response body
</pre></div></div>
</section></section></section><section>
<h2><aname="Cluster_Reservation_API_Update"></a>Cluster Reservation API Update</h2>
<p>The Cluster Reservation API Update can be used to update existing reservations.Update of a Reservation works similarly to submit described above, but the user submits the reservation-id of an existing reservation to be updated. The semantics is a try-and-swap, successful operation will modify the existing reservation based on the requested update parameter, while a failed execution will leave the existing reservation unchanged.</p><section>
<p>POST requests can be used to update reservations to the ResourceManager. Successful submissions result in a 200 response, indicate in-place update of the existing reservation (id does not change). Please note that in order to update a reservation, you must have an authentication filter setup for the HTTP interface. The functionality requires that a username is set in the HttpServletRequest. If no filter is setup, the response will be an “UNAUTHORIZED” response.</p>
<p>Please note that this feature is currently in the alpha stage and may change in the future.</p><section>
<h4><aname="Elements_of_the_POST_request_object"></a>Elements of the POST request object</h4>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> reservation-id </td>
<tdalign="left"> string </td>
<tdalign="left"> The id of the reservation to be updated (the system automatically looks up the right queue from this)</td></tr>
<trclass="a">
<tdalign="left"> reservation-definition </td>
<tdalign="left"> object </td>
<tdalign="left"> A set of constraints representing the need for resources over time of a user. </td></tr>
</tbody>
</table>
<p>Elements of the <i>reservation-definition</i> object</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left">arrival </td>
<tdalign="left"> long </td>
<tdalign="left"> The UTC time representation of the earliest time this reservation can be allocated from. </td></tr>
<trclass="a">
<tdalign="left"> deadline </td>
<tdalign="left"> long </td>
<tdalign="left"> The UTC time representation of the latest time within which this reservation can be allocated. </td></tr>
<trclass="b">
<tdalign="left"> reservation-name </td>
<tdalign="left"> string </td>
<tdalign="left"> A mnemonic name of the reservation (not a valid identifier). </td></tr>
<trclass="a">
<tdalign="left"> reservation-requests </td>
<tdalign="left"> object </td>
<tdalign="left"> A list of “stages” or phases of this reservation, each describing resource requirements and duration </td></tr>
<trclass="b">
<tdalign="left"> priority </td>
<tdalign="left"> int </td>
<tdalign="left"> An integer representing the priority of the reservation. A lower number for priority indicates a higher priority reservation. Recurring reservations are always higher priority than non-recurring reservations. Priority for non-recurring reservations are only compared with non-recurring reservations. Likewise with recurring reservations. </td></tr>
</tbody>
</table>
<p>Elements of the <i>reservation-requests</i> object</p>
<tdalign="left"> A numeric choice of how to interpret the set of ReservationRequest: 0 is an ANY, 1 for ALL, 2 for ORDER, 3 for ORDER_NO_GAP </td></tr>
<trclass="a">
<tdalign="left"> reservation-request </td>
<tdalign="left"> object </td>
<tdalign="left"> The description of the resource and time capabilities for a phase/stage of this reservation </td></tr>
</tbody>
</table>
<p>Elements of the <i>reservation-request</i> object</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> duration </td>
<tdalign="left"> long </td>
<tdalign="left"> The duration of a ReservationRequest in milliseconds (amount of consecutive milliseconds a satisfiable allocation for this portion of the reservation should exist for). </td></tr>
<trclass="a">
<tdalign="left"> num-containers </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of containers required in this phase of the reservation (capture the maximum parallelism of the job(s) in this phase). </td></tr>
<trclass="b">
<tdalign="left"> min-concurrency </td>
<tdalign="left"> int </td>
<tdalign="left"> The minimum number of containers that must be concurrently allocated to satisfy this allocation (capture min-parallelism, useful to express gang semantics). </td></tr>
<trclass="a">
<tdalign="left"> capability </td>
<tdalign="left"> object </td>
<tdalign="left"> Allows to specify the size of each container (memory, vCores).</td></tr>
</tbody>
</table>
<p>Elements of the <i>capability</i> object</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> memory </td>
<tdalign="left"> int </td>
<tdalign="left"> the number of MB of memory for this container </td></tr>
<trclass="a">
<tdalign="left"> vCores </td>
<tdalign="left"> int </td>
<tdalign="left"> the number of virtual cores for this container </td></tr>
</tbody>
</table>
<p><b>JSON response</b></p>
<p>This examples updates an existing reservation identified by <i>reservation_1449259268893_0005</i> with two stages (in order as the <i>reservation-request-interpreter</i> is set to 2), with the first stage being a “gang” of 10 containers for 5 minutes (min-concurrency of 10 containers) followed by a 50 containers for 10 minutes(min-concurrency of 1 container, thus no gang semantics).</p>
<p>200 OK Cache-Control: no-cache Expires: Thu, 17 Dec 2015 23:49:21 GMT, Thu, 17 Dec 2015 23:49:21 GMT Date: Thu, 17 Dec 2015 23:49:21 GMT, Thu, 17 Dec 2015 23:49:21 GMT Pragma: no-cache, no-cache Content-Type: application/xml Content-Encoding: gzip Content-Length: 137 Server: Jetty(6.1.26)</p>
<p>Response Body:</p>
<divclass="source">
<divclass="source">
<pre> No response body
</pre></div></div>
</section></section></section><section>
<h2><aname="Cluster_Reservation_API_Delete"></a>Cluster Reservation API Delete</h2>
<p>The Cluster Reservation API Delete can be used to delete existing reservations.Delete works similar to update. The requests contains the reservation-id, and if successful the reservation is cancelled, otherwise the reservation remains in the system.</p><section>
<p>POST requests can be used to delete reservations to the ResourceManager. Successful submissions result in a 200 response, indicating that the delete succeeded. Please note that in order to delete a reservation, you must have an authentication filter setup for the HTTP interface. The functionality requires that a username is set in the HttpServletRequest. If no filter is setup, the response will be an “UNAUTHORIZED” response.</p>
<p>Please note that this feature is currently in the alpha stage and may change in the future.</p><section>
<h4><aname="Elements_of_the_POST_request_object"></a>Elements of the POST request object</h4>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> reservation-id </td>
<tdalign="left"> string </td>
<tdalign="left"> The id of the reservation to be deleted (the system automatically looks up the right queue from this)</td></tr>
</tbody>
</table>
<p><b>JSON response</b></p>
<p>This examples deletes an existing reservation identified by <i>reservation_1449259268893_0006</i></p>
<p>Cluster Application Timeouts API can be used to get all configured timeouts of an application. When you run a GET operation on this resource, a collection of timeout objects is returned. Each timeout object is composed of a timeout type, expiry-time and remaining time in seconds.</p><section>
<h3><aname="Elements_of_the_timeouts_.28Application_Timeouts.29_object"></a>Elements of the <i>timeouts</i> (Application Timeouts) object</h3>
<p>When you make a request for the list of application timeouts, the information will be returned as a collection of timeout objects. See also <ahref="#Cluster_Application_Timeout_API">Cluster Application Timeout API</a> for syntax of the timeout object.</p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> timeout </td>
<tdalign="left"> array of timeout objects(JSON)/zero or more application objects(XML) </td>
<tdalign="left"> The collection of application timeout objects </td></tr>
</tbody>
</table>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<divclass="source">
<divclass="source">
<pre> Accept: application/json
GET http://rm-http-address:port/ws/v1/cluster/apps/{appid}/timeouts
<h3><aname="Elements_of_the_timeout_.28Application_Timeout.29_object"></a>Elements of the <i>timeout</i> (Application Timeout) object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> type </td>
<tdalign="left"> string </td>
<tdalign="left"> Timeout type. Valid values are the members of the ApplicationTimeoutType enum. LIFETIME is currently the only valid value. </td></tr>
<trclass="a">
<tdalign="left"> expiryTime </td>
<tdalign="left"> string </td>
<tdalign="left"> Time at which the application will expire in ISO8601 yyyy-MM-dd’T’HH:mm:ss.SSSZ format. If UNLIMITED, then application will run forever. </td></tr>
<trclass="b">
<tdalign="left"> remainingTimeInSeconds </td>
<tdalign="left"> long </td>
<tdalign="left"> Remaining time for configured application timeout. -1 indicates that application is not configured with timeout. Zero(0) indicates that application has expired with configured timeout type. </td></tr>
</tbody>
</table>
<p><b>JSON response</b></p>
<p>HTTP Request:</p>
<divclass="source">
<divclass="source">
<pre> Accept: application/json
GET http://rm-http-address:port/ws/v1/cluster/apps/{appid}/timeouts/LIFETIME
<p>Put requests are used to modify the scheduler configuration. A successful mutation results in a 200 response. A malformed request or one which resulted in an invalid scheduler configuration results in a 400 response.</p>
<p><b>Updating queue configuration(s)</b></p>
<p>Request for updating queue configurations.</p>
<p><i>Elements of the</i> update-queue <i>object</i></p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> queue-name </td>
<tdalign="left"> string </td>
<tdalign="left"> Full path name of the queue to update </td></tr>
<trclass="a">
<tdalign="left"> params </td>
<tdalign="left"> map </td>
<tdalign="left"> A map of key value configuration pairs to update for this queue </td></tr>
</tbody>
</table>
<p>Assuming we are using the capacity scheduler and the current queue configuration is a single queue <i>root.default</i>, this example sets <i>root.default</i>’s maximum applications to 100 and its minimum user limit percent to 10.</p>
<p>HTTP Request:</p>
<divclass="source">
<divclass="source">
<pre> Accept: application/xml
PUT http://rm-http-address:port/ws/v1/cluster/scheduler-conf
<p>Request for adding queues/updating queue configurations.</p>
<p><i>Elements of the</i> add-queue <i>object</i></p>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> queue-name </td>
<tdalign="left"> string </td>
<tdalign="left"> Full path name of the queue to add </td></tr>
<trclass="a">
<tdalign="left"> params </td>
<tdalign="left"> map </td>
<tdalign="left"> A map of key value configuration pairs to set for this queue </td></tr>
</tbody>
</table>
<p>Assuming we are using the capacity scheduler and the current queue configuration is a single queue <i>root.default</i>, this example adds a queue <i>root.a</i> with capacity/maximum-capacity 10, and adjusts <i>root.default</i>’s capacity/maximum-capacity to 90. (More complex examples include adding a queue whose parent is also being added in the same request, or adding multiple sibling queues.)</p>
<p>HTTP Request:</p>
<divclass="source">
<divclass="source">
<pre> Accept: application/xml
PUT http://rm-http-address:port/ws/v1/cluster/scheduler-conf
<p>Request for removing queues from the queue hierarchy.</p>
<p>Assuming we are using the capacity scheduler and the current queue configuration is three queues <i>root.default</i>, <i>root.a</i>, and <i>root.b</i>, this example removes both <i>root.a</i> and <i>root.b</i>. (More complex examples include removing a parent queue and its children.)</p>
<p><b>Note:</b> Queues must be put into <code>STOPPED</code> state before they are deleted. Any updated queue configuration should be a valid one i.e. queue-capacity at each <i>level</i> should be equal to 100%.</p>
<p>HTTP Request:</p>
<divclass="source">
<divclass="source">
<pre> Accept: application/xml
PUT http://rm-http-address:port/ws/v1/cluster/scheduler-conf
<p><b>Updating global scheduler configurations</b></p>
<p>Request for updating global scheduler configurations. Assuming we are using the capacity scheduler, this example enables queue mappings. For global configuration updates, the full configuration key must be specified.</p>
<p>HTTP Request:</p>
<divclass="source">
<divclass="source">
<pre> Accept: application/xml
PUT http://rm-http-address:port/ws/v1/cluster/scheduler-conf
<p>Assuming we are using the capacity scheduler and the current queue configuration is two queues root.default, and root.a, this example adds a Node Label x to the queue root.a. Create a Node Label x and assign the nodes with below commands.</p>
<p>Assuming we are using the capacity scheduler and the current queue configuration is two queues root.default, and root.a and Node Label x is assigned to queue root.a. This example unsets the Node Label x from the queue root.a and removes it.</p>
<p>HTTP Request:</p>
<divclass="source">
<divclass="source">
<pre> Accept: application/xml
PUT http://rm-http-address:port/ws/v1/cluster/scheduler-conf
<h2><aname="Cluster_Container_Signal_API"></a>Cluster Container Signal API</h2>
<p>With the Container Signal API, you can send a signal to a specified container with one of the following commands: OUTPUT_THREAD_DUMP, GRACEFUL_SHUTDOWN and FORCEFUL_SHUTDOWN.</p><section>
<p>The scheduler activities RESTful API is available if you are using capacity scheduler and can fetch scheduler activities info recorded in a scheduling cycle. The API returns a message that includes important scheduling activities info which has a hierarchical layout with following fields:</p>
<ul>
<li><b>Activities</b> - Activities is the root object of scheduler activities.</li>
<li><b>Allocations</b> - Allocations are allocation attempts based on partition or reservation.</li>
<li><b>Hierarchical Queues</b> - Hierarchical Queues where the scheduler have been tried to allocate containers to, each of them contains queue name, allocation state, optional diagnostic and optional children.</li>
<li><b>Applications</b> - Applications are shown as children of leaf queue, each of them contains the basic info about the application.</li>
<li><b>Requests</b> - Requests are shown as children of application, each of them contains the basic info about the request.</li>
<li><b>Nodes</b> - Nodes are shown as children of request, each of them contains node id, allocation state, optional name which should appear after allocating or reserving a container on the node, and optional diagnostic which should present if failed to allocate or reserve a container on this node. For aggregated nodes grouped by allocation state and diagnostic, each of them contains allocation state, aggregated node IDs and optional diagnostic.</li>
<p>Multiple parameters can be specified for GET operations.</p>
<ul>
<li>nodeId - specified node ID, if not specified, the scheduler will record the scheduling activities info for the next scheduling cycle on all nodes.
<ul>
<li>groupBy - aggregation type of application activities, currently only support “diagnostic” with which user can query aggregated activities grouped by allocation state and diagnostic.</li>
</ul>
</li>
</ul></section><section>
<h3><aname="Elements_of_the_Activities_object"></a>Elements of the <i>Activities</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> nodeId </td>
<tdalign="left"> string </td>
<tdalign="left"> The node ID on which scheduler tries to allocate containers. </td></tr>
<trclass="a">
<tdalign="left"> timestamp </td>
<tdalign="left"> long </td>
<tdalign="left"> Timestamp of the activities. </td></tr>
<trclass="b">
<tdalign="left"> dateTime </td>
<tdalign="left"> string </td>
<tdalign="left"> Date time of the activities. </td></tr>
<trclass="a">
<tdalign="left"> diagnostic </td>
<tdalign="left"> string </td>
<tdalign="left"> Top diagnostic of the activities about empty results, unavailable environments, or illegal input parameters, such as “waiting for display”, “waiting for the next allocation”, “No node manager running in the cluster”, “Got invalid groupBy: xx, valid groupBy types: DIAGNOSTICS”</td></tr>
<trclass="b">
<tdalign="left"> allocations </td>
<tdalign="left"> array of allocations </td>
<tdalign="left"> A collection of allocation objects. </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_Allocation_object"></a>Elements of the <i>Allocation</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> partition </td>
<tdalign="left"> string </td>
<tdalign="left"> Partition of the allocation. </td></tr>
<trclass="a">
<tdalign="left"> updatedContainerId </td>
<tdalign="left"> string </td>
<tdalign="left"> Updated(allocated or reserved) container id in the allocation. </td></tr>
<trclass="b">
<tdalign="left"> finalAllocationState </td>
<tdalign="left"> string </td>
<tdalign="left"> Final allocation state of the allocation, including ALLOCATED, ALLOCATED_FROM_RESERVED, RESERVED, and SKIPPED. </td></tr>
<trclass="a">
<tdalign="left"> root </td>
<tdalign="left"> Queue </td>
<tdalign="left"> Queue object </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_Queue_object"></a>Elements of the <i>Queue</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> name </td>
<tdalign="left"> string </td>
<tdalign="left"> Name of the queue. </td></tr>
<trclass="a">
<tdalign="left"> allocationState </td>
<tdalign="left"> string </td>
<tdalign="left"> Final allocation state of the queue, including ACCEPTED, REJECTED, and SKIPPED. </td></tr>
<trclass="b">
<tdalign="left"> diagnostic </td>
<tdalign="left"> string </td>
<tdalign="left"> Diagnostic of the queue. </td></tr>
<trclass="a">
<tdalign="left"> children </td>
<tdalign="left"> array of queues or applications </td>
<tdalign="left"> A collection of queue objects (for parent queues) or app objects (for leaf queues) </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_Application_object"></a>Elements of the <i>Application</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> name </td>
<tdalign="left"> string </td>
<tdalign="left"> Name of the application. </td></tr>
<trclass="a">
<tdalign="left"> appPriority </td>
<tdalign="left"> string </td>
<tdalign="left"> Priority of the application. </td></tr>
<trclass="b">
<tdalign="left"> allocationState </td>
<tdalign="left"> string </td>
<tdalign="left"> Final allocation state of the application, including ALLOCATED, RESERVED, RE_RESERVED, and SKIPPED. </td></tr>
<trclass="a">
<tdalign="left"> diagnostic </td>
<tdalign="left"> string </td>
<tdalign="left"> Diagnostic of the application. </td></tr>
<trclass="b">
<tdalign="left"> children </td>
<tdalign="left"> array of requests </td>
<tdalign="left"> A collection of request objects </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_Request_object"></a>Elements of the <i>Request</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> name </td>
<tdalign="left"> string </td>
<tdalign="left"> Name of the request, the value format is “request_<requestPriority>_<allocationRequestId>” which can be used to identify different requests. </td></tr>
<trclass="a">
<tdalign="left"> requestPriority </td>
<tdalign="left"> string </td>
<tdalign="left"> Priority of the request. </td></tr>
<trclass="b">
<tdalign="left"> allocationRequestId </td>
<tdalign="left"> string </td>
<tdalign="left"> Allocation request id of the request. </td></tr>
<trclass="a">
<tdalign="left"> allocationState </td>
<tdalign="left"> string </td>
<tdalign="left"> Final allocation state of the application, including ALLOCATED, RESERVED, RE_RESERVED, and SKIPPED. </td></tr>
<trclass="b">
<tdalign="left"> diagnostic </td>
<tdalign="left"> string </td>
<tdalign="left"> Diagnostic of the request. </td></tr>
<trclass="a">
<tdalign="left"> children </td>
<tdalign="left"> array of nodes </td>
<tdalign="left"> A collection of node objects. </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_Node_object"></a>Elements of the <i>Node</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> name </td>
<tdalign="left"> string </td>
<tdalign="left"> Container information which is optional and can be shown when allocation state is ALLOCATED, RESERVED or ALLOCATED_FROM_RESERVED. </td></tr>
<trclass="a">
<tdalign="left"> allocationState </td>
<tdalign="left"> string </td>
<tdalign="left"> Final allocation state of the application, including ALLOCATED, RESERVED, RE_RESERVED, and SKIPPED. </td></tr>
<trclass="b">
<tdalign="left"> diagnostic </td>
<tdalign="left"> string </td>
<tdalign="left"> Diagnostic about node in normal mode or nodes in aggregation mode </td></tr>
<trclass="a">
<tdalign="left"> nodeId </td>
<tdalign="left"> string </td>
<tdalign="left"> The node id on which the scheduling process is based, won’t show for aggregation query with groupBy parameter. </td></tr>
<trclass="b">
<tdalign="left"> nodeIds </td>
<tdalign="left"> array of strings </td>
<tdalign="left"> A collection of node IDs for aggregated activities, only show for aggregation query with groupBy parameter. </td></tr>
<trclass="a">
<tdalign="left"> count </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of node IDs, only show for aggregation query with groupBy parameter. </td></tr>
GET http://rm-http-address:port/ws/v1/cluster/scheduler/activities
</pre></div></div>
<p>Response Header:</p>
<divclass="source">
<divclass="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)
</pre></div></div>
<p>Response Body:</p>
<p>Following is an output example when global scheduling is enabled, there are multiple activities at the node level for a single request. For single node placement, differences are that nodeId will be shown as a field of activities and there should be only one activity at the node level for every request.</p>
"diagnostic": "Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=<memory:3072, vCores:1>, available=<memory:2048, vCores:2>",
"nodeId": "127.0.0.2:1234"
},
{
"allocationState": "SKIPPED",
"diagnostic": "Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=<memory:3072, vCores:1>, available=<memory:2048, vCores:2>",
"nodeId": "127.0.0.3:1234"
},
{
"allocationState": "SKIPPED",
"diagnostic": "Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=<memory:3072, vCores:1>, available=<memory:2048, vCores:2>",
<p>When we query scheduler activities REST API with query parameters(“groupBy=diagnostic”), 4 node activities info will be grouped into 2 groups: SKIPPED group with the same diagnostic “Node’s total resource is insufficient for request, insufficient resources=[memory-mb]” and ALLOCATED group, the output should be as follows:</p>
<diagnostic>Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=&lt;memory:3072, vCores:1&gt;, available=&lt;memory:2048, vCores:2&gt;</diagnostic>
<diagnostic>Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=&lt;memory:3072, vCores:1&gt;, available=&lt;memory:2048, vCores:2&gt;</diagnostic>
<diagnostic>Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=&lt;memory:3072, vCores:1&gt;, available=&lt;memory:2048, vCores:2&gt;</diagnostic>
<p>The scheduler bulk activities RESTful API can fetch scheduler activities info recorded for multiple scheduling cycle. This may take time to return as it internally waits until a certain amount of records are generated specified by activitiesCount.</p><section>
<p>Multiple parameters can be specified for GET operations.</p>
<ul>
<li>activitiesCount - number of schecduling cycle to record with maximum of 500.
<ul>
<li>groupBy - aggregation type of application activities, currently only support “diagnostic” with which user can query aggregated activities grouped by allocation state and diagnostic.</li>
GET http://rm-http-address:port/ws/v1/cluster/scheduler/bulk-activities?activitiesCount=2
</pre></div></div>
<p>Response Header:</p>
<divclass="source">
<divclass="source">
<pre> HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)
</pre></div></div>
<p>Response Body:</p>
<p>Following is an output example with query parameter activitiesCount set to 2. This fetches scheduler activities info recorded in last two scheduling cycle.</p>
<divclass="source">
<divclass="source">
<pre>{
"bulkActivities": {
"activities": [
{
"nodeId": "127.0.0.1:1234",
"timestamp": 1593684431432,
"dateTime": "Thu Jul 02 10:07:11 UTC 2020",
<p>Application activities RESTful API is available if you are using capacity scheduler and can fetch useful scheduling info for a specified application, the response has a hierarchical layout with following fields:</p>
<ul>
<li><b>AppActivities</b> - AppActivities are root element of application activities within basic information.</li>
<li><b>Allocations</b> - Allocations are allocation attempts at app level queried from the cache.</li>
<li><b>Requests</b> - Requests are shown as children of allocation, each of them contains request name, request priority, allocation request id, allocation state and optional children.</li>
<li><b>Nodes</b> - Nodes are shown as children of request, each of them contains node id, allocation state, optional name which should appear after allocating or reserving a container on the node, and optional diagnostic which should appear if failed to allocate or reserve a container on the node. For aggregated nodes grouped by allocation state and diagnostic, each of them contains allocation state, aggregated node IDs and optional diagnostic.</li>
<p>Multiple parameters can be specified for GET operations.</p>
<ul>
<li>maxTime - the max duration in seconds from now on for recording application activities. If not specified, this will default to 3 (seconds).
<ul>
<li>requestPriorities - the priorities of request, used to filter application activities, specified as a comma-separated list.</li>
<li>allocationRequestIds - the allocation request IDs of request, used to filter application activities, specified as a comma-separated list.</li>
<li>groupBy - the aggregation type of application activities, currently only support “diagnostic” with which user can query aggregated activities grouped by allocation state and diagnostic.</li>
<li>limit - the limit of application activities which can reduce the cost for both server and client side.</li>
<li>actions - the required actions of app activities including “refresh” and “get”, specified as a comma-separated list.</li>
<li>summarize - whether app activities in multiple scheduling processes need to be summarized, specified as boolean, it’s useful when multi-node placement disabled, because only one node can be considered in a single scheduling process, enabling this can give us a summary with diagnostics on all nodes.</li>
</ul>
</li>
</ul></section><section>
<h3><aname="Elements_of_the_AppActivities_object"></a>Elements of the <i>AppActivities</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> applicationId </td>
<tdalign="left"> string </td>
<tdalign="left"> The specified application id. </td></tr>
<trclass="a">
<tdalign="left"> allocations </td>
<tdalign="left"> array of allocations </td>
<tdalign="left"> A collection of allocation objects in descending order by time. </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_Allocation_object"></a>Elements of the <i>Allocation</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> nodeId </td>
<tdalign="left"> string </td>
<tdalign="left"> ID of the node. </td></tr>
<trclass="a">
<tdalign="left"> timestamp </td>
<tdalign="left"> long </td>
<tdalign="left"> Timestamp of the allocation. </td></tr>
<trclass="b">
<tdalign="left"> dateTime </td>
<tdalign="left"> string </td>
<tdalign="left"> Date time of the allocation. </td></tr>
<trclass="a">
<tdalign="left"> queueName </td>
<tdalign="left"> string </td>
<tdalign="left"> Queue name of the application. </td></tr>
<trclass="b">
<tdalign="left"> appPriority </td>
<tdalign="left"> int </td>
<tdalign="left"> Priority of the application </td></tr>
<trclass="a">
<tdalign="left"> allocationState </td>
<tdalign="left"> string </td>
<tdalign="left"> Final allocation state of the application, including ALLOCATED, RESERVED, RE_RESERVED, and SKIPPED. </td></tr>
<trclass="b">
<tdalign="left"> diagnostic </td>
<tdalign="left"> string </td>
<tdalign="left"> Diagnostic of the application. </td></tr>
<trclass="a">
<tdalign="left"> children </td>
<tdalign="left"> array of requests </td>
<tdalign="left"> A collection of request objects </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_Request_object"></a>Elements of the <i>Request</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> requestPriority </td>
<tdalign="left"> string </td>
<tdalign="left"> Priority of the request. </td></tr>
<trclass="a">
<tdalign="left"> allocationRequestId </td>
<tdalign="left"> string </td>
<tdalign="left"> Allocation request id of the request. </td></tr>
<trclass="b">
<tdalign="left"> allocationState </td>
<tdalign="left"> string </td>
<tdalign="left"> Final allocation state of the application, including ALLOCATED, RESERVED, RE_RESERVED, and SKIPPED. </td></tr>
<trclass="a">
<tdalign="left"> diagnostic </td>
<tdalign="left"> string </td>
<tdalign="left"> Diagnostic of the request. </td></tr>
<trclass="b">
<tdalign="left"> children </td>
<tdalign="left"> array of nodes </td>
<tdalign="left"> A collection of node objects. </td></tr>
</tbody>
</table></section><section>
<h3><aname="Elements_of_the_Node_object"></a>Elements of the <i>Node</i> object</h3>
<tableborder="0"class="bodyTable">
<thead>
<trclass="a">
<thalign="left"> Item </th>
<thalign="left"> Data Type </th>
<thalign="left"> Description </th></tr>
</thead><tbody>
<trclass="b">
<tdalign="left"> name </td>
<tdalign="left"> string </td>
<tdalign="left"> ID of the updated container, will show “Container-Id-Not-Assigned” if not assigned. </td></tr>
<trclass="a">
<tdalign="left"> allocationState </td>
<tdalign="left"> string </td>
<tdalign="left"> Final allocation state of the application, including ALLOCATED, RESERVED, RE_RESERVED, and SKIPPED. </td></tr>
<trclass="b">
<tdalign="left"> diagnostic </td>
<tdalign="left"> string </td>
<tdalign="left"> Diagnostic about node in normal mode or nodes in aggregation mode </td></tr>
<trclass="a">
<tdalign="left"> nodeId </td>
<tdalign="left"> string </td>
<tdalign="left"> The node id on which the scheduling process is based, won’t show for aggregation query with groupBy parameter. </td></tr>
<trclass="b">
<tdalign="left"> nodeIds </td>
<tdalign="left"> array of strings </td>
<tdalign="left"> A collection of node IDs for aggregated app activities, only show for aggregation query with groupBy parameter. </td></tr>
<trclass="a">
<tdalign="left"> count </td>
<tdalign="left"> int </td>
<tdalign="left"> The number of node IDs, only show for aggregation query with groupBy parameter. </td></tr>
"diagnostic": "Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=<memory:4096, vCores:1>, available=<memory:2048, vCores:2>",
"diagnostic": "Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=<memory:4096, vCores:1>, available=<memory:2048, vCores:2>",
"diagnostic": "Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=<memory:4096, vCores:1>, available=<memory:2048, vCores:2>",
"diagnostic": "Node does not have sufficient resource for request, insufficient resources=[memory-mb]\nrequired=<memory:4096, vCores:1>, available=<memory:1024, vCores:3>",
<p>When we query scheduler activities REST API with a query parameter (“groupBy=diagnostic”), 4 node activities will be separated into two groups: SKIPPED group with the same diagnostic “Node’s total resource is insufficient for request, insufficient resources=[memory-mb]” and ALLOCATED group, the output should be as follows:</p>
<diagnostic>Node's total resource is insufficient for request, insufficient resources=[memory-mb]\nrequired=&lt;memory:4096, vCores:1&gt;, available=&lt;memory:2048, vCores:2&gt;</diagnostic>
<diagnostic>Node does not have sufficient resource for request, insufficient resources=[memory-mb]\nrequired=&lt;memory:4096, vCores:1&gt;, available=&lt;memory:2048, vCores:2&gt;</diagnostic>
<diagnostic>Node does not have sufficient resource for request, insufficient resources=[memory-mb]\nrequired=&lt;memory:4096, vCores:1&gt;, available=&lt;memory:2048, vCores:2&gt;</diagnostic>
<diagnostic>Node does not have sufficient resource for request, insufficient resources=[memory-mb]\nrequired=&lt;memory:4096, vCores:1&gt;, available=&lt;memory:1024, vCores:3&gt;</diagnostic>