Spring for Apache Hadoop

org.springframework.yarn.configuration
Class EnvironmentFactoryBean

java.lang.Object
  extended by org.springframework.yarn.configuration.EnvironmentFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<java.util.Map<java.lang.String,java.lang.String>>, org.springframework.beans.factory.InitializingBean

public class EnvironmentFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.FactoryBean<java.util.Map<java.lang.String,java.lang.String>>

FactoryBean for creating a Map of environment variables.

Author:
Janne Valkealahti

Constructor Summary
EnvironmentFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  java.util.Map<java.lang.String,java.lang.String> createEnvironment()
          Creates the Map to be returned from this factory bean.
 java.util.Map<java.lang.String,java.lang.String> getObject()
           
 java.lang.Class<?> getObjectType()
           
 boolean isSingleton()
           
 void setClasspath(java.lang.String classpath)
          Sets incoming classpath.
 void setDefaultYarnAppClasspath(boolean defaultYarnAppClasspath)
          If set to true a default 'yarn' entries will be added to a 'CLASSPATH' environment variable.
 void setDelimiter(java.lang.String delimiter)
          Sets the delimiter used in a classpath.
 void setIncludeBaseDirectory(boolean includeBaseDirectory)
          If set to true a base directory entry will be added to a 'CLASSPATH' environment variable.
 void setIncludeSystemEnv(boolean includeSystemEnv)
          If set to true properties from a System.getenv() will be included to environment settings.
 void setProperties(java.util.Properties properties)
          Sets the configuration properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentFactoryBean

public EnvironmentFactoryBean()
Method Detail

getObject

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

getObjectType

public java.lang.Class<?> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<java.util.Map<java.lang.String,java.lang.String>>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<java.util.Map<java.lang.String,java.lang.String>>

afterPropertiesSet

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

setIncludeSystemEnv

public void setIncludeSystemEnv(boolean includeSystemEnv)
If set to true properties from a System.getenv() will be included to environment settings. Default value is true.

Parameters:
includeSystemEnv - flag to set

createEnvironment

protected java.util.Map<java.lang.String,java.lang.String> createEnvironment()
Creates the Map to be returned from this factory bean.

Returns:
map of environment variables

setProperties

public void setProperties(java.util.Properties properties)
Sets the configuration properties.

Parameters:
properties - The properties to set.

setClasspath

public void setClasspath(java.lang.String classpath)
Sets incoming classpath.

Parameters:
classpath - the incoming classpath to set

setDefaultYarnAppClasspath

public void setDefaultYarnAppClasspath(boolean defaultYarnAppClasspath)
If set to true a default 'yarn' entries will be added to a 'CLASSPATH' environment variable.

Parameters:
defaultYarnAppClasspath - Flag telling if default yarn entries should be added to classpath

setIncludeBaseDirectory

public void setIncludeBaseDirectory(boolean includeBaseDirectory)
If set to true a base directory entry will be added to a 'CLASSPATH' environment variable.

Parameters:
includeBaseDirectory - Flag telling if base directory entry should be added to classpath

setDelimiter

public void setDelimiter(java.lang.String delimiter)
Sets the delimiter used in a classpath.

Parameters:
delimiter - delimiter to use in classpath

Spring for Apache Hadoop