Sha256: 0fea112f82ff56fb56533063f8c00430fd8a8a867393fbd694d3cf29ea63ce70
Contents?: true
Size: 1005 Bytes
Versions: 34
Compression:
Stored size: 1005 Bytes
Contents
module Elasticity class StreamingStep include Elasticity::JobFlowStep attr_accessor :name attr_accessor :action_on_failure attr_accessor :input_bucket attr_accessor :output_bucket attr_accessor :mapper attr_accessor :reducer attr_accessor :arguments def initialize(input_bucket, output_bucket, mapper, reducer, *arguments) @name = 'Elasticity Streaming Step' @action_on_failure = 'TERMINATE_JOB_FLOW' @input_bucket = input_bucket @output_bucket = output_bucket @mapper = mapper @reducer = reducer @arguments = arguments || [] end def to_aws_step(job_flow) step = Elasticity::CustomJarStep.new('/home/hadoop/contrib/streaming/hadoop-streaming.jar') step.name = @name step.action_on_failure = @action_on_failure step.arguments = ['-input', @input_bucket, '-output', @output_bucket, '-mapper', @mapper, '-reducer', @reducer] + @arguments step.to_aws_step(job_flow) end end end
Version data entries
34 entries across 34 versions & 1 rubygems