Class: Elasticity::SimpleJob
- Inherits:
-
Object
- Object
- Elasticity::SimpleJob
- Defined in:
- lib/elasticity/simple_job.rb
Instance Attribute Summary collapse
-
#action_on_failure ⇒ Object
Returns the value of attribute action_on_failure.
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#ec2_key_name ⇒ Object
Returns the value of attribute ec2_key_name.
-
#hadoop_version ⇒ Object
Returns the value of attribute hadoop_version.
-
#instance_count ⇒ Object
Returns the value of attribute instance_count.
-
#log_uri ⇒ Object
Returns the value of attribute log_uri.
-
#master_instance_type ⇒ Object
Returns the value of attribute master_instance_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#slave_instance_type ⇒ Object
Returns the value of attribute slave_instance_type.
Instance Method Summary collapse
- #add_hadoop_bootstrap_action(option, value) ⇒ Object
-
#initialize(aws_access_key_id, aws_secret_access_key) ⇒ SimpleJob
constructor
A new instance of SimpleJob.
Constructor Details
#initialize(aws_access_key_id, aws_secret_access_key) ⇒ SimpleJob
Returns a new instance of SimpleJob.
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/elasticity/simple_job.rb', line 16 def initialize(aws_access_key_id, aws_secret_access_key) @action_on_failure = "TERMINATE_JOB_FLOW" @aws_access_key_id = aws_access_key_id @aws_secret_access_key = aws_secret_access_key @ec2_key_name = "default" @hadoop_version = "0.20" @instance_count = 2 @master_instance_type = "m1.small" @name = "Elasticity Job" @slave_instance_type = "m1.small" @emr = Elasticity::EMR.new(aws_access_key_id, aws_secret_access_key) end |
Instance Attribute Details
#action_on_failure ⇒ Object
Returns the value of attribute action_on_failure.
5 6 7 |
# File 'lib/elasticity/simple_job.rb', line 5 def action_on_failure @action_on_failure end |
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
6 7 8 |
# File 'lib/elasticity/simple_job.rb', line 6 def aws_access_key_id @aws_access_key_id end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
7 8 9 |
# File 'lib/elasticity/simple_job.rb', line 7 def aws_secret_access_key @aws_secret_access_key end |
#ec2_key_name ⇒ Object
Returns the value of attribute ec2_key_name.
8 9 10 |
# File 'lib/elasticity/simple_job.rb', line 8 def ec2_key_name @ec2_key_name end |
#hadoop_version ⇒ Object
Returns the value of attribute hadoop_version.
10 11 12 |
# File 'lib/elasticity/simple_job.rb', line 10 def hadoop_version @hadoop_version end |
#instance_count ⇒ Object
Returns the value of attribute instance_count.
11 12 13 |
# File 'lib/elasticity/simple_job.rb', line 11 def instance_count @instance_count end |
#log_uri ⇒ Object
Returns the value of attribute log_uri.
12 13 14 |
# File 'lib/elasticity/simple_job.rb', line 12 def log_uri @log_uri end |
#master_instance_type ⇒ Object
Returns the value of attribute master_instance_type.
13 14 15 |
# File 'lib/elasticity/simple_job.rb', line 13 def master_instance_type @master_instance_type end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/elasticity/simple_job.rb', line 9 def name @name end |
#slave_instance_type ⇒ Object
Returns the value of attribute slave_instance_type.
14 15 16 |
# File 'lib/elasticity/simple_job.rb', line 14 def slave_instance_type @slave_instance_type end |
Instance Method Details
#add_hadoop_bootstrap_action(option, value) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/elasticity/simple_job.rb', line 30 def add_hadoop_bootstrap_action(option, value) @hadoop_actions ||= [] @hadoop_actions << { :name => "Elasticity Bootstrap Action (Configure Hadoop)", :script_bootstrap_action => { :path => "s3n://elasticmapreduce/bootstrap-actions/configure-hadoop", :args => [option, value] } } end |