colinsurprenant / redstorm

JRuby on Storm
Other
298 stars 56 forks source link

Expose SubmitOptions via a submit_options block (analogous to configure, etc) #104

Closed ismith closed 10 years ago

ismith commented 10 years ago

Allows for a topology to be submitted in inactive mode, e.g:

class MyTopology < RedStorm
  submit_options do |env|
    set_initial_status TopologyInitialStatus.valueOf('INACTIVE')
  end

  configure 'my_topology' do |env|
    debug true
    ...
  end
ismith commented 10 years ago

This is issue #98, just moved to a fresh branch/repo, and with a patch from @svrana so as not to apply SubmitOptions if the cluster is being run in local mode.

coveralls commented 10 years ago

Coverage Status

Coverage decreased (-0.26%) when pulling 9de8991f31d9da66beb3d49cd66ed04dea00a9ae on lookout:submit_options into af79df05facfa952e71521599cae0efafb3bc9d9 on colinsurprenant:master.

colinsurprenant commented 10 years ago

Great! I'd really like to add cleaner way to specify "inactive", either my providing constants to avoid TopologyInitialStatus.valueOf('INACTIVE'). maybe reuse/enhance the Configurator class? lets merge this, and I'll add a followup issue for it.