Class: Elasticity::ScaldingStep
- Inherits:
-
Object
- Object
- Elasticity::ScaldingStep
- Includes:
- JobFlowStep
- Defined in:
- lib/elasticity/scalding_step.rb
Instance Attribute Summary collapse
-
#action_on_failure ⇒ Object
Returns the value of attribute action_on_failure.
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#jar ⇒ Object
Returns the value of attribute jar.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(jar, main_class, args) ⇒ ScaldingStep
constructor
A new instance of ScaldingStep.
- #to_aws_step(job_flow) ⇒ Object
Methods included from JobFlowStep
#aws_installation_step_name, #aws_installation_steps, included, #requires_installation?, steps_requiring_installation
Constructor Details
#initialize(jar, main_class, args) ⇒ ScaldingStep
Returns a new instance of ScaldingStep.
12 13 14 15 16 17 18 19 20 |
# File 'lib/elasticity/scalding_step.rb', line 12 def initialize(jar, main_class, args) @name = 'Elasticity Scalding Step' @action_on_failure = 'TERMINATE_JOB_FLOW' @jar = jar @arguments = [ main_class, '--hdfs' ] args.each do |arg, value| @arguments << "--#{arg}" << value end end |
Instance Attribute Details
#action_on_failure ⇒ Object
Returns the value of attribute action_on_failure.
8 9 10 |
# File 'lib/elasticity/scalding_step.rb', line 8 def action_on_failure @action_on_failure end |
#arguments ⇒ Object
Returns the value of attribute arguments.
10 11 12 |
# File 'lib/elasticity/scalding_step.rb', line 10 def arguments @arguments end |
#jar ⇒ Object
Returns the value of attribute jar.
9 10 11 |
# File 'lib/elasticity/scalding_step.rb', line 9 def jar @jar end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/elasticity/scalding_step.rb', line 7 def name @name end |
Instance Method Details
#to_aws_step(job_flow) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/elasticity/scalding_step.rb', line 22 def to_aws_step(job_flow) step = Elasticity::CustomJarStep.new(@jar) step.name = @name step.action_on_failure = @action_on_failure step.arguments = @arguments step.to_aws_step(job_flow) end |