Spring for Apache Hadoop

org.springframework.yarn.config.annotation.configurers
Interface EnvironmentClasspathConfigurer

All Superinterfaces:
AnnotationConfigurerBuilder<YarnEnvironmentConfigurer>
All Known Implementing Classes:
DefaultEnvironmentClasspathConfigurer

public interface EnvironmentClasspathConfigurer
extends AnnotationConfigurerBuilder<YarnEnvironmentConfigurer>

AnnotationConfigurerBuilder for configuring classpath environment variable.

Typically configuration is shown below.

 @Configuration
 @EnableYarn(enable=Enable.APPMASTER)
 static class Config extends SpringYarnConfigurerAdapter {

   @Override
   public void configure(YarnEnvironmentConfigurer environment) throws Exception {
     environment
       .withClasspath()
         .includeBaseDirectory(true)
         .useDefaultYarnClasspath(true)
         .defaultYarnAppClasspath("my:cp:entries")
         .delimiter(":")
         .entries("entry1", "entry2")
         .entry("entry3");
   }

 }
 

Author:
Janne Valkealahti

Method Summary
 EnvironmentClasspathConfigurer defaultYarnAppClasspath(java.lang.String... defaultClasspath)
          Specify a default yarn application classpath entries.
 EnvironmentClasspathConfigurer defaultYarnAppClasspath(java.lang.String defaultClasspath)
          Specify a default yarn application classpath.
 EnvironmentClasspathConfigurer delimiter(java.lang.String delimiter)
          Specify a delimiter used in a classpath.
 EnvironmentClasspathConfigurer entries(java.util.List<java.lang.String> entries)
          Specify a new classpath entries.
 EnvironmentClasspathConfigurer entries(java.lang.String... entries)
          Specify a new classpath entries.
 EnvironmentClasspathConfigurer entry(java.lang.String entry)
          Specify a new classpath entry.
 EnvironmentClasspathConfigurer includeBaseDirectory(boolean includeBaseDirectory)
          Specify if base directory should be added in classpath.
 EnvironmentClasspathConfigurer useDefaultYarnClasspath(boolean useDefaultClasspath)
          Specify if default yarn classpath entries should be added.
 
Methods inherited from interface org.springframework.data.hadoop.config.common.annotation.AnnotationConfigurerBuilder
and
 

Method Detail

entry

EnvironmentClasspathConfigurer entry(java.lang.String entry)
Specify a new classpath entry.

Parameters:
entry - the classpath entry
Returns:
EnvironmentClasspathConfigurer for chaining

entries

EnvironmentClasspathConfigurer entries(java.lang.String... entries)
Specify a new classpath entries.

Parameters:
entries - the classpath entries
Returns:
EnvironmentClasspathConfigurer for chaining

entries

EnvironmentClasspathConfigurer entries(java.util.List<java.lang.String> entries)
Specify a new classpath entries.

Parameters:
entries - the classpath entries
Returns:
EnvironmentClasspathConfigurer for chaining

useDefaultYarnClasspath

EnvironmentClasspathConfigurer useDefaultYarnClasspath(boolean useDefaultClasspath)
Specify if default yarn classpath entries should be added.

Parameters:
useDefaultClasspath - the use default classpath
Returns:
EnvironmentClasspathConfigurer for chaining

defaultYarnAppClasspath

EnvironmentClasspathConfigurer defaultYarnAppClasspath(java.lang.String defaultClasspath)
Specify a default yarn application classpath. Given classpath entry can be a comma delimited list.

Parameters:
defaultClasspath - the default classpath
Returns:
EnvironmentClasspathConfigurer for chaining

defaultYarnAppClasspath

EnvironmentClasspathConfigurer defaultYarnAppClasspath(java.lang.String... defaultClasspath)
Specify a default yarn application classpath entries.

Parameters:
defaultClasspath - the default classpath entries.
Returns:
EnvironmentClasspathConfigurer for chaining

includeBaseDirectory

EnvironmentClasspathConfigurer includeBaseDirectory(boolean includeBaseDirectory)
Specify if base directory should be added in classpath.

Parameters:
includeBaseDirectory - the include base directory
Returns:
EnvironmentClasspathConfigurer for chaining

delimiter

EnvironmentClasspathConfigurer delimiter(java.lang.String delimiter)
Specify a delimiter used in a classpath.

Parameters:
delimiter - the delimiter
Returns:
EnvironmentClasspathConfigurer for chaining

Spring for Apache Hadoop