org.apache.hadoop.yarn.api.protocolrecords
Class GetApplicationsRequest

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

@InterfaceAudience.Public
@InterfaceStability.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:
ApplicationClientProtocol.getApplications(GetApplicationsRequest)

Constructor Summary
GetApplicationsRequest()
           
 
Method Summary
abstract  EnumSet<YarnApplicationState> getApplicationStates()
          Get the application states to filter applications on
abstract  Set<String> getApplicationTags()
          Get the tags to filter applications on
abstract  Set<String> getApplicationTypes()
          Get the application types to filter applications on
abstract  org.apache.commons.lang.math.LongRange getFinishRange()
          Get the range of finish times to filter applications on
abstract  long getLimit()
          Get the limit on the number applications to return
abstract  Set<String> getQueues()
          Get the queues to filter applications on
abstract  ApplicationsRequestScope getScope()
          Get the ApplicationsRequestScope of applications to be filtered.
abstract  org.apache.commons.lang.math.LongRange getStartRange()
          Get the range of start times to filter applications on
abstract  Set<String> getUsers()
          Get the users to filter applications on
static GetApplicationsRequest newInstance()
           
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.
static GetApplicationsRequest newInstance(ApplicationsRequestScope scope, Set<String> users, Set<String> queues, Set<String> applicationTypes, Set<String> applicationTags, EnumSet<YarnApplicationState> applicationStates, org.apache.commons.lang.math.LongRange startRange, org.apache.commons.lang.math.LongRange finishRange, Long limit)
           The request from clients to get a report of Applications matching the giving application types in the cluster from the ResourceManager.
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.
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.
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 types in the cluster from the ResourceManager.
abstract  void setApplicationStates(EnumSet<YarnApplicationState> applicationStates)
          Set the application states to filter applications on
abstract  void setApplicationStates(Set<String> applicationStates)
          Set the application states to filter applications on
abstract  void setApplicationTags(Set<String> tags)
          Set the list of tags to filter applications on
abstract  void setApplicationTypes(Set<String> applicationTypes)
          Set the application types to filter applications on
abstract  void setFinishRange(long begin, long end)
          Set the range of finish times to filter applications on
abstract  void setLimit(long limit)
          Limit the number applications to return
abstract  void setQueues(Set<String> queue)
          Set the queue to filter applications on
abstract  void setScope(ApplicationsRequestScope scope)
          Set the ApplicationsRequestScope of applications to filter.
abstract  void setStartRange(long begin, long end)
          Set the range of start times to filter applications on
abstract  void setUsers(Set<String> users)
          Set the users to filter applications on
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetApplicationsRequest

public GetApplicationsRequest()
Method Detail

newInstance

@InterfaceAudience.Public
@InterfaceStability.Stable
public static GetApplicationsRequest newInstance()

newInstance

@InterfaceAudience.Public
@InterfaceStability.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.lang.math.LongRange startRange,
                                                                                                    org.apache.commons.lang.math.LongRange 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 ApplicationClientProtocol.getApplications(GetApplicationsRequest)
See Also:

Setting any of the parameters to null, would just disable that filter


newInstance

@InterfaceAudience.Public
@InterfaceStability.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
See Also:
ApplicationClientProtocol.getApplications(GetApplicationsRequest)

newInstance

@InterfaceAudience.Public
@InterfaceStability.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.

See Also:
ApplicationClientProtocol.getApplications(GetApplicationsRequest)

newInstance

@InterfaceAudience.Public
@InterfaceStability.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.

See Also:
ApplicationClientProtocol.getApplications(GetApplicationsRequest)

newInstance

@InterfaceAudience.Public
@InterfaceStability.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 types in the cluster from the ResourceManager.

See Also:
ApplicationClientProtocol.getApplications(GetApplicationsRequest)

getApplicationTypes

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract Set<String> getApplicationTypes()
Get the application types to filter applications on

Returns:
Set of Application Types to filter on

setApplicationTypes

@InterfaceAudience.Private
@InterfaceStability.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

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract EnumSet<YarnApplicationState> getApplicationStates()
Get the application states to filter applications on

Returns:
Set of Application states to filter on

setApplicationStates

@InterfaceAudience.Private
@InterfaceStability.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

@InterfaceAudience.Private
@InterfaceStability.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

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract Set<String> getUsers()
Get the users to filter applications on

Returns:
set of users to filter applications on

setUsers

@InterfaceAudience.Private
@InterfaceStability.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

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract Set<String> getQueues()
Get the queues to filter applications on

Returns:
set of queues to filter applications on

setQueues

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setQueues(Set<String> queue)
Set the queue to filter applications on

Parameters:
queue - user to filter applications on

getLimit

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract long getLimit()
Get the limit on the number applications to return

Returns:
number of applications to limit to

setLimit

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setLimit(long limit)
Limit the number applications to return

Parameters:
limit - number of applications to limit to

getStartRange

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract org.apache.commons.lang.math.LongRange getStartRange()
Get the range of start times to filter applications on

Returns:
LongRange of start times to filter applications on

setStartRange

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setStartRange(long begin,
                                                                                         long end)
                            throws IllegalArgumentException
Set the range of start times to filter applications on

Parameters:
begin - beginning of the range
end - end of the range
Throws:
IllegalArgumentException

getFinishRange

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract org.apache.commons.lang.math.LongRange getFinishRange()
Get the range of finish times to filter applications on

Returns:
LongRange of finish times to filter applications on

setFinishRange

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setFinishRange(long begin,
                                                                                          long end)
Set the range of finish times to filter applications on

Parameters:
begin - beginning of the range
end - end of the range
Throws:
IllegalArgumentException

getApplicationTags

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract Set<String> getApplicationTags()
Get the tags to filter applications on

Returns:
list of tags to filter on

setApplicationTags

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setApplicationTags(Set<String> tags)
Set the list of tags to filter applications on

Parameters:
tags - list of tags to filter on

getScope

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract ApplicationsRequestScope getScope()
Get the ApplicationsRequestScope of applications to be filtered.

Returns:
ApplicationsRequestScope of applications to return.

setScope

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setScope(ApplicationsRequestScope scope)
Set the ApplicationsRequestScope of applications to filter.

Parameters:
scope - scope to use for filtering applications


Copyright © 2014 Apache Software Foundation. All Rights Reserved.