@InterfaceAudience.Public
@InterfaceStability.Unstable
public abstract class AppAdminClient
extends org.apache.hadoop.service.CompositeService
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CLASS_NAME |
static String |
DEFAULT_TYPE |
static String |
UNIT_TEST_CLASS_NAME |
static String |
UNIT_TEST_TYPE |
static String |
YARN_APP_ADMIN_CLIENT_PREFIX |
Modifier | Constructor and Description |
---|---|
protected |
AppAdminClient() |
Modifier and Type | Method and Description |
---|---|
abstract int |
actionCancelUpgrade(String appName)
Cancels the upgrade of the service.
|
abstract int |
actionCleanUp(String appName,
String userName)
Operation to be performed by the RM after an application has completed.
|
abstract int |
actionDecommissionInstances(String appName,
List<String> componentInstances)
Decommission component instances of a long running service.
|
abstract int |
actionDestroy(String appName)
Remove the specification and all application data for a YARN application.
|
abstract int |
actionFlex(String appName,
Map<String,String> componentCounts)
Change the number of running containers for a component of a YARN
application / long-running service.
|
abstract int |
actionLaunch(String fileName,
String appName,
Long lifetime,
String queue)
Launch a new YARN application.
|
abstract int |
actionSave(String fileName,
String appName,
Long lifetime,
String queue)
Save the specification for a YARN application / long-running service.
|
abstract int |
actionStart(String appName)
Start a YARN application from a previously saved specification.
|
abstract int |
actionStop(String appName)
Stop a YARN application (attempt to stop gracefully before killing the
application).
|
abstract int |
actionUpgradeComponents(String appName,
List<String> components)
Upgrade components of a long running service.
|
abstract int |
actionUpgradeExpress(String appName,
File fileName)
Express upgrade a long running service.
|
abstract int |
actionUpgradeInstances(String appName,
List<String> componentInstances)
Upgrade component instances of a long running service.
|
static AppAdminClient |
createAppAdminClient(String appType,
org.apache.hadoop.conf.Configuration conf)
Create a new instance of AppAdminClient.
|
abstract int |
enableFastLaunch(String destinationFolder)
Upload AM dependencies to HDFS.
|
abstract String |
getInstances(String appName,
List<String> components,
String version,
List<String> containerStates) |
abstract String |
getStatusString(String appIdOrName)
Get detailed app specific status string for a YARN application.
|
abstract int |
initiateUpgrade(String appName,
String fileName,
boolean autoFinalize)
Initiate upgrade of a long running service.
|
addIfService, addService, getServices, removeService, serviceInit, serviceStart, serviceStop
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public static final String YARN_APP_ADMIN_CLIENT_PREFIX
public static final String DEFAULT_TYPE
public static final String DEFAULT_CLASS_NAME
public static final String UNIT_TEST_TYPE
public static final String UNIT_TEST_CLASS_NAME
@InterfaceAudience.Public @InterfaceStability.Unstable public static AppAdminClient createAppAdminClient(String appType, org.apache.hadoop.conf.Configuration conf)
Create a new instance of AppAdminClient.
appType
- application typeconf
- configuration@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionLaunch(String fileName, String appName, Long lifetime, String queue) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
Launch a new YARN application.
fileName
- specification of applicationappName
- name of the applicationlifetime
- lifetime of the applicationqueue
- queue of the applicationIOException
- IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionStop(String appName) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
Stop a YARN application (attempt to stop gracefully before killing the application). In the case of a long-running service, the service may be restarted later.
appName
- the name of the applicationIOException
- IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionStart(String appName) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
Start a YARN application from a previously saved specification. In the case of a long-running service, the service must have been previously launched/started and then stopped, or previously saved but not started.
appName
- the name of the applicationIOException
- IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionSave(String fileName, String appName, Long lifetime, String queue) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
Save the specification for a YARN application / long-running service. The application may be started later.
fileName
- specification of application to saveappName
- name of the applicationlifetime
- lifetime of the applicationqueue
- queue of the applicationIOException
- IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionDestroy(String appName) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
Remove the specification and all application data for a YARN application. The application cannot be running.
appName
- the name of the applicationIOException
- IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionFlex(String appName, Map<String,String> componentCounts) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
Change the number of running containers for a component of a YARN application / long-running service.
appName
- the name of the applicationcomponentCounts
- map of component name to new component count or
amount to change existing component count (e.g.
5, +5, -5)IOException
- IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int enableFastLaunch(String destinationFolder) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
Upload AM dependencies to HDFS. This makes future application launches faster since the dependencies do not have to be uploaded on each launch.
destinationFolder
- an optional HDFS folder where dependency tarball will be uploadedIOException
- IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getStatusString(String appIdOrName) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
Get detailed app specific status string for a YARN application.
appIdOrName
- appId or appNameIOException
- IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int initiateUpgrade(String appName, String fileName, boolean autoFinalize) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
appName
- the name of the application.fileName
- specification of application upgrade to save.autoFinalize
- when true, finalization of upgrade will be done
automatically.IOException
- IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionUpgradeInstances(String appName, List<String> componentInstances) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
appName
- the name of the application.componentInstances
- the name of the component instances.IOException
- io error occur.org.apache.hadoop.yarn.exceptions.YarnException
- exceptions from yarn servers.@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionUpgradeComponents(String appName, List<String> components) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
appName
- the name of the application.components
- the name of the components.IOException
- io error occur.org.apache.hadoop.yarn.exceptions.YarnException
- exceptions from yarn servers.@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionCleanUp(String appName, String userName) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException
appName
- the name of the application.userName
- the name of the user.IOException
- io error occur.org.apache.hadoop.yarn.exceptions.YarnException
- exceptions from yarn servers.InterruptedException
- if interrupted.@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getInstances(String appName, List<String> components, String version, List<String> containerStates) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
IOException
org.apache.hadoop.yarn.exceptions.YarnException
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionUpgradeExpress(String appName, File fileName) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
appName
- the name of the applicationfileName
- specification of application upgrade to save.IOException
- io error occur.org.apache.hadoop.yarn.exceptions.YarnException
- exceptions from yarn servers.@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionCancelUpgrade(String appName) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
appName
- the name of the applicationIOException
- io error occur.org.apache.hadoop.yarn.exceptions.YarnException
- exceptions from yarn servers.@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionDecommissionInstances(String appName, List<String> componentInstances) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
appName
- the name of the application.componentInstances
- the name of the component instances.IOException
- io error occur.org.apache.hadoop.yarn.exceptions.YarnException
- exceptions from yarn servers.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.