@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 |
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).
|
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 |
getStatusString(String appIdOrName)
Get detailed app specific status string for a YARN application.
|
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 serverCopyright © 2008–2018 Apache Software Foundation. All rights reserved.