Class: Elasticity::ScaldingStep

Inherits:
Object
  • Object
show all
Includes:
JobFlowStep
Defined in:
lib/elasticity/scalding_step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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



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_failureObject

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

#argumentsObject

Returns the value of attribute arguments



10
11
12
# File 'lib/elasticity/scalding_step.rb', line 10

def arguments
  @arguments
end

#jarObject

Returns the value of attribute jar



9
10
11
# File 'lib/elasticity/scalding_step.rb', line 9

def jar
  @jar
end

#nameObject

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