|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.hadoop.config.common.annotation.AbstractAnnotationBuilder<O>
org.springframework.data.hadoop.config.common.annotation.AbstractConfiguredAnnotationBuilder<org.apache.hadoop.yarn.conf.YarnConfiguration,YarnConfigConfigurer,YarnConfigBuilder>
org.springframework.yarn.config.annotation.builders.YarnConfigBuilder
public final class YarnConfigBuilder
AnnotationBuilder for YarnConfiguration.
| Constructor Summary | |
|---|---|
YarnConfigBuilder()
Instantiates a new yarn config builder. |
|
YarnConfigBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor)
Instantiates a new yarn config builder. |
|
| Method Summary | |
|---|---|
void |
configureProperties(java.util.Properties properties)
Configure Properties. |
void |
configureResources(java.util.Set<org.springframework.core.io.Resource> resources)
Configure Resources. |
YarnConfigConfigurer |
fileSystemUri(java.lang.String uri)
Specify a Hdfs file system uri. |
java.util.Properties |
getProperties()
Gets the Properties. |
java.util.Set<org.springframework.core.io.Resource> |
getResources()
Gets the Resources. |
YarnConfigConfigurer |
loadDefaults(boolean loadDefaults)
Specify if Hadoop Configuration is initially
based on default values. |
protected org.apache.hadoop.yarn.conf.YarnConfiguration |
performBuild()
Subclasses must implement this method to build the object that is being returned. |
YarnConfigConfigurer |
resourceManagerAddress(java.lang.String address)
Specify a Yarn resource manager address. |
YarnConfigConfigurer |
schedulerAddress(java.lang.String address)
Specify a Yarn resource manager scheduler address. |
PropertiesConfigurer<YarnConfigConfigurer> |
withProperties()
Specify configuration options as properties with a PropertiesConfigurer. |
ResourceConfigurer<YarnConfigConfigurer> |
withResources()
Specify configuration options as resource properties with a ResourceConfigurer. |
| Methods inherited from class org.springframework.data.hadoop.config.common.annotation.AbstractConfiguredAnnotationBuilder |
|---|
apply, apply, beforeConfigureMains, beforeConfigurePosts, beforeInit, doBuild, getConfigurer, getConfigurers, getOrApply, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObject |
| Methods inherited from class org.springframework.data.hadoop.config.common.annotation.AbstractAnnotationBuilder |
|---|
build, getObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public YarnConfigBuilder()
public YarnConfigBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor)
objectPostProcessor - the object post processor| Method Detail |
|---|
protected org.apache.hadoop.yarn.conf.YarnConfiguration performBuild()
throws java.lang.Exception
AbstractConfiguredAnnotationBuilder
performBuild in class AbstractConfiguredAnnotationBuilder<org.apache.hadoop.yarn.conf.YarnConfiguration,YarnConfigConfigurer,YarnConfigBuilder>java.lang.Exceptionpublic void configureProperties(java.util.Properties properties)
PropertiesConfigurerAwareProperties.
configureProperties in interface PropertiesConfigurerAwareproperties - the propertiespublic void configureResources(java.util.Set<org.springframework.core.io.Resource> resources)
ResourceConfigurerAwareResources.
configureResources in interface ResourceConfigurerAwareresources - the resources
public ResourceConfigurer<YarnConfigConfigurer> withResources()
throws java.lang.Exception
YarnConfigConfigurerResourceConfigurer.
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
Properties props = new Properties();
config
.withResources()
.resource("cfg-1.properties")
.resource("cfg-2.properties")
.and();
}
XML:
<yarn:configuration properties-location="cfg-1.properties, cfg-2.properties"/>
withResources in interface YarnConfigConfigurerResourceConfigurer for chaining
java.lang.Exception - if error occurred
public PropertiesConfigurer<YarnConfigConfigurer> withProperties()
throws java.lang.Exception
YarnConfigConfigurerPropertiesConfigurer.
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
Properties props = new Properties();
config
.withProperties()
.properties(props)
.property("myKey1", ",myValue1")
.and();
}
XML:
<util:properties id="props" location="props.properties"/>myValue1 </util:properties> <yarn:configuration properties-ref="props"/>
withProperties in interface YarnConfigConfigurerPropertiesConfigurer for chaining
java.lang.Exception - if error occurredpublic YarnConfigConfigurer fileSystemUri(java.lang.String uri)
YarnConfigConfigurer
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
config
.fileSystemUri("hdfs://myhost:8020");
}
XML:
<yarn:configuration fs-uri="hdfs://myhost:8020"/>
fileSystemUri in interface YarnConfigConfigureruri - The Hdfs uri
YarnConfigConfigurer for chainingpublic YarnConfigConfigurer resourceManagerAddress(java.lang.String address)
YarnConfigConfigurer
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
config
.resourceManagerAddress("myRmHost:8032");
}
XML:
<yarn:configuration rm-address="myRmHost:8032"/>
resourceManagerAddress in interface YarnConfigConfigureraddress - The Yarn resource manager address
YarnConfigConfigurer for chainingpublic YarnConfigConfigurer schedulerAddress(java.lang.String address)
YarnConfigConfigurer
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
config
.schedulerAddress("myRmHost:8030");
}
XML:
<yarn:configuration scheduler-address="myRmHost:8030"/>
schedulerAddress in interface YarnConfigConfigureraddress - The Yarn resource manager scheduler address
YarnConfigConfigurer for chainingpublic YarnConfigConfigurer loadDefaults(boolean loadDefaults)
YarnConfigConfigurerConfiguration is initially
based on default values. Default is true.
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
config
.loadDefaults(true);
}
XML:
No equivalent
loadDefaults in interface YarnConfigConfigurerloadDefaults - The flag if defaults should be loaded
YarnConfigConfigurer for chainingpublic java.util.Properties getProperties()
Properties.
public java.util.Set<org.springframework.core.io.Resource> getResources()
Resources.
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||