|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 Resource s. |
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 Resource s. |
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 processorMethod 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.Exception
public void configureProperties(java.util.Properties properties)
PropertiesConfigurerAware
Properties
.
configureProperties
in interface PropertiesConfigurerAware
properties
- the propertiespublic void configureResources(java.util.Set<org.springframework.core.io.Resource> resources)
ResourceConfigurerAware
Resource
s.
configureResources
in interface ResourceConfigurerAware
resources
- the resourcespublic ResourceConfigurer<YarnConfigConfigurer> withResources() throws java.lang.Exception
YarnConfigConfigurer
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"/>
withResources
in interface YarnConfigConfigurer
ResourceConfigurer
for chaining
java.lang.Exception
- if error occurredpublic PropertiesConfigurer<YarnConfigConfigurer> withProperties() throws java.lang.Exception
YarnConfigConfigurer
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"/>
withProperties
in interface YarnConfigConfigurer
PropertiesConfigurer
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 YarnConfigConfigurer
uri
- 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 YarnConfigConfigurer
address
- 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 YarnConfigConfigurer
address
- The Yarn resource manager scheduler address
YarnConfigConfigurer
for chainingpublic YarnConfigConfigurer loadDefaults(boolean loadDefaults)
YarnConfigConfigurer
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
in interface YarnConfigConfigurer
loadDefaults
- 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()
Resource
s.
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |