public interface YarnContainerConfigurer
YarnContainerConfigure
is an interface for YarnContainerBuilder
which is
exposed to user via SpringYarnConfigurerAdapter
.
Typically configuration is shown below.
@Configuration @EnableYarn(enable=Enable.CONTAINER) static class Config extends SpringYarnConfigurerAdapter { @Override public void configure(YarnContainerConfigure container) throws Exception { container .containerClass(MyYarnContainer.class); } }
Modifier and Type | Method and Description |
---|---|
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. |
YarnContainerConfigurer containerClass(java.lang.Class<? extends YarnContainer> clazz)
YarnContainer
class.
public void configure(YarnContainerConfigure container) throws Exception { container .containerClass(MyYarnContainer.class); }
<yarn:container container-class="com.example.MyYarnContainer"/>
clazz
- The Yarn container classYarnContainerConfigurer
for chainingYarnContainerConfigurer containerClass(java.lang.String clazz)
YarnContainer
as a fully qualified class name.
public void configure(YarnContainerConfigure container) throws Exception { container .containerClass("foo.example.MyYarnContainer"); }
clazz
- The Yarn container classYarnContainerConfigurer
for chainingYarnContainerConfigurer containerRef(YarnContainer ref)
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"/>
ref
- The Yarn container referenceYarnContainerConfigurer
for chaining