#NEWLINE# def cluster_application_statistics( self , state_list = None , application_type_list = None ) : #NEWLINE# #INDENT# '\n        With the Application Statistics API, you can obtain a collection of\n        triples, each of which contains the application type, the application\n        state and the number of applications of this type and this state in\n        ResourceManager context.\n\n        This method work in Hadoop > 2.0.0\n\n        :param list state_list: states of the applications, specified as a\n            comma-separated list. If states is not provided, the API will\n            enumerate all application states and return the counts of them.\n        :param list application_type_list: types of the applications,\n            specified as a comma-separated list. If applicationTypes is not\n            provided, the API will count the applications of any application\n            type. In this case, the response shows * to indicate any\n            application type. Note that we only support at most one\n            applicationType temporarily. Otherwise, users will expect\n            an BadRequestException.\n        :returns: API response object with JSON data\n        :rtype: :py:class:`yarn_api_client.base.Response`\n        ' #NEWLINE# path = '/ws/v1/cluster/appstatistics' #NEWLINE# states = ( ',' . join ( state_list ) if ( state_list is not None ) else None ) #NEWLINE# if ( application_type_list is not None ) : #NEWLINE# #INDENT# applicationTypes = ',' . join ( application_type_list ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# applicationTypes = None #NEWLINE# #UNINDENT# loc_args = ( ( 'states' , states ) , ( 'applicationTypes' , applicationTypes ) ) #NEWLINE# params = self . construct_parameters ( loc_args ) #NEWLINE# return self . request ( path , ** params )