[Groonga-commit] droonga/droonga-engine at 6b57ef4 [master] Move depending method the to correct location

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri May 9 12:39:15 JST 2014


YUKI Hiroshi	2014-05-09 12:39:15 +0900 (Fri, 09 May 2014)

  New Revision: 6b57ef4f4512ed7854f4c4a8d85ecabac6ac8601
  https://github.com/droonga/droonga-engine/commit/6b57ef4f4512ed7854f4c4a8d85ecabac6ac8601

  Message:
    Move depending method the to correct location

  Modified files:
    lib/droonga/catalog/version1.rb

  Modified: lib/droonga/catalog/version1.rb (+14 -14)
===================================================================
--- lib/droonga/catalog/version1.rb    2014-05-09 12:37:32 +0900 (d1a1103)
+++ lib/droonga/catalog/version1.rb    2014-05-09 12:39:15 +0900 (f1c858b)
@@ -66,20 +66,6 @@ module Droonga
         return results
       end
 
-      def select_range_and_replicas(partition, args, routes)
-        date_range = args["date_range"] || 0..-1
-        partition["partitions"].sort[date_range].each do |time, replicas|
-          case args["replica"]
-          when "top"
-            routes << replicas[0]
-          when "random"
-            routes << replicas[rand(replicas.size)]
-          when "all"
-            routes.concat(replicas)
-          end
-        end
-      end
-
       def all_nodes
         nodes = @data["zones"].collect do |zone|
           zone.split("/").first
@@ -429,6 +415,20 @@ module Droonga
           end
           return continuum[max][1]
         end
+
+        def select_range_and_replicas(partition, args, routes)
+          date_range = args["date_range"] || 0..-1
+          partition["partitions"].sort[date_range].each do |time, replicas|
+            case args["replica"]
+            when "top"
+              routes << replicas[0]
+            when "random"
+              routes << replicas[rand(replicas.size)]
+            when "all"
+              routes.concat(replicas)
+            end
+          end
+        end
       end
     end
   end
-------------- next part --------------
HTML����������������������������...
Download 



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