org.springframework.yarn.config.annotation.configuration
Class SpringYarnConfiguration
java.lang.Object
org.springframework.data.hadoop.config.common.annotation.AbstractAnnotationConfiguration<SpringYarnConfigBuilder,SpringYarnConfigs>
org.springframework.yarn.config.annotation.configuration.SpringYarnConfiguration
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.annotation.ImportAware
- Direct Known Subclasses:
- SpringYarnAppmasterConfiguration, SpringYarnClientConfiguration, SpringYarnContainerConfiguration
@Configuration
public class SpringYarnConfiguration
- extends AbstractAnnotationConfiguration<SpringYarnConfigBuilder,SpringYarnConfigs>
Uses a SpringYarnConfigBuilder
to create SpringYarnConfigs
holding all relevant configurations for Spring Yarn. It then exports the
necessary beans. Customisations can be made to SpringYarnConfigBuilder
by
extending SpringYarnConfigurerAdapter
and exposing it as a
Configuration
or implementing SpringYarnConfigurer
and
exposing it as a Configuration
. This configuration is imported when
using EnableYarn
.
- Author:
- Janne Valkealahti
- See Also:
EnableYarn
,
SpringYarnConfigBuilder
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
builder
protected SpringYarnConfigBuilder builder
SpringYarnConfiguration
public SpringYarnConfiguration()
yarnEventPublisher
@Bean(name="yarnEventPublisher")
public YarnEventPublisher yarnEventPublisher()
yarnConfiguration
@Bean(name={"yarnConfiguration","hadoopConfiguration"})
public org.apache.hadoop.yarn.conf.YarnConfiguration yarnConfiguration()
throws java.lang.Exception
- Throws:
java.lang.Exception
maySetConfigurationFromContext
public void maySetConfigurationFromContext()
- Sets a configuration from an
ApplicationContext
if one and
only one configuration of type org.apache.hadoop.conf.Configuration
or YarnConfiguration
is found. This is an indication that someone
injected hadoop configuration before we get to this point in spring javaconfig.
yarnLocalresources
@Bean(name="yarnLocalresources")
@DependsOn(value="yarnConfiguration")
public ResourceLocalizer yarnLocalresources()
throws java.lang.Exception
- Throws:
java.lang.Exception
yarnEnvironment
@Bean(name="yarnEnvironment")
@DependsOn(value="yarnConfiguration")
public java.util.Map<java.lang.String,java.lang.String> yarnEnvironment()
throws java.lang.Exception
- Throws:
java.lang.Exception
onConfigurers
protected void onConfigurers(java.util.List<AnnotationConfigurer<SpringYarnConfigs,SpringYarnConfigBuilder>> configurers)
throws java.lang.Exception
- Specified by:
onConfigurers
in class AbstractAnnotationConfiguration<SpringYarnConfigBuilder,SpringYarnConfigs>
- Throws:
java.lang.Exception
setImportMetadata
public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
- Specified by:
setImportMetadata
in interface org.springframework.context.annotation.ImportAware
- Overrides:
setImportMetadata
in class AbstractAnnotationConfiguration<SpringYarnConfigBuilder,SpringYarnConfigs>