public final class YarnConfigBuilder extends AbstractConfiguredAnnotationBuilder<org.apache.hadoop.yarn.conf.YarnConfiguration,YarnConfigConfigurer,YarnConfigBuilder> implements PropertiesConfigurerAware, ResourceConfigurerAware, SecurityConfigurerAware, YarnConfigConfigurer
YarnConfiguration の場合は AnnotationBuilder。| コンストラクターと説明 |
|---|
YarnConfigBuilder() 新しい yarn config ビルダーをインスタンス化します。 |
YarnConfigBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor) 新しい yarn config ビルダーをインスタンス化します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | configureProperties(java.util.Properties properties)Properties を構成します。 |
void | configureResources(java.util.Set<org.springframework.core.io.Resource> resources)Resource を構成します。 |
void | configureSecurity(HadoopSecurity hadoopSecurity)HadoopSecurity を設定します。 |
YarnConfigConfigurer | fileSystemUri(java.lang.String uri)Hdfs ファイルシステム URI を指定します。 |
java.util.Properties | getProperties()Properties を取得します。 |
java.util.Set<org.springframework.core.io.Resource> | getResources()Resource を取得します。 |
HadoopSecurity | getSecurity()HadoopSecurity を取得します。 |
YarnConfigConfigurer | loadDefaults(boolean loadDefaults)Hadoop Configuration が最初にデフォルト値に基づいているかどうかを指定します。 |
protected org.apache.hadoop.yarn.conf.YarnConfiguration | performBuild() サブクラスはこのメソッドを実装して、返されるオブジェクトを構築する必要があります。 |
YarnConfigConfigurer | resourceManagerAddress(java.lang.String address)Yarn リソースマネージャーのアドレスを指定します。 |
YarnConfigConfigurer | schedulerAddress(java.lang.String address)Yarn リソースマネージャースケジューラーアドレスを指定します。 |
PropertiesConfigurer<YarnConfigConfigurer> | withProperties()PropertiesConfigurer を使用して、構成オプションをプロパティとして指定します。 |
ResourceConfigurer<YarnConfigConfigurer> | withResources()ResourceConfigurer を使用して、構成オプションをリソースプロパティとして指定します。 |
SecurityConfigurer<YarnConfigConfigurer> | withSecurity()SecurityConfigurer を使用してセキュリティオプションを指定します。 |
apply, apply, beforeConfigureMains, beforeConfigurePosts, beforeInit, doBuild, getConfigurer, getConfigurers, getOrApply, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObjectbuild, getObjectpublic YarnConfigBuilder()
public YarnConfigBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor)
objectPostProcessor - オブジェクトのポストプロセッサー protected org.apache.hadoop.yarn.conf.YarnConfiguration performBuild()
throws java.lang.ExceptionAbstractConfiguredAnnotationBuilderAbstractConfiguredAnnotationBuilder<org.apache.hadoop.yarn.conf.YarnConfiguration,YarnConfigConfigurer, YarnConfigBuilder> の performBuild java.lang.Exception - エラー時 public void configureProperties(java.util.Properties properties)
PropertiesConfigurerAwareProperties を構成します。PropertiesConfigurerAware 内の configureProperties properties - プロパティ public void configureResources(java.util.Set<org.springframework.core.io.Resource> resources)
ResourceConfigurerAwareResource を構成します。ResourceConfigurerAware 内の configureResources resources - リソース public void configureSecurity(HadoopSecurity hadoopSecurity)
SecurityConfigurerAwareHadoopSecurity を設定します。SecurityConfigurerAware 内の configureSecurity hadoopSecurity - Hadoop のセキュリティ public ResourceConfigurer<YarnConfigConfigurer> withResources() throws java.lang.Exception
YarnConfigConfigurerResourceConfigurer を使用して、構成オプションをリソースプロパティとして指定します。
public void configure(YarnConfigConfigure config) throws Exception {
Properties props = new Properties();
config
.withResources()
.resource("cfg-1.properties")
.resource("cfg-2.properties")
.and();
}
<yarn:configuration properties-location="cfg-1.properties, cfg-2.properties"/>
YarnConfigConfigurer 内の withResources ResourceConfigurerjava.lang.Exception - エラーが発生した場合 public PropertiesConfigurer<YarnConfigConfigurer> withProperties() throws java.lang.Exception
YarnConfigConfigurerPropertiesConfigurer を使用して、構成オプションをプロパティとして指定します。
public void configure(YarnConfigConfigure config) throws Exception {
Properties props = new Properties();
config
.withProperties()
.properties(props)
.property("myKey1", ",myValue1")
.and();
}
<util:properties id="props" location="props.properties"/> <prop key="myKey1">myValue1</prop> </util:properties> <yarn:configuration properties-ref="props"/>
YarnConfigConfigurer 内の withProperties PropertiesConfigurerjava.lang.Exception - エラーが発生した場合 public SecurityConfigurer<YarnConfigConfigurer> withSecurity() throws java.lang.Exception
YarnConfigConfigurerSecurityConfigurer を使用してセキュリティオプションを指定します。
public void configure(YarnConfigConfigure config) throws Exception {
config
.withSecurity()
.authMethod("kerberos")
.namenodePrincipal("hdfs/myhost@LOCALDOMAIN")
.rmManagerPrincipal("yarn/myhost@LOCALDOMAIN");
}
XML:
同等のものはありません
YarnConfigConfigurer 内の withSecurity SecurityConfigurerjava.lang.Exception - エラーが発生した場合 public YarnConfigConfigurer fileSystemUri(java.lang.String uri)
YarnConfigConfigurer
public void configure(YarnConfigConfigure config) throws Exception {
config
.fileSystemUri("hdfs://myhost:8020");
}
<yarn:configuration fs-uri="hdfs://myhost:8020"/>
YarnConfigConfigurer 内の fileSystemUri uri - Hdfs uri は YarnConfigConfigurerpublic YarnConfigConfigurer resourceManagerAddress(java.lang.String address)
YarnConfigConfigurer
public void configure(YarnConfigConfigure config) throws Exception {
config
.resourceManagerAddress("myRmHost:8032");
}
<yarn:configuration rm-address="myRmHost:8032"/>
YarnConfigConfigurer 内の resourceManagerAddress address - Yarn リソースマネージャーアドレス YarnConfigConfigurerpublic YarnConfigConfigurer schedulerAddress(java.lang.String address)
YarnConfigConfigurer
public void configure(YarnConfigConfigure config) throws Exception {
config
.schedulerAddress("myRmHost:8030");
}
<yarn:configuration scheduler-address="myRmHost:8030"/>
YarnConfigConfigurer 内の schedulerAddress address - Yarn リソースマネージャースケジューラアドレス YarnConfigConfigurerpublic YarnConfigConfigurer loadDefaults(boolean loadDefaults)
YarnConfigConfigurerConfiguration が最初にデフォルト値に基づいているかどうかを指定します。デフォルトは true です。
public void configure(YarnConfigConfigure config) throws Exception {
config
.loadDefaults(true);
}
YarnConfigConfigurer 内の loadDefaults loadDefaults - デフォルトをロードするかどうかのフラグ YarnConfigConfigurerpublic java.util.Properties getProperties()
Properties を取得します。public java.util.Set<org.springframework.core.io.Resource> getResources()
Resource を取得します。public HadoopSecurity getSecurity()
HadoopSecurity を取得します。