public final class YarnEnvironmentBuilder extends AbstractConfiguredAnnotationBuilder<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>,YarnEnvironmentConfigurer,YarnEnvironmentBuilder> implements PropertiesConfigurerAware, YarnEnvironmentConfigurer
AnnotationBuilder。| コンストラクターと説明 |
|---|
YarnEnvironmentBuilder() 新しい yarn 環境ビルダーをインスタンス化します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | addClasspathEntries(java.lang.String id, java.util.ArrayList<java.lang.String> classpathEntries) クラスパスエントリを追加します。 |
void | configuration(org.apache.hadoop.conf.Configuration configuration) 糸の構成を設定します。 |
void | configureProperties(java.util.Properties properties)Properties を構成します。 |
YarnEnvironmentConfigurer | entry(java.lang.String key, java.lang.String value) 環境変数を指定します。 |
YarnEnvironmentConfigurer | entry(java.lang.String id, java.lang.String key, java.lang.String value) 識別子を使用して環境変数を指定します。 |
YarnEnvironmentConfigurer | includeLocalSystemEnv(boolean includeLocalSystemEnv) 既存のシステム環境変数を自動的に含めるかどうかを指定します。 |
YarnEnvironmentConfigurer | includeLocalSystemEnv(java.lang.String id, boolean includeLocalSystemEnv) 既存のシステム環境変数を識別子とともに自動的に含めるかどうかを指定します。 |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> | performBuild() サブクラスはこのメソッドを実装して、返されるオブジェクトを構築する必要があります。 |
YarnEnvironmentConfigurer | propertiesLocation(java.lang.String... locations) プロパティの場所を指定します。 |
YarnEnvironmentConfigurer | propertiesLocationId(java.lang.String id, java.lang.String[] locations) 識別子を使用してプロパティの場所を指定します。 |
void | setDefaultMapreduceAppClasspath(java.lang.String id, java.lang.String defaultMapreduceAppClasspath) デフォルトの mr アプリクラスパスを設定します。 |
void | setDefaultYarnAppClasspath(java.lang.String id, java.lang.String defaultYarnAppClasspath) デフォルトの yarn アプリクラスパスを設定します。 |
void | setDelimiter(java.lang.String id, java.lang.String delimiter) 区切り文字を設定します。 |
void | setIncludeBaseDirectory(java.lang.String id, boolean includeBaseDirectory) インクルードベースディレクトリを設定します。 |
void | setUseDefaultMapreduceClasspath(java.lang.String id, boolean useDefaultClasspath) デフォルトのクラスパスを設定します。 |
void | setUseDefaultYarnClasspath(java.lang.String id, boolean useDefaultClasspath) デフォルトのクラスパスを設定します。 |
EnvironmentClasspathConfigurer | withClasspath() クラスパス環境変数を指定します。 |
EnvironmentClasspathConfigurer | withClasspath(java.lang.String id) 識別子を使用してクラスパス環境変数を指定します。 |
PropertiesConfigurer<YarnEnvironmentConfigurer> | withProperties()PropertiesConfigurer を使用してプロパティを指定します。 |
PropertiesConfigurer<YarnEnvironmentConfigurer> | withProperties(java.lang.String id) 識別子付きの PropertiesConfigurer を使用してプロパティを指定します。 |
apply, apply, beforeConfigureMains, beforeConfigurePosts, beforeInit, doBuild, getConfigurer, getConfigurers, getOrApply, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObjectbuild, getObjectprotected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> performBuild()
throws java.lang.ExceptionAbstractConfiguredAnnotationBuilderAbstractConfiguredAnnotationBuilder<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>,YarnEnvironmentConfigurer, YarnEnvironmentBuilder> の performBuild java.lang.Exception - エラー時 public void configureProperties(java.util.Properties properties)
PropertiesConfigurerAwareProperties を構成します。PropertiesConfigurerAware 内の configureProperties properties - プロパティ public EnvironmentClasspathConfigurer withClasspath() throws java.lang.Exception
YarnEnvironmentConfigurer 新しい DefaultEnvironmentClasspathConfigurer を現在のビルダーに適用します。JavaConfig と XML の同等のものを以下に示します。
JavaConfig:
public void configure(YarnEnvironmentBuilder environment) throws Exception {
environment
.withClasspath()
.entry("cpEntry1")
.entry("cpEntry2")
.useDefaultYarnClasspath(true);
}
<yarn:environment>
<yarn:classpath use-yarn-app-classpath="true" delimiter=":">
cpEntry1
cpEntry2
</yarn:classpath>
</yarn:environment>
YarnEnvironmentConfigurer 内の withClasspath EnvironmentClasspathConfigurerjava.lang.Exception - エラーが発生した場合 public EnvironmentClasspathConfigurer withClasspath(java.lang.String id) throws java.lang.Exception
YarnEnvironmentConfigurerYarnEnvironmentConfigurer 内の withClasspath id - 識別子 EnvironmentClasspathConfigurerjava.lang.Exception - エラーが発生した場合 YarnEnvironmentConfigurer.withClasspath()public YarnEnvironmentConfigurer entry(java.lang.String key, java.lang.String value)
YarnEnvironmentConfigurer
public void configure(YarnEnvironmentConfigure environment) throws Exception {
environment
.entry("myKey1","myValue1")
.entry("myKey2","myValue2");
}
<yarn:environment> myKey1=myValue1 myKey2=myValue2 </yarn:environment>
YarnEnvironmentConfigurer 内の entry key - 環境キー value - 環境価値 YarnEnvironmentConfigurerpublic YarnEnvironmentConfigurer entry(java.lang.String id, java.lang.String key, java.lang.String value)
YarnEnvironmentConfigurerYarnEnvironmentConfigurer 内の entry id - 識別子 key - 環境キー value - 環境価値 YarnEnvironmentConfigurerYarnEnvironmentConfigurer.entry(String, String)public YarnEnvironmentConfigurer propertiesLocation(java.lang.String... locations) throws java.io.IOException
YarnEnvironmentConfigurer
public void configure(YarnEnvironmentConfigure environment) throws Exception {
environment
.entry("myKey1","myValue1")
.entry("myKey2","myValue2")
.propertiesLocation("cfg-1.properties", "cfg-2.properties");
}
<yarn:environment properties-location="cfg-1.properties, cfg-2.properties"> myKey1=myValue1 myKey2=myValue2 </yarn:environment>
YarnEnvironmentConfigurer 内の propertiesLocation locations - プロパティファイルの場所 YarnEnvironmentConfigurerjava.io.IOException - エラーが発生した場合 public YarnEnvironmentConfigurer propertiesLocationId(java.lang.String id, java.lang.String[] locations) throws java.io.IOException
YarnEnvironmentConfigurerYarnEnvironmentConfigurer 内の propertiesLocationId id - 識別子 locations - プロパティファイルの場所 YarnEnvironmentConfigurerjava.io.IOException - エラーが発生した場合 YarnEnvironmentConfigurer.propertiesLocation(String...)public YarnEnvironmentConfigurer includeLocalSystemEnv(boolean includeLocalSystemEnv)
YarnEnvironmentConfigurer
public void configure(YarnEnvironmentConfigure environment) throws Exception {
environment
.includeLocalSystemEnv(false);
}
<yarn:environment include-local-system-env="false"/>
YarnEnvironmentConfigurer 内の includeLocalSystemEnv includeLocalSystemEnv - システム環境変数を含めるかどうか YarnEnvironmentConfigurerpublic YarnEnvironmentConfigurer includeLocalSystemEnv(java.lang.String id, boolean includeLocalSystemEnv)
YarnEnvironmentConfigurerYarnEnvironmentConfigurer 内の includeLocalSystemEnv id - 識別子 includeLocalSystemEnv - システム環境変数を含めるかどうか YarnEnvironmentConfigurerYarnEnvironmentConfigurer.includeLocalSystemEnv(boolean)public PropertiesConfigurer<YarnEnvironmentConfigurer> withProperties() throws java.lang.Exception
YarnEnvironmentConfigurerPropertiesConfigurer を使用してプロパティを指定します。
public void configure(YarnEnvironmentConfigure environment) throws Exception {
Properties props = new Properties();
environment
.withProperties()
.properties(props)
.property("myKey1", ",myValue1")
.and();
}
<util:properties id="props" location="props.properties"/> <prop key="myKey1">myValue1</prop> </util:properties> <yarn:environment properties-ref="props"/>
YarnEnvironmentConfigurer 内の withProperties PropertiesConfigurerjava.lang.Exception - エラーが発生した場合 public PropertiesConfigurer<YarnEnvironmentConfigurer> withProperties(java.lang.String id) throws java.lang.Exception
YarnEnvironmentConfigurerPropertiesConfigurer を使用してプロパティを指定します。YarnEnvironmentConfigurer 内の withProperties id - 識別子 PropertiesConfigurerjava.lang.Exception - エラーが発生した場合 YarnEnvironmentConfigurer.withProperties()public void addClasspathEntries(java.lang.String id,
java.util.ArrayList<java.lang.String> classpathEntries)id - IDclasspathEntries - クラスパスエントリ public void configuration(org.apache.hadoop.conf.Configuration configuration)
configuration - 糸の構成 public void setUseDefaultYarnClasspath(java.lang.String id,
boolean useDefaultClasspath)id - IDuseDefaultClasspath - 新しいデフォルトのクラスパス public void setUseDefaultMapreduceClasspath(java.lang.String id,
boolean useDefaultClasspath)id - IDuseDefaultClasspath - 新しいデフォルトのクラスパス public void setIncludeBaseDirectory(java.lang.String id,
boolean includeBaseDirectory)id - IDincludeBaseDirectory - 新しいインクルードベースディレクトリ public void setDelimiter(java.lang.String id,
java.lang.String delimiter)id - IDdelimiter - 新しい区切り文字 public void setDefaultYarnAppClasspath(java.lang.String id,
java.lang.String defaultYarnAppClasspath)id - IDdefaultYarnAppClasspath - 新しいデフォルトの yarn アプリクラスパス public void setDefaultMapreduceAppClasspath(java.lang.String id,
java.lang.String defaultMapreduceAppClasspath)id - IDdefaultMapreduceAppClasspath - 新しいデフォルトの mr アプリクラスパス