@Configuration public class SpringYarnConfiguration extends AbstractAnnotationConfiguration<SpringYarnConfigBuilder,SpringYarnConfigs>
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
.EnableYarn
,
SpringYarnConfigBuilder
Modifier and Type | Field and Description |
---|---|
protected SpringYarnConfigBuilder |
builder |
Constructor and Description |
---|
SpringYarnConfiguration() |
Modifier and Type | Method and Description |
---|---|
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. |
protected void |
onConfigurers(java.util.List<AnnotationConfigurer<SpringYarnConfigs,SpringYarnConfigBuilder>> configurers) |
void |
setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata) |
org.apache.hadoop.yarn.conf.YarnConfiguration |
yarnConfiguration() |
java.util.Map<java.lang.String,java.lang.String> |
yarnEnvironment() |
YarnEventPublisher |
yarnEventPublisher() |
ResourceLocalizer |
yarnLocalresources() |
getAnnotationAttributes, getConfigurers, setBeanClassLoader, setConfigurers
protected SpringYarnConfigBuilder builder
@Bean(name="yarnEventPublisher") public YarnEventPublisher yarnEventPublisher()
@Bean(name={"yarnConfiguration","hadoopConfiguration"}) public org.apache.hadoop.yarn.conf.YarnConfiguration yarnConfiguration() throws java.lang.Exception
java.lang.Exception
public void maySetConfigurationFromContext()
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.@Bean(name="yarnLocalresources") @DependsOn(value="yarnConfiguration") public ResourceLocalizer yarnLocalresources() throws java.lang.Exception
java.lang.Exception
@Bean(name="yarnEnvironment") @DependsOn(value="yarnConfiguration") public java.util.Map<java.lang.String,java.lang.String> yarnEnvironment() throws java.lang.Exception
java.lang.Exception
protected void onConfigurers(java.util.List<AnnotationConfigurer<SpringYarnConfigs,SpringYarnConfigBuilder>> configurers) throws java.lang.Exception
onConfigurers
in class AbstractAnnotationConfiguration<SpringYarnConfigBuilder,SpringYarnConfigs>
java.lang.Exception
public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
setImportMetadata
in interface org.springframework.context.annotation.ImportAware
setImportMetadata
in class AbstractAnnotationConfiguration<SpringYarnConfigBuilder,SpringYarnConfigs>