<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html">Compatibilty between Hadoop 1.x and Hadoop 2.x</a>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img alt="Built by Maven" src="./images/logos/maven-feather.png"/>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<!-- Licensed under the Apache License, Version 2.0 (the "License"); --><!-- you may not use this file except in compliance with the License. --><!-- You may obtain a copy of the License at --><!-- --><!-- http://www.apache.org/licenses/LICENSE-2.0 --><!-- --><!-- Unless required by applicable law or agreed to in writing, software --><!-- distributed under the License is distributed on an "AS IS" BASIS, --><!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --><!-- See the License for the specific language governing permissions and --><!-- limitations under the License. See accompanying LICENSE file. --><div class="section">
<p>The MapReduce Application Master REST API's allow the user to get status on the running MapReduce application master. Currently this is the equivalent to a running MapReduce job. The information includes the jobs the app master is running and all the job particulars like tasks, counters, configuration, attempts, etc. The application master should be accessed via the proxy. This proxy is configurable to run either on the resource manager or on a separate host. The proxy URL usually looks like: http://<i>proxy http address:port</i>/proxy/<a name="appid">appid</a>.</p></div>
<div class="section">
<h3>Mapreduce Application Master Info API<a name="Mapreduce_Application_Master_Info_API"></a></h3>
<p>The MapReduce application master information resource provides overall information about that mapreduce application master. This includes application id, time it was started, user, name, etc. </p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<p>Both of the following URI's give you the MapReduce application master information, from an application id identified by the appid value. </p>
<p>The jobs resource provides a list of the jobs running on this application master. See also <a href="#Job_API">Job API</a> for syntax of the job object.</p>
<h4>Elements of the <i>jobs</i> object<a name="Elements_of_the_jobs_object"></a></h4>
<p>When you make a request for the list of jobs, the information will be returned as a collection of job objects. See also <a href="#Job_API">Job API</a> for syntax of the job object.</p>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">job</td>
<td align="left">array of job objects(JSON)/Zero or more job objects(XML)</td>
<td align="left">The collection of job objects</td></tr></table></div>
<p>A job resource contains information about a particular job that was started by this application master. Certain fields are only accessible if user has permissions - depends on acl settings.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<p>Use the following URI to obtain a job object, for a job identified by the jobid value.</p>
<p>With the job attempts API, you can obtain a collection of resources that represent the job attempts. When you run a GET operation on this resource, you obtain a collection of Job Attempt Objects.</p>
<div class="section">
<h4>URI<a name="URI"></a></h4>
<div>
<pre> * http://<history server http address:port>/ws/v1/history/jobs/{jobid}/jobattempts</pre></div></div>
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/jobattempts</pre></div>
<h4>Elements of the <i>conf</i> object<a name="Elements_of_the_conf_object"></a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">path</td>
<td align="left">string</td>
<td align="left">The path to the job configuration file</td></tr>
<tr class="a">
<td align="left">property</td>
<td align="left">array of the configuration properties(JSON)/zero or more property objects(XML)</td>
<td align="left">Collection of property objects</td></tr></table></div>
<div class="section">
<h4>Elements of the <i>property</i> object<a name="Elements_of_the_property_object"></a></h4>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">name</td>
<td align="left">string</td>
<td align="left">The name of the configuration property</td></tr>
<tr class="a">
<td align="left">value</td>
<td align="left">string</td>
<td align="left">The value of the configuration property</td></tr>
<tr class="b">
<td align="left">source</td>
<td align="left">string</td>
<td align="left">The location this configuration object came from. If there is more then one of these it shows the history with the latest source at the end of the list.</td></tr></table></div>
<p>With the tasks API, you can obtain a collection of resources that represent all the tasks for a job. When you run a GET operation on this resource, you obtain a collection of Task Objects. </p>
<pre> * type - type of task, valid values are m or r. m for map task or r for reduce task.</pre></div></div>
<div class="section">
<h4>Elements of the <i>tasks</i> object<a name="Elements_of_the_tasks_object"></a></h4>
<p>When you make a request for the list of tasks , the information will be returned as an array of task objects. See also <a href="#Task_API">Task API</a> for syntax of the task object.</p>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">task</td>
<td align="left">array of task objects(JSON)/zero or more task objects(XML)</td>
<td align="left">The collection of task objects</td></tr></table></div>
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/tasks/task_1326232085508_4_4_r_0</pre></div>
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/tasks/task_1326232085508_4_4_r_0
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/tasks/task_1326232085508_4_4_r_0/counters</pre></div>
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/tasks/task_1326232085508_4_4_r_0/counters
<p>With the task attempts API, you can obtain a collection of resources that represent a task attempt within a job. When you run a GET operation on this resource, you obtain a collection of Task Attempt Objects. </p>
<h4>Elements of the <i>taskAttempts</i> object<a name="Elements_of_the_taskAttempts_object"></a></h4>
<p>When you make a request for the list of task attempts, the information will be returned as an array of task attempt objects. See also <a href="#Task_Attempt_API">Task Attempt API</a> for syntax of the task object.</p>
<table border="1" class="bodyTable">
<tr class="a">
<th align="left">Item</th>
<th align="left">Data Type</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left">taskAttempt</td>
<td align="left">array of task attempt objects(JSON)/zero or more task attempt objects(XML)</td>
<td align="left">The collection of task attempt objects</td></tr></table></div>
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/tasks/task_1326232085508_4_4_r_0/attempts</pre></div>
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/tasks/task_1326232085508_4_4_r_0/attempts
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/tasks/task_1326232085508_4_4_r_0/attempts/attempt_1326232085508_4_4_r_0_0
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/tasks/task_1326232085508_4_4_r_0/attempts/attempt_1326232085508_4_4_r_0_0/counters</pre></div>
<pre> GET http://<proxy http address:port>/proxy/application_1326232085508_0004/ws/v1/mapreduce/jobs/job_1326232085508_4_4/tasks/task_1326232085508_4_4_r_0/attempts/attempt_1326232085508_4_4_r_0_0/counters