|
|||||||||
| 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<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(org.springframework.data.hadoop.config.common.annotation.ObjectPostProcessor<Object> objectPostProcessor)
Instantiates a new yarn config builder. |
|
| Method Summary | |
|---|---|
void |
configureProperties(Properties properties)
|
void |
configureResources(Set<Resource> resources)
|
YarnConfigConfigurer |
fileSystemUri(String uri)
Specify a Hdfs file system uri. |
Properties |
getProperties()
Gets the Properties. |
Set<Resource> |
getResources()
Gets the Resources. |
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. |
| 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(org.springframework.data.hadoop.config.common.annotation.ObjectPostProcessor<Object> objectPostProcessor)
objectPostProcessor - the object post processor| Method Detail |
|---|
protected 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.ResourceConfigurerAware
public org.springframework.data.hadoop.config.common.annotation.configurers.ResourceConfigurer<YarnConfigConfigurer> withResources()
throws 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
Exception - if error occurred
public org.springframework.data.hadoop.config.common.annotation.configurers.PropertiesConfigurer<YarnConfigConfigurer> withProperties()
throws 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
Exception - if error occurredpublic YarnConfigConfigurer fileSystemUri(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(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(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 Properties getProperties()
Properties.
public Set<Resource> getResources()
Resources.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||