|
|||||||||
| 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(String uri)
Specify a Hdfs file system uri. |
YarnConfigConfigurer |
loadDefaults(boolean loadDefaults)
Specify if Hadoop Configuration is initially
based on default values. |
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. |
| Method Detail |
|---|
org.springframework.data.hadoop.config.common.annotation.configurers.ResourceConfigurer<YarnConfigConfigurer> withResources()
throws Exception
ResourceConfigurer.
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"/>
ResourceConfigurer for chaining
Exception - if error occurred
org.springframework.data.hadoop.config.common.annotation.configurers.PropertiesConfigurer<YarnConfigConfigurer> withProperties()
throws Exception
PropertiesConfigurer.
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"/>
PropertiesConfigurer for chaining
Exception - if error occurredYarnConfigConfigurer fileSystemUri(String uri)
public void configure(YarnConfigConfigure config) throws Exception {
config
.fileSystemUri("hdfs://myhost:8020");
}
<yarn:configuration fs-uri="hdfs://myhost:8020"/>
uri - The Hdfs uri
YarnConfigConfigurer for chainingYarnConfigConfigurer resourceManagerAddress(String address)
public void configure(YarnConfigConfigure config) throws Exception {
config
.resourceManagerAddress("myRmHost:8032");
}
<yarn:configuration rm-address="myRmHost:8032"/>
address - The Yarn resource manager address
YarnConfigConfigurer for chainingYarnConfigConfigurer schedulerAddress(String address)
public void configure(YarnConfigConfigure config) throws Exception {
config
.schedulerAddress("myRmHost:8030");
}
<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.
public void configure(YarnConfigConfigure config) throws Exception {
config
.loadDefaults(true);
}
loadDefaults - The flag if defaults should be loaded
YarnConfigConfigurer for chaining
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||