public class YarnContainerBuilder extends AbstractConfiguredAnnotationBuilder<YarnContainer,YarnContainerConfigurer,YarnContainerBuilder> implements YarnContainerConfigurer
Constructor and Description |
---|
YarnContainerBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
configuration(org.apache.hadoop.conf.Configuration configuration) |
YarnContainerConfigurer |
containerClass(java.lang.Class<? extends YarnContainer> clazz)
Specify a
YarnContainer class. |
YarnContainerConfigurer |
containerClass(java.lang.String clazz)
Specify a
YarnContainer as a fully qualified class name. |
YarnContainerConfigurer |
containerRef(YarnContainer ref)
Specify a
YarnContainer reference. |
protected YarnContainer |
performBuild()
Subclasses must implement this method to build the object that is being returned.
|
apply, apply, beforeConfigureMains, beforeConfigurePosts, beforeInit, doBuild, getConfigurer, getConfigurers, getOrApply, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObject
build, getObject
protected YarnContainer performBuild() throws java.lang.Exception
AbstractConfiguredAnnotationBuilder
performBuild
in class AbstractConfiguredAnnotationBuilder<YarnContainer,YarnContainerConfigurer,YarnContainerBuilder>
java.lang.Exception
public YarnContainerConfigurer containerClass(java.lang.Class<? extends YarnContainer> clazz)
YarnContainerConfigurer
YarnContainer
class.
public void configure(YarnContainerConfigure container) throws Exception { container .containerClass(MyYarnContainer.class); }
<yarn:container container-class="com.example.MyYarnContainer"/>
containerClass
in interface YarnContainerConfigurer
clazz
- The Yarn container classYarnContainerConfigurer
for chainingpublic YarnContainerConfigurer containerClass(java.lang.String clazz)
YarnContainerConfigurer
YarnContainer
as a fully qualified class name.
public void configure(YarnContainerConfigure container) throws Exception { container .containerClass("foo.example.MyYarnContainer"); }
containerClass
in interface YarnContainerConfigurer
clazz
- The Yarn container classYarnContainerConfigurer
for chainingpublic void configuration(org.apache.hadoop.conf.Configuration configuration)
public YarnContainerConfigurer containerRef(YarnContainer ref)
YarnContainerConfigurer
YarnContainer
reference.
@Autowired private YarnContainer yarnContainer; public void configure(YarnContainerConfigure container) throws Exception { container .containerRef(MyYarnContainer.class); }
<bean id="myYarnContainer" class="com.example.MyYarnContainer"/> <yarn:container container-ref="myYarnContainer"/>
containerRef
in interface YarnContainerConfigurer
ref
- The Yarn container referenceYarnContainerConfigurer
for chaining