DSL で MapReduce の定義を書いて、Mapper や Reducer 単体テストを RSpec で書けると便利だと思う。
Created
March 13, 2013 14:28
-
-
Save anonymous/5152652 to your computer and use it in GitHub Desktop.
MongoDB の MapReduce を Ruby の DSL で書くアイディア
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
collection 'activities' | |
query {'time': {'$gte': '2013-01-01', '$lt': '2013-02-01'}} | |
out {'merge': 'activities_mr_result'} | |
@@ map | |
function () { | |
// Mapper | |
} | |
@@ reduce | |
function (key, values) { | |
// Reducer | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment