Class: HadoopDsl::WordCount::WordCountReducer
- Inherits:
-
BaseReducer
- Object
- BaseMapRed
- BaseReducer
- HadoopDsl::WordCount::WordCountReducer
- Defined in:
- lib/word_count.rb
Instance Attribute Summary
Attributes inherited from BaseMapRed
Instance Method Summary collapse
-
#count_uniq ⇒ Object
emitters.
-
#initialize(script, key, values) ⇒ WordCountReducer
constructor
A new instance of WordCountReducer.
- #total(*types) ⇒ Object
Methods inherited from BaseReducer
Methods inherited from BaseMapRed
Methods included from DslController
Methods included from DslElement
Constructor Details
#initialize(script, key, values) ⇒ WordCountReducer
Returns a new instance of WordCountReducer.
37 38 39 |
# File 'lib/word_count.rb', line 37 def initialize(script, key, values) super(script, WordCountReducerModel.new(key, values)) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class HadoopDsl::DslElement
Instance Method Details
#count_uniq ⇒ Object
emitters
45 |
# File 'lib/word_count.rb', line 45 def count_uniq; aggregate unless @model.total_value? end |
#total(*types) ⇒ Object
46 |
# File 'lib/word_count.rb', line 46 def total(*types); aggregate if @model.total_value? end |