History Server API’s.¶
-
class
yarn_api_client.history_server.
HistoryServer
(address=None, port=19888, timeout=30)¶ The history server REST API’s allow the user to get status on finished applications. Currently it only supports MapReduce and provides information on finished jobs.
If address argument is None client will try to extract address and port from Hadoop configuration files.
Parameters: - address (str) – HistoryServer HTTP address
- port (int) – HistoryServer HTTP port
- timeout (int) – API connection timeout in seconds
-
application_information
()¶ The history server information resource provides overall information about the history server.
Returns: API response object with JSON data Return type: yarn_api_client.base.Response
-
job
(job_id)¶ A Job resource contains information about a particular job identified by jobid.
Parameters: job_id (str) – The job id Returns: API response object with JSON data Return type: yarn_api_client.base.Response
-
job_attempts
(job_id)¶ With the job attempts API, you can obtain a collection of resources that represent a job attempt.
-
job_conf
(job_id)¶ A job configuration resource contains information about the job configuration for this job.
Parameters: job_id (str) – The job id Returns: API response object with JSON data Return type: yarn_api_client.base.Response
-
job_counters
(job_id)¶ With the job counters API, you can object a collection of resources that represent al the counters for that job.
Parameters: job_id (str) – The job id Returns: API response object with JSON data Return type: yarn_api_client.base.Response
-
job_task
(job_id, task_id)¶ A Task resource contains information about a particular task within a job.
Parameters: - 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
(job_id, type=None)¶ With the tasks API, you can obtain a collection of resources that represent a task within a job.
Parameters: - job_id (str) – The job id
- type (str) – type of task, valid values are m or r. m for map task or r for reduce task
Returns: API response object with JSON data
Return type: yarn_api_client.base.Response
-
jobs
(state=None, user=None, queue=None, limit=None, started_time_begin=None, started_time_end=None, finished_time_begin=None, finished_time_end=None)¶ The jobs resource provides a list of the MapReduce jobs that have finished. It does not currently return a full list of parameters.
Parameters: - user (str) – user name
- state (str) – the job state
- queue (str) – queue name
- limit (str) – total number of app objects to be returned
- started_time_begin (str) – jobs with start time beginning with this time, specified in ms since epoch
- started_time_end (str) – jobs with start time ending with this time, specified in ms since epoch
- finished_time_begin (str) – jobs with finish time beginning with this time, specified in ms since epoch
- finished_time_end (str) – jobs with finish time ending with this time, specified in ms since epoch
Returns: API response object with JSON data
Return type: yarn_api_client.base.Response
Raises: yarn_api_client.errors.IllegalArgumentError – if state incorrect
-
task_attempt
(job_id, task_id, attempt_id)¶ A Task Attempt resource contains information about a particular task attempt within a job.
Parameters: - 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
(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: - 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
(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: - 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
(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: - 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