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>>
Constructor and Description |
---|
EnvironmentFactoryBean() |
Modifier and Type | Method and Description |
---|---|
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 |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the yarn configuration.
|
void |
setDefaultMapreduceAppClasspath(java.lang.String defaultMapreduceAppClasspath)
Sets the default mr app classpath.
|
void |
setDefaultYarnAppClasspath(java.lang.String defaultYarnAppClasspath)
Sets the default yarn app classpath.
|
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 |
setIncludeLocalSystemEnv(boolean includeLocalSystemEnv)
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.
|
void |
setUseDefaultMapreduceClasspath(boolean useDefaultMapreduceClasspath)
If set to true a default 'mr' entries will be added to
a 'CLASSPATH' environment variable.
|
void |
setUseDefaultYarnClasspath(boolean useDefaultYarnClasspath)
If set to true a default 'yarn' entries will be added to
a 'CLASSPATH' environment variable.
|
public java.util.Map<java.lang.String,java.lang.String> getObject() throws java.lang.Exception
getObject
in interface org.springframework.beans.factory.FactoryBean<java.util.Map<java.lang.String,java.lang.String>>
java.lang.Exception
public java.lang.Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<java.util.Map<java.lang.String,java.lang.String>>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<java.util.Map<java.lang.String,java.lang.String>>
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public void setIncludeLocalSystemEnv(boolean includeLocalSystemEnv)
System.getenv()
will
be included to environment settings. Default value is true.includeLocalSystemEnv
- flag to setpublic void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration
- the new yarn configurationprotected java.util.Map<java.lang.String,java.lang.String> createEnvironment()
Map
to be returned from this factory bean.public void setProperties(java.util.Properties properties)
properties
- The properties to set.public void setClasspath(java.lang.String classpath)
classpath
- the incoming classpath to setpublic void setDefaultYarnAppClasspath(java.lang.String defaultYarnAppClasspath)
defaultYarnAppClasspath
- the new default yarn app classpathpublic void setDefaultMapreduceAppClasspath(java.lang.String defaultMapreduceAppClasspath)
defaultMapreduceAppClasspath
- the new default mr app classpathpublic void setUseDefaultYarnClasspath(boolean useDefaultYarnClasspath)
useDefaultYarnClasspath
- Flag telling if default yarn entries
should be added to classpathpublic void setUseDefaultMapreduceClasspath(boolean useDefaultMapreduceClasspath)
useDefaultMapreduceClasspath
- Flag telling if default mr entries
should be added to classpathpublic void setIncludeBaseDirectory(boolean includeBaseDirectory)
includeBaseDirectory
- Flag telling if base directory entry
should be added to classpathpublic void setDelimiter(java.lang.String delimiter)
delimiter
- delimiter to use in classpath