@@ -11,6 +11,13 @@ class ApplicationMaster(BaseYarnAPI):
11
11
equivalent to a running MapReduce job. The information includes the jobs
12
12
the app master is running and all the job particulars like tasks,
13
13
counters, configuration, attempts, etc.
14
+
15
+ If `address` argument is `None` client will try to extract `address` and
16
+ `port` from Hadoop configuration files.
17
+
18
+ :param str address: Proxy HTTP address
19
+ :param int port: Proxy HTTP port
20
+ :param int timeout: API connection timeout in seconds
14
21
"""
15
22
def __init__ (self , address = None , port = 8088 , timeout = 30 ):
16
23
self .address , self .port , self .timeout = address , port , timeout
@@ -24,6 +31,9 @@ def application_information(self, application_id):
24
31
The MapReduce application master information resource provides overall
25
32
information about that mapreduce application master.
26
33
This includes application id, time it was started, user, name, etc.
34
+
35
+ :returns: API response object with JSON data
36
+ :rtype: :py:class:`yarn_api_client.base.Response`
27
37
"""
28
38
path = '/proxy/{appid}/ws/v1/mapreduce/info' .format (
29
39
appid = application_id )
@@ -34,6 +44,10 @@ def jobs(self, application_id):
34
44
"""
35
45
The jobs resource provides a list of the jobs running on this
36
46
application master.
47
+
48
+ :param str application_id: The application id
49
+ :returns: API response object with JSON data
50
+ :rtype: :py:class:`yarn_api_client.base.Response`
37
51
"""
38
52
path = '/proxy/{appid}/ws/v1/mapreduce/jobs' .format (
39
53
appid = application_id )
@@ -45,6 +59,11 @@ def job(self, application_id, job_id):
45
59
A job resource contains information about a particular job that was
46
60
started by this application master. Certain fields are only accessible
47
61
if user has permissions - depends on acl settings.
62
+
63
+ :param str application_id: The application id
64
+ :param str job_id: The job id
65
+ :returns: API response object with JSON data
66
+ :rtype: :py:class:`yarn_api_client.base.Response`
48
67
"""
49
68
path = '/proxy/{appid}/ws/v1/mapreduce/jobs/{jobid}' .format (
50
69
appid = application_id , jobid = job_id )
@@ -55,13 +74,22 @@ def job_attempts(self, job_id):
55
74
"""
56
75
With the job attempts API, you can obtain a collection of resources
57
76
that represent the job attempts.
77
+
78
+ :param str job_id: The job id
79
+ :returns: API response object with JSON data
80
+ :rtype: :py:class:`yarn_api_client.base.Response`
58
81
"""
59
82
pass
60
83
61
84
def job_counters (self , application_id , job_id ):
62
85
"""
63
86
With the job counters API, you can object a collection of resources
64
87
that represent all the counters for that job.
88
+
89
+ :param str application_id: The application id
90
+ :param str job_id: The job id
91
+ :returns: API response object with JSON data
92
+ :rtype: :py:class:`yarn_api_client.base.Response`
65
93
"""
66
94
path = '/proxy/{appid}/ws/v1/mapreduce/jobs/{jobid}/counters' .format (
67
95
appid = application_id , jobid = job_id )
@@ -72,6 +100,11 @@ def job_conf(self, application_id, job_id):
72
100
"""
73
101
A job configuration resource contains information about the job
74
102
configuration for this job.
103
+
104
+ :param str application_id: The application id
105
+ :param str job_id: The job id
106
+ :returns: API response object with JSON data
107
+ :rtype: :py:class:`yarn_api_client.base.Response`
75
108
"""
76
109
path = '/proxy/{appid}/ws/v1/mapreduce/jobs/{jobid}/conf' .format (
77
110
appid = application_id , jobid = job_id )
@@ -82,6 +115,11 @@ def job_tasks(self, application_id, job_id):
82
115
"""
83
116
With the tasks API, you can obtain a collection of resources that
84
117
represent all the tasks for a job.
118
+
119
+ :param str application_id: The application id
120
+ :param str job_id: The job id
121
+ :returns: API response object with JSON data
122
+ :rtype: :py:class:`yarn_api_client.base.Response`
85
123
"""
86
124
path = '/proxy/{appid}/ws/v1/mapreduce/jobs/{jobid}/tasks' .format (
87
125
appid = application_id , jobid = job_id )
@@ -92,6 +130,12 @@ def job_task(self, application_id, job_id, task_id):
92
130
"""
93
131
A Task resource contains information about a particular
94
132
task within a job.
133
+
134
+ :param str application_id: The application id
135
+ :param str job_id: The job id
136
+ :param str task_id: The task id
137
+ :returns: API response object with JSON data
138
+ :rtype: :py:class:`yarn_api_client.base.Response`
95
139
"""
96
140
path = '/proxy/{appid}/ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}' .format (
97
141
appid = application_id , jobid = job_id , taskid = task_id )
@@ -102,6 +146,12 @@ def task_counters(self, application_id, job_id, task_id):
102
146
"""
103
147
With the task counters API, you can object a collection of resources
104
148
that represent all the counters for that task.
149
+
150
+ :param str application_id: The application id
151
+ :param str job_id: The job id
152
+ :param str task_id: The task id
153
+ :returns: API response object with JSON data
154
+ :rtype: :py:class:`yarn_api_client.base.Response`
105
155
"""
106
156
path = '/proxy/{appid}/ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}/counters' .format (
107
157
appid = application_id , jobid = job_id , taskid = task_id )
@@ -112,6 +162,12 @@ def task_attempts(self, application_id, job_id, task_id):
112
162
"""
113
163
With the task attempts API, you can obtain a collection of resources
114
164
that represent a task attempt within a job.
165
+
166
+ :param str application_id: The application id
167
+ :param str job_id: The job id
168
+ :param str task_id: The task id
169
+ :returns: API response object with JSON data
170
+ :rtype: :py:class:`yarn_api_client.base.Response`
115
171
"""
116
172
path = '/proxy/{appid}/ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts' .format (
117
173
appid = application_id , jobid = job_id , taskid = task_id )
@@ -122,6 +178,13 @@ def task_attempt(self, application_id, job_id, task_id, attempt_id):
122
178
"""
123
179
A Task Attempt resource contains information about a particular task
124
180
attempt within a job.
181
+
182
+ :param str application_id: The application id
183
+ :param str job_id: The job id
184
+ :param str task_id: The task id
185
+ :param str attempt_id: The attempt id
186
+ :returns: API response object with JSON data
187
+ :rtype: :py:class:`yarn_api_client.base.Response`
125
188
"""
126
189
path = '/proxy/{appid}/ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}/attempt/{attemptid}' .format (
127
190
appid = application_id , jobid = job_id , taskid = task_id ,
@@ -133,6 +196,13 @@ def task_attempt_counters(self, application_id, job_id, task_id, attempt_id):
133
196
"""
134
197
With the task attempt counters API, you can object a collection
135
198
of resources that represent al the counters for that task attempt.
199
+
200
+ :param str application_id: The application id
201
+ :param str job_id: The job id
202
+ :param str task_id: The task id
203
+ :param str attempt_id: The attempt id
204
+ :returns: API response object with JSON data
205
+ :rtype: :py:class:`yarn_api_client.base.Response`
136
206
"""
137
207
path = '/proxy/{appid}/ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}/attempt/{attemptid}/counters' .format (
138
208
appid = application_id , jobid = job_id , taskid = task_id ,
0 commit comments