|
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<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
YarnAppmasterConfigurer
DefaultMasterContainerRunnerConfigurer
into a current builder.
JavaConfig:
public void configure(YarnAppmasterConfigure master) throws Exception { Properties properties = new Properties(); properties.setProperty("foo1", "bar1"); master .withContainerRunner() .arguments(properties) .argument("foo2", "bar2"); }
XML:
<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 YarnAppmasterConfigurer
MasterContainerRunnerConfigurer
for chaining
java.lang.Exception
public MasterContainerAllocatorConfigurer withContainerAllocator() throws java.lang.Exception
YarnAppmasterConfigurer
DefaultMasterContainerAllocatorConfigurer
into a current builder.
JavaConfig:
public void configure(YarnAppmasterConfigure master) throws Exception { master .withContainerAllocator() .priority(0) .virtualCores(1) .memory(1024); }
XML:
<yarn:master> <yarn:container-allocator priority="0" virtualcores="1" memory="1024"/> </yarn:master>
withContainerAllocator
in interface YarnAppmasterConfigurer
MasterContainerAllocatorConfigurer
for chaining
java.lang.Exception
public 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)
YarnAppmasterConfigurer
YarnAppmaster
class.
JavaConfig:
public void configure(YarnAppmasterConfigure master) throws Exception { master .appmasterClass(MyYarnAppmaster.class); }
XML:
<yarn:master appmaster-class="com.example.MyYarnAppmaster"/>
appmasterClass
in interface YarnAppmasterConfigurer
clazz
- The Yarn appmaster class
YarnAppmasterConfigurer
for chainingpublic YarnAppmasterBuilder appmasterClass(java.lang.String clazz)
YarnAppmasterConfigurer
YarnAppmaster
as a fully qualified class name.
JavaConfig:
public void configure(YarnAppmasterConfigure master) throws Exception { master .appmasterClass(MyYarnAppmaster.class); }
XML:
No equivalent
appmasterClass
in interface YarnAppmasterConfigurer
clazz
- The Yarn appmaster class
YarnAppmasterConfigurer
for chainingpublic YarnAppmasterBuilder containerCommands(java.lang.String... commands)
YarnAppmasterConfigurer
JavaConfig:
public void configure(YarnAppmasterConfigure master) throws Exception { master .containerCommands("date", "1>/Container.stdout", "2> /Container.stderr"); }
XML:
<yarn:master> <yarn:container-command> <![CDATA[ date 1>/Container.stdout 2> /Container.stderr ]]> </yarn:container-command> </yarn:master>
containerCommands
in interface YarnAppmasterConfigurer
commands
- 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 |