public class YarnAppListClient extends Object
| Constructor and Description |
|---|
YarnAppListClient(SliderYarnClientImpl yarnClient,
String username,
org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,SliderInstanceDescription> |
enumSliderInstances(boolean listOnlyInState,
org.apache.hadoop.yarn.api.records.YarnApplicationState minAppState,
org.apache.hadoop.yarn.api.records.YarnApplicationState maxAppState)
Enumerate slider instances for the current user, and the
most recent app report, where available.
|
List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
findAllLiveInstances(String appname)
find all live instances of a specific app -if there is more than one
in the cluster, this returns them all.
|
org.apache.hadoop.yarn.api.records.ApplicationReport |
findInstance(String appname)
Find an instance of a application belong to the current user
|
List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
listInstances()
List instances belonging to the specific user
|
List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
listInstances(String user)
List instances belonging to a specific user
|
public YarnAppListClient(SliderYarnClientImpl yarnClient, String username, org.apache.hadoop.conf.Configuration conf)
public List<org.apache.hadoop.yarn.api.records.ApplicationReport> findAllLiveInstances(String appname) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
appname - application nameorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.yarn.api.records.ApplicationReport findInstance(String appname) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
appname - application nameorg.apache.hadoop.yarn.exceptions.YarnException - YARN issuesIOException - IO problemspublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> listInstances() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
org.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> listInstances(String user) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
user - user if not the default. null means default, "" means all users,
otherwise it is the name of a userorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic Map<String,SliderInstanceDescription> enumSliderInstances(boolean listOnlyInState, org.apache.hadoop.yarn.api.records.YarnApplicationState minAppState, org.apache.hadoop.yarn.api.records.YarnApplicationState maxAppState) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
listOnlyInState - boolean to indicate that the instances should
only include those in a YARN state
minAppState <= currentState <= maxAppState minAppState - minimum application state to include in enumeration.maxAppState - maximum application state to includeIOException - Any IO problemorg.apache.hadoop.yarn.exceptions.YarnException - YARN problemsCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.