Sha256: aa02c77aca714fa9ab701519dc972fd48156d0415cff42f14a5ac349a62cf53b

Contents?: true

Size: 1.12 KB

Versions: 8

Compression:

Stored size: 1.12 KB

Contents

describe Elasticity::StreamingStep do

  subject do
    Elasticity::StreamingStep.new('INPUT_BUCKET', 'OUTPUT_BUCKET', 'MAPPER', 'REDUCER')
  end

  it { should be_a Elasticity::JobFlowStep }

  its(:name) { should == 'Elasticity Streaming Step' }
  its(:action_on_failure) { should == 'TERMINATE_JOB_FLOW' }
  its(:input_bucket) { should == 'INPUT_BUCKET' }
  its(:output_bucket) { should == 'OUTPUT_BUCKET' }
  its(:mapper) { should == 'MAPPER' }
  its(:reducer) { should == 'REDUCER' }

  describe '#to_aws_step' do

    it 'should convert to aws step format' do
      subject.to_aws_step(Elasticity::JobFlow.new('_', '_')).should == {
        :name => 'Elasticity Streaming Step',
        :action_on_failure => 'TERMINATE_JOB_FLOW',
        :hadoop_jar_step => {
          :jar => '/home/hadoop/contrib/streaming/hadoop-streaming.jar',
          :args => %w(-input INPUT_BUCKET -output OUTPUT_BUCKET -mapper MAPPER -reducer REDUCER),
        },
      }
    end

  end

  describe '.requires_installation?' do
    it 'should not require installation' do
      Elasticity::StreamingStep.requires_installation?.should be_false
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
elasticity-2.5.3 spec/lib/elasticity/streaming_step_spec.rb
elasticity-2.5.2 spec/lib/elasticity/streaming_step_spec.rb
elasticity-2.5.1 spec/lib/elasticity/streaming_step_spec.rb
elasticity-2.5 spec/lib/elasticity/streaming_step_spec.rb
elasticity-2.4 spec/lib/elasticity/streaming_step_spec.rb
elasticity-2.3.1 spec/lib/elasticity/streaming_step_spec.rb
elasticity-2.3 spec/lib/elasticity/streaming_step_spec.rb
elasticity-2.2 spec/lib/elasticity/streaming_step_spec.rb