lib/elasticity/job_flow.rb in elasticity-6.0.1 vs lib/elasticity/job_flow.rb in elasticity-6.0.2

- old
+ new

@@ -11,10 +11,11 @@ attr_accessor :action_on_failure attr_accessor :ec2_key_name attr_accessor :name attr_accessor :instance_count attr_accessor :log_uri + attr_accessor :tags attr_accessor :master_instance_type attr_accessor :slave_instance_type attr_accessor :ami_version attr_accessor :keep_job_flow_alive_when_no_steps attr_accessor :ec2_subnet_id @@ -124,11 +125,11 @@ jobflow_steps = [] if jobflow_step.requires_installation? && !@installed_steps.include?(jobflow_step.class) jobflow_steps.concat(jobflow_step.aws_installation_steps) end jobflow_steps << jobflow_step.to_aws_step(self) - emr.add_jobflow_steps(@jobflow_id, {:steps => jobflow_steps}) + emr.add_jobflow_steps(@jobflow_id, jobflow_steps) else @jobflow_steps << jobflow_step end end @@ -184,13 +185,23 @@ config = jobflow_preamble steps = jobflow_steps steps.insert(0, Elasticity::SetupHadoopDebuggingStep.new.to_aws_step(self)) if @enable_debugging config[:steps] = steps config[:log_uri] = @log_uri if @log_uri + config[:tags] = jobflow_tags if @tags config[:job_flow_role] = @job_flow_role if @job_flow_role config[:service_role] = @service_role if @service_role config[:bootstrap_actions] = @bootstrap_actions.map{|a| a.to_aws_bootstrap_action} unless @bootstrap_actions.empty? config + end + + def jobflow_tags + @tags.map do |key, value| + { + key: key.to_s, + value: value + } + end end def jobflow_preamble preamble = { :name => @name,