Class: Wukong::Streamer::SetReducer

Inherits:
ListReducer show all
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

#values

Attributes inherited from AccumulatingReducer

#key

Attributes inherited from Base

#own_options

Instance Method Summary collapse

Methods inherited from ListReducer

#accumulate, #finalize

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