Sha256: f19fe603e9c940cd8fcf4820c553fdac8280958694b62ce4410e9e259e15e958

Contents?: true

Size: 1.28 KB

Versions: 2

Compression:

Stored size: 1.28 KB

Contents

RFlow::Configuration::RubyDSL.configure do |config|
  config.setting('rflow.log_level', 'FATAL')
  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

2 entries across 2 versions & 1 rubygems

Version Path
rflow-1.0.0a3 spec/fixtures/config_shards.rb
rflow-1.0.0a2 spec/fixtures/config_shards.rb