Class: HadoopDsl::BaseReducer
- Inherits:
-
BaseMapRed
- Object
- BaseMapRed
- HadoopDsl::BaseReducer
- Defined in:
- lib/core.rb
Direct Known Subclasses
HiveLike::HiveLikeReducer, LogAnalysis::LogAnalysisReducer, WordCount::WordCountReducer
Instance Attribute Summary
Attributes inherited from BaseMapRed
Instance Method Summary collapse
-
#aggregate ⇒ Object
common functions.
- #identity ⇒ Object
Methods inherited from BaseMapRed
Methods included from DslController
Methods included from DslElement
Constructor Details
This class inherits a constructor from HadoopDsl::BaseMapRed
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class HadoopDsl::DslElement
Instance Method Details
#aggregate ⇒ Object
common functions
73 74 75 |
# File 'lib/core.rb', line 73 def aggregate emit(@model.key => @model.values.inject {|ret, i| ret + i}) end |
#identity ⇒ Object
77 78 79 |
# File 'lib/core.rb', line 77 def identity @model.values.each {|v| emit(@model.key => v)} end |