[Groonga-commit] droonga/fluent-plugin-droonga at 859fd39 [master] Reduce response of "add" command correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Jan 24 17:02:15 JST 2014


YUKI Hiroshi	2014-01-24 17:02:15 +0900 (Fri, 24 Jan 2014)

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

  Message:
    Reduce response of "add" command correctly

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

  Modified: lib/droonga/distributor_plugin.rb (+2 -0)
===================================================================
--- lib/droonga/distributor_plugin.rb    2014-01-24 15:59:03 +0900 (dd40814)
+++ lib/droonga/distributor_plugin.rb    2014-01-24 17:02:15 +0900 (1f24c41)
@@ -56,6 +56,7 @@ module Droonga
         "body"=> message["body"],
         "key"=> key,
         "type"=> "scatter",
+        "outputs"=>[],
         "replica"=> "all",
         "post"=> true
       }
@@ -67,6 +68,7 @@ module Droonga
         "dataset"=> message["dataset"],
         "body"=> message["body"],
         "type"=> "broadcast",
+        "outputs"=>[],
         "replica"=> "all",
         "post"=> true
       }

  Modified: lib/droonga/plugin/distributor/crud.rb (+13 -10)
===================================================================
--- lib/droonga/plugin/distributor/crud.rb    2014-01-24 15:59:03 +0900 (857d497)
+++ lib/droonga/plugin/distributor/crud.rb    2014-01-24 17:02:15 +0900 (00b838d)
@@ -40,29 +40,32 @@ module Droonga
       scatter_all(message, key)
     end
 
-=begin
     private
+    def scatterer(message, key)
+      scatterer = super
+      scatterer["outputs"] << "success"
+      scatterer
+    end
+
     def reducer(message)
       reducer = super
-      reducer["body"]["result"] = {
-        "result_reduced" => {
+      reducer["body"]["success"] = {
+        "success_reduced" => {
           "type" => "and",
         },
       }
-      reducer["inputs"] << "result"
-      reducer["outputs"] << "result_reduced"
+      reducer["inputs"] << "success"
+      reducer["outputs"] << "success_reduced"
       reducer
     end
 
     def gatherer(message)
       gatherer = super
-      gatherer["body"]["result_reduced"] = {
-        "output" => "result",
-        "elements" => {},
+      gatherer["body"]["success_reduced"] = {
+        "output" => "success",
       }
-      gatherer["inputs"] << "result_reduced"
+      gatherer["inputs"] << "success_reduced"
       gatherer
     end
-=end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



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