Sha256: 02619e9210cd03b57c23ef2c4efe8315206cdbef237ae50e6c61f5b1b9c15c46

Contents?: true

Size: 1.1 KB

Versions: 36

Compression:

Stored size: 1.1 KB

Contents

module Elasticity

  module JobFlowStep

    @@step_klasses = []

    def to_aws_step(jobflow_step)
      raise RuntimeError, '#to_aws_step is required to be defined on all job flow steps.'
    end

    def requires_installation?
      self.class.requires_installation?
    end

    def aws_installation_steps
      self.class.aws_installation_steps
    end

    def aws_installation_step_name
      self.class.aws_installation_step_name
    end

    module ClassMethods

      def requires_installation?
        false
      end

      def aws_installation_steps
        raise RuntimeError, '.aws_installation_step is required to be defined when a step requires installation (e.g. Pig, Hive).'
      end

      def aws_installation_step_name
        raise RuntimeError, '.aws_installation_step_name is required to be defined when a step requires installation (e.g. Pig, Hive).'
      end

    end

    def self.included(base)
      base.extend(ClassMethods)
      @@step_klasses << base
    end

    def self.steps_requiring_installation
      @@step_klasses.select{|klass| klass.requires_installation?}
    end

  end

end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
elasticity-6.0.14 lib/elasticity/job_flow_step.rb
elasticity-6.0.13 lib/elasticity/job_flow_step.rb
elasticity-6.0.12 lib/elasticity/job_flow_step.rb
elasticity-6.0.11 lib/elasticity/job_flow_step.rb
elasticity-6.0.10 lib/elasticity/job_flow_step.rb
elasticity-6.0.9 lib/elasticity/job_flow_step.rb
elasticity-6.0.8 lib/elasticity/job_flow_step.rb
elasticity-6.0.7 lib/elasticity/job_flow_step.rb
elasticity-6.0.6 lib/elasticity/job_flow_step.rb
elasticity-6.0.5 lib/elasticity/job_flow_step.rb
elasticity-6.0.4 lib/elasticity/job_flow_step.rb
elasticity-6.0.3 lib/elasticity/job_flow_step.rb
elasticity-6.0.2 lib/elasticity/job_flow_step.rb
elasticity-6.0.1 lib/elasticity/job_flow_step.rb
elasticity-6.0 lib/elasticity/job_flow_step.rb
elasticity-5.0.3 lib/elasticity/job_flow_step.rb
elasticity-5.0.2 lib/elasticity/job_flow_step.rb
elasticity-5.0.1 lib/elasticity/job_flow_step.rb
elasticity-4.0.5 lib/elasticity/job_flow_step.rb
elasticity-5.0 lib/elasticity/job_flow_step.rb