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, setSharedObject
build, getObject
public YarnConfigBuilder()
public YarnConfigBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor)
objectPostProcessor
- オブジェクトのポストプロセッサー protected org.apache.hadoop.yarn.conf.YarnConfiguration performBuild() throws java.lang.Exception
AbstractConfiguredAnnotationBuilder
AbstractConfiguredAnnotationBuilder<org.apache.hadoop.yarn.conf.YarnConfiguration,YarnConfigConfigurer, YarnConfigBuilder>
の performBuild
java.lang.Exception
- エラー時 public void configureProperties(java.util.Properties properties)
PropertiesConfigurerAware
Properties
を構成します。PropertiesConfigurerAware
の configureProperties
properties
- プロパティ public void configureResources(java.util.Set<org.springframework.core.io.Resource> resources)
ResourceConfigurerAware
Resource
を構成します。ResourceConfigurerAware
の configureResources
resources
- リソース public void configureSecurity(HadoopSecurity hadoopSecurity)
SecurityConfigurerAware
HadoopSecurity
を設定します。SecurityConfigurerAware
の configureSecurity
hadoopSecurity
- Hadoop のセキュリティ public ResourceConfigurer<YarnConfigConfigurer> withResources() throws java.lang.Exception
YarnConfigConfigurer
ResourceConfigurer
を使用して、構成オプションをリソースプロパティとして指定します。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
ResourceConfigurer
java.lang.Exception
- エラーが発生した場合 public PropertiesConfigurer<YarnConfigConfigurer> withProperties() throws java.lang.Exception
YarnConfigConfigurer
PropertiesConfigurer
を使用して、構成オプションをプロパティとして指定します。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
PropertiesConfigurer
java.lang.Exception
- エラーが発生した場合 public SecurityConfigurer<YarnConfigConfigurer> withSecurity() throws java.lang.Exception
YarnConfigConfigurer
SecurityConfigurer
を使用してセキュリティオプションを指定します。public void configure(YarnConfigConfigure config) throws Exception { config .withSecurity() .authMethod("kerberos") .namenodePrincipal("hdfs/myhost@LOCALDOMAIN") .rmManagerPrincipal("yarn/myhost@LOCALDOMAIN"); }
XML:
同等のものはありません
YarnConfigConfigurer
の withSecurity
SecurityConfigurer
java.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 は YarnConfigConfigurer
public 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 リソースマネージャーアドレス YarnConfigConfigurer
public 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 リソースマネージャースケジューラアドレス YarnConfigConfigurer
public YarnConfigConfigurer loadDefaults(boolean loadDefaults)
YarnConfigConfigurer
Configuration
が最初にデフォルト値に基づいているかどうかを指定します。デフォルトは true
です。public void configure(YarnConfigConfigure config) throws Exception { config .loadDefaults(true); }
YarnConfigConfigurer
の loadDefaults
loadDefaults
- デフォルトをロードするかどうかのフラグ YarnConfigConfigurer
public java.util.Properties getProperties()
Properties
を取得します。public java.util.Set<org.springframework.core.io.Resource> getResources()
Resource
を取得します。public HadoopSecurity getSecurity()
HadoopSecurity
を取得します。