com.amazonaws.services.elasticmapreduce.util

## クラス BootstrapActions

- java.lang.Object
- - com.amazonaws.services.elasticmapreduce.util.BootstrapActions

-     public class BootstrapActions
      extends java.lang.Object

  Class that provides helper methods for constructing predefined bootstrap actions.

       AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);
       AmazonElasticMapReduce emr = new AmazonElasticMapReduceClient(credentials);

       BootstrapActions bootstrapActions = new BootstrapActions();

       RunJobFlowRequest request = new RunJobFlowRequest()
             .withName("Job Flow With Bootstrap Actions")
             .withBootstrapActions(
                   bootstrapActions.newRunIf(
                       "instance.isMaster=true",
                       bootstrapActions.newConfigureDaemons()
                           .withHeapSize(Daemon.JobTracker, 2048)
                           .build()))
             .withLogUri("s3://log-bucket/")
             .withInstances(new JobFlowInstancesConfig()
                  .withEc2KeyName("keypair")
                  .withHadoopVersion("0.20")
                  .withInstanceCount(5)
                  .withKeepJobFlowAliveWhenNoSteps(true)
                  .withMasterInstanceType("m1.small")
                  .withSlaveInstanceType("m1.small"));

       RunJobFlowResult result = emr.runJobFlow(request);

- - ### ネストされたクラスの概要

    ネストされたクラス
    修飾子とタイプ | クラスと説明
    --- | ---
    `static class` | `BootstrapActions.ConfigFile` Enum specifying all valid config files.
    `class` | `BootstrapActions.ConfigureDaemons`
    `class` | `BootstrapActions.ConfigureHadoop`
    `static class` | `BootstrapActions.Daemon` List of Hadoop daemons which can be configured.

  - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `BootstrapActions()` Creates a new default BootstrapActions for us in us-east-1.
    `BootstrapActions(java.lang.String bucket)` Creates a new BootstrapActions.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `BootstrapActions.ConfigureDaemons` | `newConfigureDaemons()` Create a new bootstrap action which lets you configure Hadoop's daemons.
    `BootstrapActions.ConfigureHadoop` | `newConfigureHadoop()` Create a new bootstrap action which lets you configure Hadoop's XML files.
    `BootstrapActionConfig` | `newRunIf(java.lang.String condition, BootstrapActionConfig config)` Create a new run-if bootstrap action which lets you conditionally run bootstrap actions.

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### BootstrapActions

          public BootstrapActions()

      Creates a new default BootstrapActions for us in us-east-1.

    - #### BootstrapActions

          public BootstrapActions(java.lang.String bucket)

      Creates a new BootstrapActions.
      パラメータ:
        `bucket` - the bucket from which to download the bootstrap actions.

  - ### メソッドの詳細

    - #### newRunIf

          public BootstrapActionConfig newRunIf(java.lang.String condition,
                                       BootstrapActionConfig config)

      Create a new run-if bootstrap action which lets you conditionally run bootstrap actions.
      パラメータ:
        `condition` - The condition to evaluate, if true the bootstrap action executes.
        `config` - The bootstrap action to execute in case of successful evaluation.
      戻り値:
        A BootstrapActionConfig to be provided when running a job flow.

    - #### newConfigureHadoop

          public BootstrapActions.ConfigureHadoop newConfigureHadoop()

      Create a new bootstrap action which lets you configure Hadoop's XML files.

    - #### newConfigureDaemons

          public BootstrapActions.ConfigureDaemons newConfigureDaemons()

      Create a new bootstrap action which lets you configure Hadoop's daemons. The options are written to the hadoop-user-env.sh file.