Spring for Apache Hadoop

org.springframework.yarn.client
Class YarnClientFactoryBean

java.lang.Object
  extended by org.springframework.yarn.client.YarnClientFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<YarnClient>, org.springframework.beans.factory.InitializingBean

public class YarnClientFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.FactoryBean<YarnClient>

Factory bean building YarnClient instances.

Author:
Janne Valkealahti

Constructor Summary
YarnClientFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 YarnClient getObject()
           
 java.lang.Class<YarnClient> getObjectType()
           
 boolean isSingleton()
           
 void setAppName(java.lang.String appName)
          Sets the name for submitted application.
 void setCommands(java.util.List<java.lang.String> commands)
          Sets the commands starting appmaster.
 void setCommands(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 setTemplate(ClientRmOperations template)
           
 void setUser(java.lang.String user)
          Sets the user.
 void setVirtualcores(int virtualcores)
          Sets the virtualcores.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YarnClientFactoryBean

public YarnClientFactoryBean()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

getObject

public YarnClient getObject()
                     throws java.lang.Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<YarnClient>
Throws:
java.lang.Exception

getObjectType

public java.lang.Class<YarnClient> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<YarnClient>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<YarnClient>

setConfiguration

public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the Yarn configuration.

Parameters:
configuration - the Yarn configuration

setEnvironment

public void setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
Sets the environment for appmaster.

Parameters:
environment - the environment

setCommands

public void setCommands(java.util.List<java.lang.String> commands)
Sets the commands starting appmaster.

Parameters:
commands - the commands starting appmaster

setCommands

public void setCommands(java.lang.String[] commands)
Sets the commands starting appmaster.

Parameters:
commands - the commands starting appmaster

setResourceLocalizer

public void setResourceLocalizer(ResourceLocalizer resourceLocalizer)
Sets the resource localizer for appmaster container.

Parameters:
resourceLocalizer - the new resource localizer

setAppName

public void setAppName(java.lang.String appName)
Sets the name for submitted application.

Parameters:
appName - the new application name

setPriority

public void setPriority(int priority)
Sets the priority.

Parameters:
priority - the new priority

setVirtualcores

public void setVirtualcores(int virtualcores)
Sets the virtualcores.

Parameters:
virtualcores - the new virtualcores

setMemory

public void setMemory(int memory)
Sets the memory.

Parameters:
memory - the new memory

setQueue

public void setQueue(java.lang.String queue)
Sets the queue.

Parameters:
queue - the new queue

setUser

public void setUser(java.lang.String user)
Sets the user.

Parameters:
user - the new user

setTemplate

public void setTemplate(ClientRmOperations template)

Spring for Apache Hadoop