Sha256: 13bac30f4456e9dadfcc637dbce6492b44de791d979cd640d5a5c44c9bf96f14

Contents?: true

Size: 638 Bytes

Versions: 4

Compression:

Stored size: 638 Bytes

Contents

module Elasticity

  class CustomJarStep

    include JobFlowStep

    attr_accessor :name
    attr_accessor :jar
    attr_accessor :arguments
    attr_accessor :action_on_failure

    def initialize(jar)
      @name = 'Elasticity Custom Jar Step'
      @jar = jar
      @arguments = []
      @action_on_failure = 'TERMINATE_JOB_FLOW'
    end

    def to_aws_step(job_flow)
      step = {
        :action_on_failure => @action_on_failure,
        :hadoop_jar_step => {
          :jar => @jar
        },
        :name => @name
      }
      step[:hadoop_jar_step][:args] = @arguments unless @arguments.empty?
      step
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
elasticity-2.3 lib/elasticity/custom_jar_step.rb
elasticity-2.2 lib/elasticity/custom_jar_step.rb
elasticity-2.1.1 lib/elasticity/custom_jar_step.rb
elasticity-2.1 lib/elasticity/custom_jar_step.rb