MapReduce Application Master API’s.

class yarn_api_client.application_master.ApplicationMaster(service_endpoint=None, timeout=30, auth=None, verify=True)

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.

If address argument is None client will try to extract address and port from Hadoop configuration files.

Parameters:
  • service_endpoint (str) – ApplicationMaster HTTP(S) address
  • timeout (int) – API connection timeout in seconds
  • auth (AuthBase) – Auth to use for requests
  • verify (boolean) – Either a boolean, in which case it controls whether we verify the server’s TLS certificate, or a string, in which case it must be a path to a CA bundle to use. Defaults to True
application_information(application_id)

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.

Returns:API response object with JSON data
Return type:yarn_api_client.base.Response
job(application_id, job_id)

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.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

job_attempts(application_id, job_id)

With the job attempts API, you can obtain a collection of resources that represent the job attempts.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

job_conf(application_id, job_id)

A job configuration resource contains information about the job configuration for this job.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

job_counters(application_id, job_id)

With the job counters API, you can object a collection of resources that represent all the counters for that job.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

job_task(application_id, job_id, task_id)

A Task resource contains information about a particular task within a job.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
  • task_id (str) – The task id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

job_tasks(application_id, job_id)

With the tasks API, you can obtain a collection of resources that represent all the tasks for a job.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

jobs(application_id)

The jobs resource provides a list of the jobs running on this application master.

Parameters:application_id (str) – The application id
Returns:API response object with JSON data
Return type:yarn_api_client.base.Response
task_attempt(application_id, job_id, task_id, attempt_id)

A Task Attempt resource contains information about a particular task attempt within a job.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
  • task_id (str) – The task id
  • attempt_id (str) – The attempt id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

task_attempt_counters(application_id, job_id, task_id, attempt_id)

With the task attempt counters API, you can object a collection of resources that represent al the counters for that task attempt.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
  • task_id (str) – The task id
  • attempt_id (str) – The attempt id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

task_attempt_state(application_id, job_id, task_id, attempt_id)

With the task attempt state API, you can query the state of a submitted task attempt.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
  • task_id (str) – The task id
  • attempt_id (str) – The attempt id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

task_attempt_state_kill(application_id, job_id, task_id, attempt_id)

Kill specific attempt using task attempt state API.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
  • task_id (str) – The task id
  • attempt_id (str) – The attempt id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

task_attempts(application_id, job_id, task_id)

With the task attempts API, you can obtain a collection of resources that represent a task attempt within a job.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
  • task_id (str) – The task id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response

task_counters(application_id, job_id, task_id)

With the task counters API, you can object a collection of resources that represent all the counters for that task.

Parameters:
  • application_id (str) – The application id
  • job_id (str) – The job id
  • task_id (str) – The task id
Returns:

API response object with JSON data

Return type:

yarn_api_client.base.Response