History Server API’s.¶
-
class
yarn_api_client.history_server.
HistoryServer
(service_endpoint=None, timeout=30, auth=None, verify=True)¶ 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 service_endpoint argument is None client will try to extract it from Hadoop configuration files.
Parameters: - service_endpoint (str) – HistoryServer 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
()¶ 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.
Parameters: job_id (str) – The job id Returns: API response object with JSON data Return type: yarn_api_client.base.Response
-
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:
-
job_tasks
(job_id, job_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:
-
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: 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:
-
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:
-
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:
-
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: