Class GetApplicationsRequest

java.lang.Object
org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest

@Public @Stable public abstract class GetApplicationsRequest extends Object

The request from clients to get a report of Applications in the cluster from the ResourceManager.

See Also:
  • Constructor Details

    • GetApplicationsRequest

      public GetApplicationsRequest()
  • Method Details

    • newInstance

      @Public @Stable public static GetApplicationsRequest newInstance()
    • newInstance

      @Public @Stable public static GetApplicationsRequest newInstance(ApplicationsRequestScope scope, Set<String> users, Set<String> queues, Set<String> applicationTypes, Set<String> applicationTags, EnumSet<YarnApplicationState> applicationStates, org.apache.commons.lang3.Range<Long> startRange, org.apache.commons.lang3.Range<Long> finishRange, Long limit)

      The request from clients to get a report of Applications matching the giving application types in the cluster from the ResourceManager.

      Parameters:
      scope - ApplicationsRequestScope to filter by
      users - list of users to filter by
      queues - list of scheduler queues to filter by
      applicationTypes - types of applications
      applicationTags - application tags to filter by
      applicationStates - application states to filter by
      startRange - range of application start times to filter by
      finishRange - range of application finish times to filter by
      limit - number of applications to limit to
      Returns:
      GetApplicationsRequest to be used with ApplicationBaseProtocol.getApplications(GetApplicationsRequest)
      See Also:
    • newInstance

      @Public @Stable public static GetApplicationsRequest newInstance(ApplicationsRequestScope scope)

      The request from clients to get a report of Applications matching the giving application types in the cluster from the ResourceManager.

      Parameters:
      scope - ApplicationsRequestScope to filter by
      Returns:
      a report of Applications in GetApplicationsRequest
      See Also:
    • newInstance

      @Public @Stable public static GetApplicationsRequest newInstance(Set<String> applicationTypes)

      The request from clients to get a report of Applications matching the giving application types in the cluster from the ResourceManager.

      Parameters:
      applicationTypes - application types.
      Returns:
      a report of Applications in GetApplicationsRequest
      See Also:
    • newInstance

      @Public @Stable public static GetApplicationsRequest newInstance(EnumSet<YarnApplicationState> applicationStates)

      The request from clients to get a report of Applications matching the giving application states in the cluster from the ResourceManager.

      Parameters:
      applicationStates - application states.
      Returns:
      a report of Applications in GetApplicationsRequest
      See Also:
    • newInstance

      @Public @Stable public static GetApplicationsRequest newInstance(Set<String> applicationTypes, EnumSet<YarnApplicationState> applicationStates)

      The request from clients to get a report of Applications matching the giving and application types and application states in the cluster from the ResourceManager.

      Parameters:
      applicationStates - application states.
      applicationTypes - application types.
      Returns:
      a report of Applications in GetApplicationsRequest
      See Also:
    • getApplicationTypes

      @Public @Stable public abstract Set<String> getApplicationTypes()
      Get the application types to filter applications on
      Returns:
      Set of Application Types to filter on
    • setApplicationTypes

      @Private @Unstable public abstract void setApplicationTypes(Set<String> applicationTypes)
      Set the application types to filter applications on
      Parameters:
      applicationTypes - A Set of Application Types to filter on. If not defined, match all applications
    • getApplicationStates

      @Public @Stable public abstract EnumSet<YarnApplicationState> getApplicationStates()
      Get the application states to filter applications on
      Returns:
      Set of Application states to filter on
    • setApplicationStates

      @Private @Unstable public abstract void setApplicationStates(EnumSet<YarnApplicationState> applicationStates)
      Set the application states to filter applications on
      Parameters:
      applicationStates - A Set of Application states to filter on. If not defined, match all running applications
    • setApplicationStates

      @Private @Unstable public abstract void setApplicationStates(Set<String> applicationStates)
      Set the application states to filter applications on
      Parameters:
      applicationStates - all lower-case string representation of the application states to filter on
    • getUsers

      @Private @Unstable public abstract Set<String> getUsers()
      Get the users to filter applications on
      Returns:
      set of users to filter applications on
    • setUsers

      @Private @Unstable public abstract void setUsers(Set<String> users)
      Set the users to filter applications on
      Parameters:
      users - set of users to filter applications on
    • getQueues

      @Private @Unstable public abstract Set<String> getQueues()
      Get the queues to filter applications on
      Returns:
      set of queues to filter applications on
    • setQueues

      @Private @Unstable public abstract void setQueues(Set<String> queue)
      Set the queue to filter applications on
      Parameters:
      queue - user to filter applications on
    • getLimit

      @Private @Unstable public abstract long getLimit()
      Get the limit on the number applications to return
      Returns:
      number of applications to limit to
    • setLimit

      @Private @Unstable public abstract void setLimit(long limit)
      Limit the number applications to return
      Parameters:
      limit - number of applications to limit to
    • getStartRange

      @Private @Unstable public abstract org.apache.commons.lang3.Range<Long> getStartRange()
      Get the range of start times to filter applications on
      Returns:
      Range of start times to filter applications on
    • setStartRange

      @Private @Unstable public abstract void setStartRange(org.apache.commons.lang3.Range<Long> range)
      Set the range of start times to filter applications.
      Parameters:
      range - range of start times.
    • setStartRange

      @Private @Unstable public abstract void setStartRange(long begin, long end) throws IllegalArgumentException
      Set the range of start times to filter applications.
      Parameters:
      begin - beginning of the range
      end - end of the range
      Throws:
      IllegalArgumentException - if an argument is invalid.
    • getFinishRange

      @Private @Unstable public abstract org.apache.commons.lang3.Range<Long> getFinishRange()
      Get the range of finish times to filter applications.
      Returns:
      Range of finish times to filter applications on
    • setFinishRange

      @Private @Unstable public abstract void setFinishRange(org.apache.commons.lang3.Range<Long> range)
      Set the range of finish times to filter applications.
      Parameters:
      range - range of finish times.
    • setFinishRange

      @Private @Unstable public abstract void setFinishRange(long begin, long end)
      Set the range of finish times to filter applications.
      Parameters:
      begin - beginning of the range
      end - end of the range
      Throws:
      IllegalArgumentException - if an argument is invalid.
    • getApplicationTags

      @Private @Unstable public abstract Set<String> getApplicationTags()
      Get the tags to filter applications.
      Returns:
      list of tags to filter.
    • setApplicationTags

      @Private @Unstable public abstract void setApplicationTags(Set<String> tags)
      Set the list of tags to filter applications.
      Parameters:
      tags - list of tags to filter.
    • getScope

      @Private @Unstable public abstract ApplicationsRequestScope getScope()
      Get the ApplicationsRequestScope of applications to be filtered.
      Returns:
      ApplicationsRequestScope of applications to return.
    • setScope

      @Private @Unstable public abstract void setScope(ApplicationsRequestScope scope)
      Set the ApplicationsRequestScope of applications to filter.
      Parameters:
      scope - scope to use for filtering applications
    • getName

      @Private @Unstable public abstract String getName()
      Get the name to filter applications.
      Returns:
      the name
    • setName

      @Private @Unstable public abstract void setName(String name)
      Set the name to filter applications.
      Parameters:
      name - of the application