lib/emr/right_emr_interface.rb
# Creates and starts running a new job flow.
#
# The job flow will run the steps specified and terminate (unless
# keep alive option is set).
#
# A maximum of 256 steps are allowed in a job flow.
#
# At least the name, instance types, instance count and one step
# must be specified.
#
#  # simple usage:
#  emr.run_job_flow(
#    :name => 'job flow 1',
#    :master_instance_type => 'm1.large',
#    :slave_instance_type => 'm1.large',
#    :instance_count => 5,
#    :log_uri => 's3n://bucket/path/to/logs',
#    :steps => [{
#      :name => 'step 1',
#      :jar => 's3n://bucket/path/to/code.jar',
#      :main_class => 'com.foobar.emr.Step1',
#      :args => ['arg', 'arg'],
#    }]) #=> "j-9K18HM82Q0AE7"
#
#  # advanced usage:
#  emr.run_job_flow(
#    :name => 'job flow 1',
#    :ec2_key_name => 'gsg-keypair',
#    :hadoop_version => '0.20',
#    :instance_groups => [{
#      :bid_price => '0.1',
#      :instance_count => '1',
#      :instance_role => 'MASTER',
#      :instance_type => 'm1.small',
#      :market => 'SPOT',
#      :name => 'master group',
#    }, {
#      :bid_price => '0.1',
#      :instance_count => '2',
#      :instance_role => 'CORE',
#      :instance_type => 'm1.small',
#      :market => 'SPOT',
#      :name => 'core group',
#    }, {
#      :bid_price => '0.1',
#      :instance_count => '2',
#      :instance_role => 'TASK',
#      :instance_type => 'm1.small',
#      :market => 'SPOT',
#      :name => 'task group',
#    }],
#    :keep_job_flow_alive_when_no_steps => true,
#    :availability_zone => 'us-east-1a',
#    :termination_protected => true,
#    :log_uri => 's3n://bucket/path/to/logs',
#    :steps => [{
#      :name => 'step 1',
#      :jar => 's3n://bucket/path/to/code.jar',
#      :main_class => 'com.foobar.emr.Step1',
#      :args => ['arg', 'arg'],
#      :properties => {
#        'property' => 'value',
#      },
#      :action_on_failure => 'TERMINATE_JOB_FLOW',
#    }],
#    :additional_info => '',
#    :bootstrap_actions => [{
#      :name => 'bootstrap action 1',
#      :path => 's3n://bucket/path/to/bootstrap',
#      :args => ['hello', 'world'],
#    }],
#  ) #=> "j-9K18HM82Q0AE7"
#
Creates and starts running a new job flow.
The job flow will run the steps specified and terminate (unless
keep alive option is set).

A maximum of 256 steps are allowed in a job flow.

At least the name, instance types, instance count and one step
must be specified.




Creates and starts running a new job flow . The job flow will run the steps specified and terminate ( unless keep alive option is set ) . A maximum of 256 steps are allowed in a job flow . At least the name instance types instance count and one step must be specified .
def run_job_flow(options={})
      request_hash = amazonize_run_job_flow(options)
      request_hash.update(amazonize_bootstrap_actions(options[:bootstrap_actions]))
      request_hash.update(amazonize_instance_groups(options[:instance_groups]))
      request_hash.update(amazonize_steps(options[:steps]))
      link = generate_request("RunJobFlow", request_hash)
      request_info(link, RunJobFlowParser.new(:logger => @logger))
    rescue
      on_exception
    end
def run_job_flow ( options = { } ) request_hash = amazonize_run_job_flow ( options ) request_hash . update ( amazonize_bootstrap_actions ( options [ :bootstrap_actions ] ) ) request_hash . update ( amazonize_instance_groups ( options [ :instance_groups ] ) ) request_hash . update ( amazonize_steps ( options [ :steps ] ) ) link = generate_request ( "RunJobFlow" , request_hash ) request_info ( link , RunJobFlowParser . new ( :logger => @logger ) ) rescue on_exception end
Creates and starts running a new job flow.
Creates and starts running a new job flow .
options
<not_specific>