Sha256: 40f850321e019f2bccef32e6884eb4570222f9051f32e24d0c6fcf59afb447ba

Contents?: true

Size: 1.28 KB

Versions: 1

Compression:

Stored size: 1.28 KB

Contents

RFlow::Configuration::RubyDSL.configure do |config|
  config.setting('rflow.log_level', 'DEBUG')
  config.setting('rflow.application_directory_path', '.')
  config.setting('rflow.application_name', 'shardapp')

  # Instantiate components
  config.shard 's1', :process => 1 do |shard|
    shard.component 'generate_ints1', 'RFlow::Components::GenerateIntegerSequence', 'start' => 0, 'finish' => 10, 'step' => 3
  end

  config.shard 's2', :type => :process, :count => 2 do |shard|
    shard.component 'generate_ints2', 'RFlow::Components::GenerateIntegerSequence', 'start' => 20, 'finish' => 30
  end

  config.component 'filter', 'RFlow::Components::RubyProcFilter', 'filter_proc_string' => 'lambda {|message| true}'
  config.component 'replicate', 'RFlow::Components::Replicate'

  config.shard 's3', :process => 2 do |shard|
    shard.component 'output1', 'RFlow::Components::FileOutput', 'output_file_path' => 'out1'
    shard.component 'output2', 'RFlow::Components::FileOutput', 'output_file_path' => 'out2'
  end

  # Hook components together
  config.connect 'generate_ints1#out' => 'filter#in'
  config.connect 'generate_ints2#out' => 'filter#in'
  config.connect 'filter#filtered' => 'replicate#in'
  config.connect 'replicate#out' => 'output1#in'
  config.connect 'replicate#out' => 'output2#in'

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rflow-1.0.0a1 spec/fixtures/config_shards.rb