public final class YarnConfigBuilder extends org.springframework.data.hadoop.config.common.annotation.AbstractConfiguredAnnotationBuilder<YarnConfiguration,YarnConfigConfigurer,YarnConfigBuilder> implements org.springframework.data.hadoop.config.common.annotation.configurers.PropertiesConfigurerAware, org.springframework.data.hadoop.config.common.annotation.configurers.ResourceConfigurerAware, org.springframework.data.hadoop.config.common.annotation.configurers.SecurityConfigurerAware, YarnConfigConfigurer
AnnotationBuilder for YarnConfiguration.| Constructor and Description |
|---|
YarnConfigBuilder()
Instantiates a new yarn config builder.
|
YarnConfigBuilder(org.springframework.data.hadoop.config.common.annotation.ObjectPostProcessor<Object> objectPostProcessor)
Instantiates a new yarn config builder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configureProperties(Properties properties) |
void |
configureResources(Set<Resource> resources) |
void |
configureSecurity(org.springframework.data.hadoop.security.HadoopSecurity hadoopSecurity) |
YarnConfigConfigurer |
fileSystemUri(String uri)
Specify a Hdfs file system uri.
|
Properties |
getProperties()
Gets the
Properties. |
Set<Resource> |
getResources()
Gets the
Resources. |
org.springframework.data.hadoop.security.HadoopSecurity |
getSecurity()
Gets the
HadoopSecurity. |
YarnConfigConfigurer |
loadDefaults(boolean loadDefaults)
Specify if Hadoop
Configuration is initially
based on default values. |
protected YarnConfiguration |
performBuild() |
YarnConfigConfigurer |
resourceManagerAddress(String address)
Specify a Yarn resource manager address.
|
YarnConfigConfigurer |
schedulerAddress(String address)
Specify a Yarn resource manager scheduler address.
|
org.springframework.data.hadoop.config.common.annotation.configurers.PropertiesConfigurer<YarnConfigConfigurer> |
withProperties()
Specify configuration options as properties with a
PropertiesConfigurer. |
org.springframework.data.hadoop.config.common.annotation.configurers.ResourceConfigurer<YarnConfigConfigurer> |
withResources()
Specify configuration options as resource properties with a
ResourceConfigurer. |
org.springframework.data.hadoop.config.common.annotation.configurers.SecurityConfigurer<YarnConfigConfigurer> |
withSecurity()
Specify security options with a
SecurityConfigurer. |
apply, apply, beforeConfigureMains, beforeConfigurePosts, beforeInit, doBuild, getConfigurer, getConfigurers, getOrApply, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObjectpublic YarnConfigBuilder()
public YarnConfigBuilder(org.springframework.data.hadoop.config.common.annotation.ObjectPostProcessor<Object> objectPostProcessor)
objectPostProcessor - the object post processorprotected YarnConfiguration performBuild() throws Exception
performBuild in class org.springframework.data.hadoop.config.common.annotation.AbstractConfiguredAnnotationBuilder<YarnConfiguration,YarnConfigConfigurer,YarnConfigBuilder>Exceptionpublic void configureProperties(Properties properties)
configureProperties in interface org.springframework.data.hadoop.config.common.annotation.configurers.PropertiesConfigurerAwarepublic void configureResources(Set<Resource> resources)
configureResources in interface org.springframework.data.hadoop.config.common.annotation.configurers.ResourceConfigurerAwarepublic void configureSecurity(org.springframework.data.hadoop.security.HadoopSecurity hadoopSecurity)
configureSecurity in interface org.springframework.data.hadoop.config.common.annotation.configurers.SecurityConfigurerAwarepublic org.springframework.data.hadoop.config.common.annotation.configurers.ResourceConfigurer<YarnConfigConfigurer> withResources() throws Exception
YarnConfigConfigurerResourceConfigurer.
public void configure(YarnConfigConfigure config) throws Exception {
Properties props = new Properties();
config
.withResources()
.resource("cfg-1.properties")
.resource("cfg-2.properties")
.and();
}
<yarn:configuration properties-location="cfg-1.properties, cfg-2.properties"/>
withResources in interface YarnConfigConfigurerResourceConfigurer for chainingException - if error occurredpublic org.springframework.data.hadoop.config.common.annotation.configurers.PropertiesConfigurer<YarnConfigConfigurer> withProperties() throws Exception
YarnConfigConfigurerPropertiesConfigurer.
public void configure(YarnConfigConfigure config) throws Exception {
Properties props = new Properties();
config
.withProperties()
.properties(props)
.property("myKey1", ",myValue1")
.and();
}
<util:properties id="props" location="props.properties"/> <prop key="myKey1">myValue1</prop> </util:properties> <yarn:configuration properties-ref="props"/>
withProperties in interface YarnConfigConfigurerPropertiesConfigurer for chainingException - if error occurredpublic org.springframework.data.hadoop.config.common.annotation.configurers.SecurityConfigurer<YarnConfigConfigurer> withSecurity() throws Exception
YarnConfigConfigurerSecurityConfigurer.
public void configure(YarnConfigConfigure config) throws Exception {
config
.withSecurity()
.authMethod("kerberos")
.namenodePrincipal("hdfs/myhost@LOCALDOMAIN")
.rmManagerPrincipal("yarn/myhost@LOCALDOMAIN");
}
XML:
No equivalent
withSecurity in interface YarnConfigConfigurerSecurityConfigurer for chainingException - if error occurredpublic YarnConfigConfigurer fileSystemUri(String uri)
YarnConfigConfigurer
public void configure(YarnConfigConfigure config) throws Exception {
config
.fileSystemUri("hdfs://myhost:8020");
}
<yarn:configuration fs-uri="hdfs://myhost:8020"/>
fileSystemUri in interface YarnConfigConfigureruri - The Hdfs uriYarnConfigConfigurer for chainingpublic YarnConfigConfigurer resourceManagerAddress(String address)
YarnConfigConfigurer
public void configure(YarnConfigConfigure config) throws Exception {
config
.resourceManagerAddress("myRmHost:8032");
}
<yarn:configuration rm-address="myRmHost:8032"/>
resourceManagerAddress in interface YarnConfigConfigureraddress - The Yarn resource manager addressYarnConfigConfigurer for chainingpublic YarnConfigConfigurer schedulerAddress(String address)
YarnConfigConfigurer
public void configure(YarnConfigConfigure config) throws Exception {
config
.schedulerAddress("myRmHost:8030");
}
<yarn:configuration scheduler-address="myRmHost:8030"/>
schedulerAddress in interface YarnConfigConfigureraddress - The Yarn resource manager scheduler addressYarnConfigConfigurer for chainingpublic YarnConfigConfigurer loadDefaults(boolean loadDefaults)
YarnConfigConfigurerConfiguration is initially
based on default values. Default is true.
public void configure(YarnConfigConfigure config) throws Exception {
config
.loadDefaults(true);
}
loadDefaults in interface YarnConfigConfigurerloadDefaults - The flag if defaults should be loadedYarnConfigConfigurer for chainingpublic Properties getProperties()
Properties.public org.springframework.data.hadoop.security.HadoopSecurity getSecurity()
HadoopSecurity.