Class: Wukong::Streamer::SetReducer
- Inherits:
-
ListReducer
- Object
- Base
- AccumulatingReducer
- ListReducer
- Wukong::Streamer::SetReducer
- Defined in:
- lib/wukong/streamer/set_reducer.rb
Overview
Emit each unique key and the count of its occurrences
Instance Attribute Summary
Attributes inherited from ListReducer
Attributes inherited from AccumulatingReducer
Attributes inherited from Base
Instance Method Summary collapse
-
#start!(*args) ⇒ Object
Begin with an empty set.
Methods inherited from ListReducer
Methods inherited from AccumulatingReducer
#accumulate, #after_stream, #before_stream, #finalize, #get_key, #process
Methods inherited from Base
#after_stream, #bad_record!, #before_stream, #each_record, #emit, #initialize, #mapper, mapper, #monitor, #options, #process, #recordize, #run, run, #stream, #track
Constructor Details
This class inherits a constructor from Wukong::Streamer::Base
Instance Method Details
#start!(*args) ⇒ Object
Begin with an empty set
9 10 11 |
# File 'lib/wukong/streamer/set_reducer.rb', line 9 def start! *args self.values = Set.new end |