|
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<YarnAppmaster,YarnAppmasterConfigurer,YarnAppmasterBuilder>
org.springframework.yarn.config.annotation.builders.YarnAppmasterBuilder
public final class YarnAppmasterBuilder
| Constructor Summary | |
|---|---|
YarnAppmasterBuilder()
|
|
YarnAppmasterBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor)
|
|
| Method Summary | |
|---|---|
YarnAppmasterBuilder |
appmasterClass(java.lang.Class<? extends YarnAppmaster> clazz)
Specify a YarnAppmaster class. |
YarnAppmasterBuilder |
appmasterClass(java.lang.String clazz)
Specify a YarnAppmaster as a fully qualified class name. |
void |
configuration(org.apache.hadoop.conf.Configuration configuration)
|
YarnAppmasterBuilder |
containerCommands(java.lang.String... commands)
Specify a raw array of commands used to start a container. |
protected YarnAppmaster |
performBuild()
Subclasses must implement this method to build the object that is being returned. |
void |
setContainerAllocator(ContainerAllocator containerAllocator)
|
void |
setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
|
void |
setResourceLocalizer(ResourceLocalizer resourceLocalizer)
|
MasterContainerAllocatorConfigurer |
withContainerAllocator()
Specify a container allocator for Appmaster. |
MasterContainerRunnerConfigurer |
withContainerRunner()
Specify a container runner for Appmaster. |
| 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 YarnAppmasterBuilder()
public YarnAppmasterBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor)
| Method Detail |
|---|
protected YarnAppmaster performBuild()
throws java.lang.Exception
AbstractConfiguredAnnotationBuilder
performBuild in class AbstractConfiguredAnnotationBuilder<YarnAppmaster,YarnAppmasterConfigurer,YarnAppmasterBuilder>java.lang.Exception
public MasterContainerRunnerConfigurer withContainerRunner()
throws java.lang.Exception
YarnAppmasterConfigurerDefaultMasterContainerRunnerConfigurer into a current builder.
public void configure(YarnAppmasterConfigure master) throws Exception {
Properties properties = new Properties();
properties.setProperty("foo1", "bar1");
master
.withContainerRunner()
.arguments(properties)
.argument("foo2", "bar2");
}
<util:properties id="arguments"> <prop key="foo1">bar1</prop> <prop key="foo2">bar2</prop> </util:properties> <yarn:master> <yarn:container-runner arguments="arguments"/> </yarn:master>
withContainerRunner in interface YarnAppmasterConfigurerMasterContainerRunnerConfigurer for chaining
java.lang.Exception - exception
public MasterContainerAllocatorConfigurer withContainerAllocator()
throws java.lang.Exception
YarnAppmasterConfigurerDefaultMasterContainerAllocatorConfigurer into a current builder.
public void configure(YarnAppmasterConfigure master) throws Exception {
master
.withContainerAllocator()
.priority(0)
.virtualCores(1)
.memory(1024);
}
<yarn:master> <yarn:container-allocator priority="0" virtualcores="1" memory="1024"/> </yarn:master>
withContainerAllocator in interface YarnAppmasterConfigurerMasterContainerAllocatorConfigurer for chaining
java.lang.Exception - exceptionpublic void configuration(org.apache.hadoop.conf.Configuration configuration)
public void setResourceLocalizer(ResourceLocalizer resourceLocalizer)
public void setContainerAllocator(ContainerAllocator containerAllocator)
public void setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
public YarnAppmasterBuilder appmasterClass(java.lang.Class<? extends YarnAppmaster> clazz)
YarnAppmasterConfigurerYarnAppmaster class.
public void configure(YarnAppmasterConfigure master) throws Exception {
master
.appmasterClass(MyYarnAppmaster.class);
}
<yarn:master appmaster-class="com.example.MyYarnAppmaster"/>
appmasterClass in interface YarnAppmasterConfigurerclazz - The Yarn appmaster class
YarnAppmasterConfigurer for chainingpublic YarnAppmasterBuilder appmasterClass(java.lang.String clazz)
YarnAppmasterConfigurerYarnAppmaster as a fully qualified class name.
public void configure(YarnAppmasterConfigure master) throws Exception {
master
.appmasterClass(MyYarnAppmaster.class);
}
appmasterClass in interface YarnAppmasterConfigurerclazz - The Yarn appmaster class
YarnAppmasterConfigurer for chainingpublic YarnAppmasterBuilder containerCommands(java.lang.String... commands)
YarnAppmasterConfigurer
public void configure(YarnAppmasterConfigure master) throws Exception {
master
.containerCommands("date", "1><LOG_DIR>/Container.stdout", "2><LOG_DIR>/Container.stderr");
}
<yarn:master>
<yarn:container-command>
<![CDATA[
date
1><LOG_DIR>/Container.stdout
2><LOG_DIR>/Container.stderr
]]>
</yarn:container-command>
</yarn:master>
containerCommands in interface YarnAppmasterConfigurercommands - The Yarn container commands
YarnAppmasterConfigurer for chaining
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||