|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface YarnConfigConfigurer
YarnConfigConfigure is an interface for YarnConfigBuilder which is
exposed to user via SpringYarnConfigurerAdapter.
Typically configuration is shown below.
@Configuration
@EnableYarn
static class Config extends SpringYarnConfigurerAdapter {
@Override
public void configure(YarnConfigConfigure config) throws Exception {
config
.fileSystemUri("hdfs://foo.uri")
.withResources()
.resource("classpath:/test-site-1.xml")
.resource("classpath:/test-site-2.xml")
.and()
.withProperties()
.property("foo", "jee");
}
}
| Method Summary | |
|---|---|
YarnConfigConfigurer |
fileSystemUri(java.lang.String uri)
Specify a Hdfs file system uri. |
YarnConfigConfigurer |
loadDefaults(boolean loadDefaults)
Specify if Hadoop Configuration is initially
based on default values. |
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. |
| Method Detail |
|---|
ResourceConfigurer<YarnConfigConfigurer> withResources()
throws java.lang.Exception
ResourceConfigurer.
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"/>
ResourceConfigurer for chaining
java.lang.Exception - if error occurred
PropertiesConfigurer<YarnConfigConfigurer> withProperties()
throws java.lang.Exception
PropertiesConfigurer.
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"/>
PropertiesConfigurer for chaining
java.lang.Exception - if error occurredYarnConfigConfigurer fileSystemUri(java.lang.String uri)
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
config
.fileSystemUri("hdfs://myhost:8020");
}
XML:
<yarn:configuration fs-uri="hdfs://myhost:8020"/>
uri - The Hdfs uri
YarnConfigConfigurer for chainingYarnConfigConfigurer resourceManagerAddress(java.lang.String address)
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
config
.resourceManagerAddress("myRmHost:8032");
}
XML:
<yarn:configuration rm-address="myRmHost:8032"/>
address - The Yarn resource manager address
YarnConfigConfigurer for chainingYarnConfigConfigurer schedulerAddress(java.lang.String address)
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
config
.schedulerAddress("myRmHost:8030");
}
XML:
<yarn:configuration scheduler-address="myRmHost:8030"/>
address - The Yarn resource manager scheduler address
YarnConfigConfigurer for chainingYarnConfigConfigurer loadDefaults(boolean loadDefaults)
Configuration is initially
based on default values. Default is true.
JavaConfig:
public void configure(YarnConfigConfigure config) throws Exception {
config
.loadDefaults(true);
}
XML:
No equivalent
loadDefaults - The flag if defaults should be loaded
YarnConfigConfigurer for chaining
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||