[Groonga-commit] groonga/fluent-plugin-groonga at c9d7ca3 [master] Use "execute" instead of "send"

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Oct 20 16:32:48 JST 2014


Kouhei Sutou	2014-10-20 16:32:48 +0900 (Mon, 20 Oct 2014)

  New Revision: c9d7ca39875509a738af6a1fce364ae8cd6b9c19
  https://github.com/groonga/fluent-plugin-groonga/commit/c9d7ca39875509a738af6a1fce364ae8cd6b9c19

  Message:
    Use "execute" instead of "send"
    
    Because "send" is implementation detail. We just want to execute a
    command.

  Modified files:
    lib/fluent/plugin/out_groonga.rb

  Modified: lib/fluent/plugin/out_groonga.rb (+14 -14)
===================================================================
--- lib/fluent/plugin/out_groonga.rb    2014-10-20 16:31:19 +0900 (7c2e334)
+++ lib/fluent/plugin/out_groonga.rb    2014-10-20 16:32:48 +0900 (5c8be7c)
@@ -113,7 +113,7 @@ module Fluent
       def ensure_table
         return if @table
 
-        table_list =****@clien*****("table_list")
+        table_list =****@clien*****("table_list")
         target_table = table_list.find do |table|
           table.name == @table_name
         end
@@ -121,9 +121,9 @@ module Fluent
           @table = Table.new(@table_name, target_table.domain)
         else
           # TODO: Check response
-          @client.send("table_create",
-                       "name"  => @table_name,
-                       "flags" => "TABLE_NO_KEY")
+          @client.execute("table_create",
+                          "name"  => @table_name,
+                          "flags" => "TABLE_NO_KEY")
           @table = Table.new(@table_name, nil)
         end
       end
@@ -131,7 +131,7 @@ module Fluent
       def ensure_columns
         return if @columns
 
-        column_list =****@clien*****("column_list", "table" => @table_name)
+        column_list =****@clien*****("column_list", "table" => @table_name)
         @columns = {}
         column_list.each do |column|
           vector_p = column.flags.split("|").include?("COLUMN_VECTOR")
@@ -151,11 +151,11 @@ module Fluent
           flags = "COLUMN_SCALAR"
         end
         # TODO: Check response
-        @client.send("column_create",
-                     "table" => @table_name,
-                     "name" => name,
-                     "flags" => flags,
-                     "type" => value_type)
+        @client.execute("column_create",
+                        "table" => @table_name,
+                        "name" => name,
+                        "flags" => flags,
+                        "type" => value_type)
         @columns[name] = Column.new(name, value_type, vector_p)
       end
 
@@ -265,7 +265,7 @@ module Fluent
               store_records(records)
               records.clear
             end
-            @client.send(name, record)
+            @client.execute(name, record)
           else
             records << record
           end
@@ -283,7 +283,7 @@ module Fluent
           "table" => @table,
           "values" => Yajl::Encoder.encode(records),
         }
-        @client.send("load", arguments)
+        @client.execute("load", arguments)
       end
     end
 
@@ -315,7 +315,7 @@ module Fluent
         @client.close
       end
 
-      def send(name, arguments={})
+      def execute(name, arguments={})
         command = build_command(name, arguments)
         @client ||= Groonga::Client.new(:protocol => @protocol,
                                         :host     => @host,
@@ -354,7 +354,7 @@ module Fluent
         Process.waitpid(@pid)
       end
 
-      def send(name, arguments={})
+      def execute(name, arguments={})
         command = build_command(name, arguments)
         body = nil
         if command.name == "load"
-------------- next part --------------
HTML����������������������������...
Descargar 



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