|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.client.AbstractYarnClient
public abstract class AbstractYarnClient
Base implementation providing functionality for YarnClient.
| Constructor Summary | |
|---|---|
AbstractYarnClient(ClientRmOperations clientRmOperations)
Constructs client with a given template. |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
ApplicationReport |
getApplicationReport(ApplicationId applicationId)
Gets a report of the application. |
ClientRmOperations |
getClientRmOperations()
Gets the client rm operations. |
Configuration |
getConfiguration()
Get the Configuration of this client. |
Map<String,String> |
getEnvironment()
Gets the environment variables. |
protected ContainerLaunchContext |
getMasterContainerLaunchContext()
Gets the master container launch context. |
protected Path |
getStagingPath()
Gets the staging path. |
protected ApplicationSubmissionContext |
getSubmissionContext(ApplicationId applicationId)
Gets the submission context for application master. |
void |
installApplication()
Installs the application known to YarnClient instance into hdfs. |
void |
killApplication(ApplicationId applicationId)
Requests a resource manager to kill the application. |
List<ApplicationReport> |
listApplications()
Gets a list of known applications. |
List<ApplicationReport> |
listApplications(String type)
Gets a list of known applications filtered by an application type. |
List<ApplicationReport> |
listRunningApplications(String type)
Gets a list of running applications filtered by an application type. |
void |
setApplicationDirName(String applicationDirName)
Sets the application dir name. |
void |
setAppName(String appName)
Sets the name for submitted application. |
void |
setAppType(String appType)
Sets the type for submitted application. |
void |
setClientRmOperations(ClientRmOperations clientRmOperations)
Sets the ClientRmOperations implementation for
accessing resource manager. |
void |
setCommands(List<String> commands)
Sets the commands starting appmaster. |
void |
setConfiguration(Configuration configuration)
Sets the Yarn configuration. |
void |
setEnvironment(Map<String,String> environment)
Sets the environment for appmaster. |
void |
setMemory(int memory)
Sets the memory. |
void |
setPriority(int priority)
Sets the priority. |
void |
setQueue(String queue)
Sets the queue. |
void |
setResourceLocalizer(ResourceLocalizer resourceLocalizer)
Sets the resource localizer for appmaster container. |
void |
setStagingDirPath(String stagingDirPath)
Sets the staging dir path. |
void |
setVirtualcores(int virtualcores)
Sets the virtualcores. |
ApplicationId |
submitApplication()
Submits the application known to YarnClient instance. |
ApplicationId |
submitApplication(boolean distribute)
Submits the application known to YarnClient instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractYarnClient(ClientRmOperations clientRmOperations)
clientRmOperations - the client to resource manager template| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic ApplicationId submitApplication()
YarnClientYarnClient instance.
submitApplication in interface YarnClientApplicationId for submitted applicationpublic ApplicationId submitApplication(boolean distribute)
YarnClientYarnClient instance.
submitApplication in interface YarnClientdistribute - if set to true files will also be copied
ApplicationId for submitted applicationpublic void installApplication()
YarnClientYarnClient instance into hdfs.
installApplication in interface YarnClientpublic void killApplication(ApplicationId applicationId)
YarnClient
killApplication in interface YarnClientapplicationId - the ApplicationIdpublic List<ApplicationReport> listApplications()
YarnClient
listApplications in interface YarnClientApplicationReportspublic List<ApplicationReport> listApplications(String type)
YarnClient
listApplications in interface YarnClienttype - the yarn application type
ApplicationReportspublic List<ApplicationReport> listRunningApplications(String type)
YarnClient
listRunningApplications in interface YarnClienttype - the yarn application type
ApplicationReportspublic ApplicationReport getApplicationReport(ApplicationId applicationId)
YarnClient
getApplicationReport in interface YarnClientapplicationId - the application id
ApplicationReportpublic void setClientRmOperations(ClientRmOperations clientRmOperations)
ClientRmOperations implementation for
accessing resource manager.
clientRmOperations - The client to resource manager implementationpublic ClientRmOperations getClientRmOperations()
public Map<String,String> getEnvironment()
public void setEnvironment(Map<String,String> environment)
environment - the environmentpublic void setCommands(List<String> commands)
commands - the commands starting appmasterpublic Configuration getConfiguration()
Configuration of this client. Internally
this method is called to get the configuration which
allows sub-classes to override and add additional settings.
Configurationpublic void setConfiguration(Configuration configuration)
configuration - the Yarn configurationpublic void setResourceLocalizer(ResourceLocalizer resourceLocalizer)
resourceLocalizer - the new resource localizerpublic void setAppName(String appName)
appName - the new application namepublic void setAppType(String appType)
appType - the new application typepublic void setPriority(int priority)
priority - the new prioritypublic void setVirtualcores(int virtualcores)
virtualcores - the new virtualcorespublic void setMemory(int memory)
memory - the new memorypublic void setQueue(String queue)
queue - the new queuepublic void setStagingDirPath(String stagingDirPath)
stagingDirPath - the new staging dir pathpublic void setApplicationDirName(String applicationDirName)
applicationDirName - the new application dir nameprotected Path getStagingPath()
protected ApplicationSubmissionContext getSubmissionContext(ApplicationId applicationId)
applicationId - application id
protected ContainerLaunchContext getMasterContainerLaunchContext()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||