|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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()
|
org.apache.hadoop.yarn.api.records.ApplicationReport |
getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Gets a report of the application. |
ClientRmOperations |
getClientRmOperations()
Gets the client rm operations. |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Get the Configuration of this client. |
java.util.Map<java.lang.String,java.lang.String> |
getEnvironment()
Gets the environment variables. |
protected org.apache.hadoop.yarn.api.records.ContainerLaunchContext |
getMasterContainerLaunchContext()
Gets the master container launch context. |
protected org.apache.hadoop.fs.Path |
getStagingPath()
Gets the staging path. |
protected org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext |
getSubmissionContext(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Gets the submission context for application master. |
void |
killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Requests a resource manager to kill the application. |
java.util.List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
listApplications()
Gets a list of known applications. |
void |
setApplicationDirName(java.lang.String applicationDirName)
Sets the application dir name. |
void |
setAppName(java.lang.String appName)
Sets the name for submitted application. |
void |
setClientRmOperations(ClientRmOperations clientRmOperations)
Sets the ClientRmOperations implementation for
accessing resource manager. |
void |
setCommands(java.util.List<java.lang.String> commands)
Sets the commands starting appmaster. |
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the Yarn configuration. |
void |
setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
Sets the environment for appmaster. |
void |
setMemory(int memory)
Sets the memory. |
void |
setPriority(int priority)
Sets the priority. |
void |
setQueue(java.lang.String queue)
Sets the queue. |
void |
setResourceLocalizer(ResourceLocalizer resourceLocalizer)
Sets the resource localizer for appmaster container. |
void |
setStagingDirPath(java.lang.String stagingDirPath)
Sets the staging dir path. |
void |
setUser(java.lang.String user)
Sets the user. |
void |
setVirtualcores(int virtualcores)
Sets the virtualcores. |
org.apache.hadoop.yarn.api.records.ApplicationId |
submitApplication()
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 templateMethod Detail |
---|
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public org.apache.hadoop.yarn.api.records.ApplicationId submitApplication()
YarnClient
YarnClient
instance.
submitApplication
in interface YarnClient
ApplicationId
for submitted applicationpublic void killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
YarnClient
killApplication
in interface YarnClient
applicationId
- the ApplicationId
public java.util.List<org.apache.hadoop.yarn.api.records.ApplicationReport> listApplications()
YarnClient
listApplications
in interface YarnClient
ApplicationReport
spublic org.apache.hadoop.yarn.api.records.ApplicationReport getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
YarnClient
getApplicationReport
in interface YarnClient
applicationId
- the application id
ApplicationReport
public void setClientRmOperations(ClientRmOperations clientRmOperations)
ClientRmOperations
implementation for
accessing resource manager.
clientRmOperations
- The client to resource manager implementationpublic ClientRmOperations getClientRmOperations()
public java.util.Map<java.lang.String,java.lang.String> getEnvironment()
public void setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
environment
- the environmentpublic void setCommands(java.util.List<java.lang.String> commands)
commands
- the commands starting appmasterpublic org.apache.hadoop.conf.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.
Configuration
public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration
- the Yarn configurationpublic void setResourceLocalizer(ResourceLocalizer resourceLocalizer)
resourceLocalizer
- the new resource localizerpublic void setAppName(java.lang.String appName)
appName
- the new application namepublic 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(java.lang.String queue)
queue
- the new queuepublic void setUser(java.lang.String user)
user
- the new userpublic void setStagingDirPath(java.lang.String stagingDirPath)
stagingDirPath
- the new staging dir pathpublic void setApplicationDirName(java.lang.String applicationDirName)
applicationDirName
- the new application dir nameprotected org.apache.hadoop.fs.Path getStagingPath()
protected org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext getSubmissionContext(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
protected org.apache.hadoop.yarn.api.records.ContainerLaunchContext getMasterContainerLaunchContext()
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |