@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class AppAdminClient extends 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 |
STOP_ONLY_STARTED_SERVICES
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,
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, 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, YarnException
Launch a new YARN application.
fileName
- specification of applicationappName
- name of the applicationlifetime
- lifetime of the applicationqueue
- queue of the applicationIOException
- IOExceptionYarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionStop(String appName) throws IOException, 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
- IOExceptionYarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionStart(String appName) throws IOException, 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
- IOExceptionYarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionSave(String fileName, String appName, Long lifetime, String queue) throws IOException, 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
- IOExceptionYarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionDestroy(String appName) throws IOException, YarnException
Remove the specification and all application data for a YARN application. The application cannot be running.
appName
- the name of the applicationIOException
- IOExceptionYarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionFlex(String appName, Map<String,String> componentCounts) throws IOException, 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
- IOExceptionYarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int enableFastLaunch(String destinationFolder) throws IOException, 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
- IOExceptionYarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getStatusString(String appIdOrName) throws IOException, YarnException
Get detailed app specific status string for a YARN application.
appIdOrName
- appId or appNameIOException
- IOExceptionYarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int initiateUpgrade(String appName, String fileName, boolean autoFinalize) throws IOException, 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
- IOExceptionYarnException
- exception in client or server@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionUpgradeInstances(String appName, List<String> componentInstances) throws IOException, YarnException
appName
- the name of the application.componentInstances
- the name of the component instances.IOException
YarnException
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionUpgradeComponents(String appName, List<String> components) throws IOException, YarnException
appName
- the name of the application.components
- the name of the components.IOException
YarnException
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionCleanUp(String appName, String userName) throws IOException, YarnException
appName
- the name of the application.userName
- the name of the user.IOException
YarnException
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getInstances(String appName, List<String> components, String version, List<String> containerStates) throws IOException, YarnException
IOException
YarnException
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionUpgradeExpress(String appName, File fileName) throws IOException, YarnException
appName
- the name of the applicationfileName
- specification of application upgrade to save.IOException
YarnException
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionCancelUpgrade(String appName) throws IOException, YarnException
appName
- the name of the applicationIOException
YarnException
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int actionDecommissionInstances(String appName, List<String> componentInstances) throws IOException, YarnException
appName
- the name of the application.componentInstances
- the name of the component instances.IOException
YarnException
Copyright © 2019 Apache Software Foundation. All rights reserved.