Class: BatchCommitterBolt

Inherits:
Object
  • Object
show all
Defined in:
lib/red_storm/proxy/batch_committer_bolt.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_class_path, real_bolt_class_name) ⇒ BatchCommitterBolt

Returns a new instance of BatchCommitterBolt.



21
22
23
24
25
26
# File 'lib/red_storm/proxy/batch_committer_bolt.rb', line 21

def initialize(base_class_path, real_bolt_class_name)
  @real_bolt = Object.module_eval(real_bolt_class_name).new
rescue NameError
  require base_class_path
  @real_bolt = Object.module_eval(real_bolt_class_name).new
end

Instance Method Details

#declareOutputFields(declarer) ⇒ Object



44
45
46
# File 'lib/red_storm/proxy/batch_committer_bolt.rb', line 44

def declareOutputFields(declarer)
  @real_bolt.declare_output_fields(declarer)
end

#execute(tuple) ⇒ Object



34
35
36
# File 'lib/red_storm/proxy/batch_committer_bolt.rb', line 34

def execute(tuple)
  @real_bolt.execute(tuple)
end

#finishBatchObject



39
40
41
# File 'lib/red_storm/proxy/batch_committer_bolt.rb', line 39

def finishBatch
  @real_bolt.finish_batch if @real_bolt.respond_to?(:finish_batch)
end

#getComponentConfigurationObject



49
50
51
# File 'lib/red_storm/proxy/batch_committer_bolt.rb', line 49

def getComponentConfiguration
  @real_bolt.get_component_configuration
end

#prepare(conf, context, collector, id) ⇒ Object



29
30
31
# File 'lib/red_storm/proxy/batch_committer_bolt.rb', line 29

def prepare(conf, context, collector, id)
  @real_bolt.prepare(conf, context, collector, id)
end