Skip to content

Commit 97b5d2d

Browse files
dimon222kevin-bates
authored andcommitted
Clean documentation (#63)
1 parent 92b3ae0 commit 97b5d2d

File tree

7 files changed

+56
-44
lines changed

7 files changed

+56
-44
lines changed

docs/base.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Base Response class
2+
==========================
3+
4+
.. autoclass:: yarn_api_client.base.Response
5+
:members: data

docs/index.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ Welcome to yarn-api-client's documentation!
99
Contents:
1010

1111
.. toctree::
12-
:maxdepth: 2
12+
:maxdepth: 2
1313

14-
resource_manager
15-
node_manager
16-
application_master
17-
history_server
14+
base
15+
resource_manager
16+
node_manager
17+
application_master
18+
history_server
1819

1920

2021
Indices and tables

yarn_api_client/application_master.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class ApplicationMaster(BaseYarnAPI):
1919
:param int timeout: API connection timeout in seconds
2020
:param AuthBase auth: Auth to use for requests
2121
:param boolean verify: Either a boolean, in which case it controls whether
22-
we verify the server's TLS certificate, or a string, in which case it must
23-
be a path to a CA bundle to use. Defaults to ``True``
22+
we verify the server's TLS certificate, or a string, in which case it must
23+
be a path to a CA bundle to use. Defaults to ``True``
2424
"""
2525
def __init__(self, service_endpoint=None, timeout=30, auth=None, verify=True):
2626
if not service_endpoint:

yarn_api_client/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313

1414

1515
class Response(object):
16+
"""
17+
Basic container for response dictionary
18+
19+
:param requests.Response response: Response for call via requests lib
20+
"""
1621
def __init__(self, response):
22+
#: Dictionary with response data
1723
self.data = response.json()
1824

1925

yarn_api_client/history_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class HistoryServer(BaseYarnAPI):
1919
:param int timeout: API connection timeout in seconds
2020
:param AuthBase auth: Auth to use for requests
2121
:param boolean verify: Either a boolean, in which case it controls whether
22-
we verify the server's TLS certificate, or a string, in which case it must
23-
be a path to a CA bundle to use. Defaults to ``True``
22+
we verify the server's TLS certificate, or a string, in which case it must
23+
be a path to a CA bundle to use. Defaults to ``True``
2424
"""
2525
def __init__(self, service_endpoint=None, timeout=30, auth=None, verify=True):
2626
if not service_endpoint:

yarn_api_client/node_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class NodeManager(BaseYarnAPI):
3030
:param int timeout: API connection timeout in seconds
3131
:param AuthBase auth: Auth to use for requests
3232
:param boolean verify: Either a boolean, in which case it controls whether
33-
we verify the server's TLS certificate, or a string, in which case it must
34-
be a path to a CA bundle to use. Defaults to ``True``
33+
we verify the server's TLS certificate, or a string, in which case it must
34+
be a path to a CA bundle to use. Defaults to ``True``
3535
"""
3636
def __init__(self, service_endpoint=None, timeout=30, auth=None, verify=True):
3737
if not service_endpoint:

yarn_api_client/resource_manager.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ class ResourceManager(BaseYarnAPI):
6363
be used.
6464
6565
:param List[str] service_endpoints: List of ResourceManager HTTP(S)
66-
addresses
66+
addresses
6767
:param int timeout: API connection timeout in seconds
6868
:param AuthBase auth: Auth to use for requests configurations
6969
:param boolean verify: Either a boolean, in which case it controls whether
70-
we verify the server's TLS certificate, or a string, in which case it must
71-
be a path to a CA bundle to use. Defaults to ``True``
70+
we verify the server's TLS certificate, or a string, in which case it must
71+
be a path to a CA bundle to use. Defaults to ``True``
7272
"""
7373
def __init__(self, service_endpoints=None, timeout=30, auth=None, verify=True):
7474
active_service_endpoint = None
@@ -305,8 +305,8 @@ def cluster_application_attempt_container_info(self, application_id, attempt_id,
305305

306306
def cluster_application_state(self, application_id):
307307
"""
308-
* This feature is currently in the alpha stage and may change in the
309-
future *
308+
(This feature is currently in the alpha stage and may change in the
309+
future)
310310
311311
With the application state API, you can obtain the current
312312
state of an application.
@@ -322,8 +322,8 @@ def cluster_application_state(self, application_id):
322322

323323
def cluster_application_kill(self, application_id):
324324
"""
325-
* This feature is currently in the alpha stage and may change in the
326-
future *
325+
(This feature is currently in the alpha stage and may change in the
326+
future)
327327
328328
With the application kill API, you can kill an application
329329
that is not in FINISHED or FAILED state.
@@ -377,8 +377,8 @@ def cluster_node(self, node_id):
377377

378378
def cluster_submit_application(self, data):
379379
"""
380-
* This feature is currently in the alpha stage and may change in the
381-
future *
380+
(This feature is currently in the alpha stage and may change in the
381+
future)
382382
383383
With the New Application API, you can obtain an application-id which
384384
can then be used as part of the Cluster Submit Applications API to
@@ -398,8 +398,8 @@ def cluster_submit_application(self, data):
398398

399399
def cluster_new_application(self):
400400
"""
401-
* This feature is currently in the alpha stage and may change in the
402-
future *
401+
(This feature is currently in the alpha stage and may change in the
402+
future)
403403
404404
With the New Application API, you can obtain an application-id which
405405
can then be used as part of the Cluster Submit Applications API to
@@ -415,8 +415,8 @@ def cluster_new_application(self):
415415

416416
def cluster_get_application_queue(self, application_id):
417417
"""
418-
* This feature is currently in the alpha stage and may change in the
419-
future *
418+
(This feature is currently in the alpha stage and may change in the
419+
future)
420420
421421
With the application queue API, you can query the queue of a
422422
submitted app
@@ -431,8 +431,8 @@ def cluster_get_application_queue(self, application_id):
431431

432432
def cluster_change_application_queue(self, application_id, queue):
433433
"""
434-
* This feature is currently in the alpha stage and may change in the
435-
future *
434+
(This feature is currently in the alpha stage and may change in the
435+
future)
436436
437437
Move a running app to another queue using a PUT request specifying the
438438
target queue.
@@ -458,8 +458,8 @@ def cluster_change_application_queue(self, application_id, queue):
458458

459459
def cluster_get_application_priority(self, application_id):
460460
"""
461-
* This feature is currently in the alpha stage and may change in the
462-
future *
461+
(This feature is currently in the alpha stage and may change in the
462+
future)
463463
464464
With the application priority API, you can query the priority of a
465465
submitted app
@@ -474,8 +474,8 @@ def cluster_get_application_priority(self, application_id):
474474

475475
def cluster_change_application_priority(self, application_id, priority):
476476
"""
477-
* This feature is currently in the alpha stage and may change in the
478-
future *
477+
(This feature is currently in the alpha stage and may change in the
478+
future)
479479
480480
Update priority of a running or accepted app using a PUT request
481481
specifying the target priority.
@@ -584,7 +584,7 @@ def cluster_reservations(self, queue=None, reservation_id=None,
584584
unspecified or invalid, this will default to 0.
585585
:param str end_time: reservations that start after this end-time will be listed. If
586586
unspecified or invalid, this will default to Long.MaxValue.
587-
:param str include_resource_allocations : true or false. If true, the resource allocations
587+
:param str include_resource_allocations: true or false. If true, the resource allocations
588588
of the reservation will be included in the response. If false, no resource allocations
589589
will be included in the response. This will default to false.
590590
:returns: API response object with JSON data
@@ -606,8 +606,8 @@ def cluster_reservations(self, queue=None, reservation_id=None,
606606

607607
def cluster_new_delegation_token(self, renewer):
608608
"""
609-
* This feature is currently in the alpha stage and may change in the
610-
future *
609+
(This feature is currently in the alpha stage and may change in the
610+
future)
611611
612612
API to create delegation token.
613613
@@ -627,8 +627,8 @@ def cluster_new_delegation_token(self, renewer):
627627

628628
def cluster_renew_delegation_token(self, delegation_token):
629629
"""
630-
* This feature is currently in the alpha stage and may change in the
631-
future *
630+
(This feature is currently in the alpha stage and may change in the
631+
future)
632632
633633
API to renew delegation token.
634634
@@ -650,8 +650,8 @@ def cluster_renew_delegation_token(self, delegation_token):
650650

651651
def cluster_cancel_delegation_token(self, delegation_token):
652652
"""
653-
* This feature is currently in the alpha stage and may change in the
654-
future *
653+
(This feature is currently in the alpha stage and may change in the
654+
future)
655655
656656
API to cancel delegation token.
657657
@@ -671,8 +671,8 @@ def cluster_cancel_delegation_token(self, delegation_token):
671671

672672
def cluster_new_reservation(self):
673673
"""
674-
* This feature is currently in the alpha stage and may change in the
675-
future *
674+
(This feature is currently in the alpha stage and may change in the
675+
future)
676676
677677
Use the New Reservation API, to obtain a reservation-id which can then be used as part of
678678
the Cluster Reservation API Submit to submit reservations.
@@ -764,7 +764,7 @@ def cluster_application_timeout(self, application_id, timeout_type):
764764
The Cluster Application Timeout resource contains information about timeout.
765765
766766
:param str application_id: The application id
767-
:param str timeout_type:Timeout type. Valid values are the members of the
767+
:param str timeout_type: Timeout type. Valid values are the members of the
768768
ApplicationTimeoutType enum. LIFETIME is currently the only valid value. .
769769
:returns: API response object with JSON data
770770
:rtype: :py:class:`yarn_api_client.base.Response`
@@ -794,8 +794,8 @@ def cluster_update_application_timeout(self, application_id, timeout_type, expir
794794

795795
def cluster_scheduler_conf_mutation(self):
796796
"""
797-
* This feature is currently in the alpha stage and may change in the
798-
future *
797+
(This feature is currently in the alpha stage and may change in the
798+
future)
799799
800800
API to retrieve the scheduler’s configuration that is currently loaded into
801801
scheduler’s context.
@@ -809,8 +809,8 @@ def cluster_scheduler_conf_mutation(self):
809809

810810
def cluster_modify_scheduler_conf_mutation(self, data):
811811
"""
812-
* This feature is currently in the alpha stage and may change in the
813-
future *
812+
(This feature is currently in the alpha stage and may change in the
813+
future)
814814
815815
API to modify the scheduler configuration
816816

0 commit comments

Comments
 (0)