[Groonga-commit] droonga/fluent-plugin-droonga at d927940 [master] Put internal methods under "private" space

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Jan 29 19:35:30 JST 2014


YUKI Hiroshi	2014-01-29 19:35:30 +0900 (Wed, 29 Jan 2014)

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

  Message:
    Put internal methods under "private" space

  Modified files:
    lib/droonga/distributed_command_planner.rb

  Modified: lib/droonga/distributed_command_planner.rb (+31 -31)
===================================================================
--- lib/droonga/distributed_command_planner.rb    2014-01-29 19:33:42 +0900 (38781ff)
+++ lib/droonga/distributed_command_planner.rb    2014-01-29 19:35:30 +0900 (33eaf6d)
@@ -38,37 +38,6 @@ module Droonga
       unified_reducers + unified_gatherers + @processors
     end
 
-    def unified_reducers
-      unified_reducers = {}
-      @reducers.each do |reducer|
-        type = reducer["type"]
-        unified = unified_reducers[type]
-        if unified
-          unified["body"] = unified["body"].merge(reducer["body"])
-          unified["inputs"] = unified["inputs"] + reducer["inputs"]
-          unified["outputs"] = unified["outputs"] + reducer["outputs"]
-        else
-          unified_reducers[type] = Marshal.load(Marshal.dump(reducer))
-        end
-      end
-      unified_reducers.values
-    end
-
-    def unified_gatherers
-      unified_gatherers = {}
-      @gatherers.each do |gatherer|
-        type = gatherer["type"]
-        unified = unified_gatherers[type]
-        if unified
-          unified["body"] = unified["body"].merge(gatherer["body"])
-          unified["inputs"] = unified["inputs"] + gatherer["inputs"]
-        else
-          unified_gatherers[type] = Marshal.load(Marshal.dump(gatherer))
-        end
-      end
-      unified_gatherers.values
-    end
-
     def reduce(name, reducer)
       @reducers << reducer_message("reduce", name, reducer)
       @gatherers << gatherer_message("gather", name)
@@ -112,6 +81,37 @@ module Droonga
     end
 
     private
+    def unified_reducers
+      unified_reducers = {}
+      @reducers.each do |reducer|
+        type = reducer["type"]
+        unified = unified_reducers[type]
+        if unified
+          unified["body"] = unified["body"].merge(reducer["body"])
+          unified["inputs"] = unified["inputs"] + reducer["inputs"]
+          unified["outputs"] = unified["outputs"] + reducer["outputs"]
+        else
+          unified_reducers[type] = Marshal.load(Marshal.dump(reducer))
+        end
+      end
+      unified_reducers.values
+    end
+
+    def unified_gatherers
+      unified_gatherers = {}
+      @gatherers.each do |gatherer|
+        type = gatherer["type"]
+        unified = unified_gatherers[type]
+        if unified
+          unified["body"] = unified["body"].merge(gatherer["body"])
+          unified["inputs"] = unified["inputs"] + gatherer["inputs"]
+        else
+          unified_gatherers[type] = Marshal.load(Marshal.dump(gatherer))
+        end
+      end
+      unified_gatherers.values
+    end
+
     def reducer_message(command, name, reducer)
       {
         "type"    => command,
-------------- next part --------------
HTML����������������������������...
Download 



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