com.cloudera.api.v6
Interface YarnApplicationsResource


public interface YarnApplicationsResource


Method Summary
 ApiYarnApplicationAttributeList getYarnApplicationAttributes()
          Returns the list of all attributes that the Service Monitor can associate with YARN applications.
 ApiYarnApplicationResponse getYarnApplications(String serviceName, String filter, String from, String to, int limit, int offset)
          Returns a list of applications that satisfy the filter
 ApiYarnKillResponse killYarnApplication(String serviceName, String applicationId)
          Kills an YARN Application
 

Method Detail

getYarnApplications

@Path(value="/")
ApiYarnApplicationResponse getYarnApplications(String serviceName,
                                                    String filter,
                                                    String from,
                                                    String to,
                                                    int limit,
                                                    int offset)
Returns a list of applications that satisfy the filter

Available since API v6.

Parameters:
serviceName - The name of the service
filter - A filter to apply to the applications. A basic filter tests the value of an attribute and looks something like 'executing = true' or 'user = root'. Multiple basic filters can be combined into a complex expression using standard and / or boolean logic and parenthesis. An example of a complex filter is: 'application_duration > 5s and (user = root or user = myUserName').
from - Start of the period to query in ISO 8601 format (defaults to 5 minutes before the 'to' time).
to - End of the period to query in ISO 8601 format (defaults to now).
limit - The maximum number of applications to return. Applications will be returned in the following order:
  • All executing applications, ordered from longest to shortest running
  • All completed applications order by end time descending.
offset - The offset to start returning applications from. This is useful for paging through lists of applications. Note that this has non-deterministic behavior if executing applications are included in the response because they can disappear from the list while paging. To exclude executing applications from the response and a 'executing = false' clause to your filter.
Returns:
A list of YARN applications and warnings.

killYarnApplication

@Path(value="/{applicationId: [a-zA-Z0-9]+_[a-zA-Z0-9_]*}/kill")
ApiYarnKillResponse killYarnApplication(String serviceName,
                                             String applicationId)
Kills an YARN Application

Available since API v6.

Parameters:
serviceName - The name of the service
applicationId - The applicationId to kill
Returns:
A warning if there was one. Otherwise null.

getYarnApplicationAttributes

@Path(value="/attributes")
ApiYarnApplicationAttributeList getYarnApplicationAttributes()
Returns the list of all attributes that the Service Monitor can associate with YARN applications.

Examples of attributes include the user who ran the application and the number of maps completed by the application.

These attributes can be used to search for specific YARN applications through the getYarnApplications API. For example the 'user' attribute could be used in the search 'user = root'. If the attribute is numeric it can also be used as a metric in a tsquery (ie, 'select maps_completed from YARN_APPLICATIONS').

Note that this response is identical for all YARN services.

Available since API v6.



Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.