Skip to content

Commit c539543

Browse files
xhumanoidlresende
authored andcommitted
add endpoint to retrieve extended info for attempt
1 parent 45c7a74 commit c539543

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

yarn_api_client/resource_manager.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,36 @@ def cluster_application_attempts(self, application_id):
185185

186186
return self.request(path)
187187

188+
def cluster_application_attempt_info(self, application_id, attempt_id):
189+
"""
190+
With the application attempts API, you can obtain an extended info about
191+
an application attempt.
192+
193+
:param str application_id: The application id
194+
:param str attempt_id: The attempt id
195+
:returns: API response object with JSON data
196+
:rtype: :py:class:`yarn_api_client.base.Response`
197+
"""
198+
path = '/ws/v1/cluster/apps/{appid}/appattempts/{attemptid}'.format(
199+
appid=application_id, attemptid=attempt_id)
200+
201+
return self.request(path)
202+
203+
def cluster_application_attempt_containers(self, application_id, attempt_id):
204+
"""
205+
With the application attempts API, you can obtain an information
206+
about container related to an application attempt.
207+
208+
:param str application_id: The application id
209+
:param str attempt_id: The attempt id
210+
:returns: API response object with JSON data
211+
:rtype: :py:class:`yarn_api_client.base.Response`
212+
"""
213+
path = '/ws/v1/cluster/apps/{appid}/appattempts/{attemptid}/containers'.format(
214+
appid=application_id, attemptid=attempt_id)
215+
216+
return self.request(path)
217+
188218
def cluster_application_state(self, application_id):
189219
"""
190220
With the application state API, you can obtain the current

0 commit comments

Comments
 (0)