Sha256: 36cc9ca2445f8c708dbc54e0cf0f70e68ef39b7d0a01b8cd55e12cd57d55f024
Contents?: true
Size: 903 Bytes
Versions: 2
Compression:
Stored size: 903 Bytes
Contents
module Elasticity class StreamingStep include JobFlowStep attr_accessor :name attr_accessor :action_on_failure attr_accessor :input_bucket attr_accessor :output_bucket attr_accessor :mapper attr_accessor :reducer def initialize(input_bucket, output_bucket, mapper, reducer) @name = 'Elasticity Streaming Step' @action_on_failure = 'TERMINATE_JOB_FLOW' @input_bucket = input_bucket @output_bucket = output_bucket @mapper = mapper @reducer = reducer 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] step.to_aws_step(job_flow) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
elasticity-2.3 | lib/elasticity/streaming_step.rb |
elasticity-2.2 | lib/elasticity/streaming_step.rb |