[Groonga-commit] droonga/fluent-plugin-droonga at e2270ad [master] WIP: add custom reducer and gatherer for CRUD operations

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Jan 24 14:15:56 JST 2014


YUKI Hiroshi	2014-01-24 14:15:56 +0900 (Fri, 24 Jan 2014)

  New Revision: e2270ad93b4d182af97e409c815934c3b2d18f44
  https://github.com/droonga/fluent-plugin-droonga/commit/e2270ad93b4d182af97e409c815934c3b2d18f44

  Message:
    WIP: add custom reducer and gatherer for CRUD operations

  Modified files:
    lib/droonga/plugin/distributor/crud.rb

  Modified: lib/droonga/plugin/distributor/crud.rb (+21 -0)
===================================================================
--- lib/droonga/plugin/distributor/crud.rb    2014-01-24 14:13:57 +0900 (704030c)
+++ lib/droonga/plugin/distributor/crud.rb    2014-01-24 14:15:56 +0900 (7f21aa5)
@@ -39,5 +39,26 @@ module Droonga
       key = message["body"]["key"] || rand.to_s
       scatter_all(message, key)
     end
+
+=begin
+    private
+    def reducer(message)
+      reducer = super
+      reducer["body"]
+      reducer["inputs"] << "result"
+      reducer["outputs"] << "result_reduced"
+      reducer
+    end
+
+    def gatherer(message)
+      gatherer = super
+      gatherer["body"]["result_reduced"] = {
+        "output" => "result",
+        "elements" => {},
+      }
+      gatherer["inputs"] << "result_reduced"
+      gatherer
+    end
   end
+=end
 end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index