public class ConfigurationFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.FactoryBean<org.apache.hadoop.conf.Configuration>
Configuration instances.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
USERKEYTAB |
static java.lang.String |
USERPRINCIPAL |
| Constructor and Description |
|---|
ConfigurationFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.apache.hadoop.conf.Configuration |
createConfiguration(org.apache.hadoop.conf.Configuration existing)
Creates a configuration instance potentially using the existing one (passed as an argument - which can be null).
|
org.apache.hadoop.conf.Configuration |
getObject() |
java.lang.Class<?> |
getObjectType() |
boolean |
isSingleton() |
protected void |
postProcessConfiguration(org.apache.hadoop.conf.Configuration configuration) |
void |
setBeanClassLoader(java.lang.ClassLoader classLoader) |
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the parent configuration.
|
void |
setFileSystemUri(java.lang.String fsUri)
Sets the File System ('fs.defaultFS') URI
|
void |
setInitialize(boolean initialize)
Indicates whether the configuration object should be initialized (true) or not.
|
void |
setJobHistoryUri(java.lang.String jhUri)
Sets the Job Tracker ('mapreduce.jobhistory.address') URI.
|
void |
setLoadDefaults(boolean loadDefaults)
Indicates whether to load the defaults (the default) or not for this configuration.
|
void |
setNamenodePrincipal(java.lang.String namenodePrincipal)
Sets the used namenode principal.
|
void |
setProperties(java.util.Properties properties)
Sets the configuration properties.
|
void |
setRegisterUrlHandler(boolean register)
Indicates whether the configuration should register an URL handler (for allowing urls
to understand HDFS prefixes, such as hdfs) or not.
|
void |
setResources(java.util.Set<org.springframework.core.io.Resource> resources)
Sets the configuration resources.
|
void |
setRmManagerPrincipal(java.lang.String rmManagerPrincipal)
Sets the used resource manager principal.
|
void |
setRmManagerUri(java.lang.String rmUri)
Sets the Yarn resource manager ('yarn.resourcemanager.address') URI.
|
void |
setSecurityMethod(java.lang.String securityMethod)
Sets the used security method.
|
void |
setUserKeytab(java.lang.String userKeytab)
Sets a path to a keytab file.
|
void |
setUserPrincipal(java.lang.String userPrincipal)
Sets the the user login principal.
|
public static final java.lang.String USERKEYTAB
public static final java.lang.String USERPRINCIPAL
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic void setSecurityMethod(java.lang.String securityMethod)
securityMethod - the security methodpublic org.apache.hadoop.conf.Configuration getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.conf.Configuration>public java.lang.Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.conf.Configuration>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.conf.Configuration>public void setBeanClassLoader(java.lang.ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void setUserKeytab(java.lang.String userKeytab)
userKeytab - the path to a keytab filepublic void setUserPrincipal(java.lang.String userPrincipal)
userPrincipal - the user login principalpublic void setNamenodePrincipal(java.lang.String namenodePrincipal)
namenodePrincipal - the namenode principal.public void setRmManagerPrincipal(java.lang.String rmManagerPrincipal)
rmManagerPrincipal - the resource manager principalprotected org.apache.hadoop.conf.Configuration createConfiguration(org.apache.hadoop.conf.Configuration existing)
existing - existing configurationprotected void postProcessConfiguration(org.apache.hadoop.conf.Configuration configuration)
public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration - The configuration to set.public void setLoadDefaults(boolean loadDefaults)
loadDefaults - The loadDefaults to set.public void setResources(java.util.Set<org.springframework.core.io.Resource> resources)
resources - The resources to set.public void setProperties(java.util.Properties properties)
properties - The properties to set.public void setInitialize(boolean initialize)
initialize - whether to initialize or not.public void setRegisterUrlHandler(boolean register)
register - whether to register an URL handler or notpublic void setFileSystemUri(java.lang.String fsUri)
fsUri - the default file system uripublic void setRmManagerUri(java.lang.String rmUri)
rmUri - the resource manager uripublic void setJobHistoryUri(java.lang.String jhUri)
jhUri - the job tracker uri