[Groonga-commit] groonga/fluent-plugin-groonga at 3f370dd [master] Use "records" instead of "values"

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Oct 20 14:53:41 JST 2014


Kouhei Sutou	2014-10-20 14:53:41 +0900 (Mon, 20 Oct 2014)

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

  Message:
    Use "records" instead of "values"
    
    Because they are records in Groonga.

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

  Modified: lib/fluent/plugin/out_groonga.rb (+9 -9)
===================================================================
--- lib/fluent/plugin/out_groonga.rb    2014-10-20 14:26:50 +0900 (c57dc94)
+++ lib/fluent/plugin/out_groonga.rb    2014-10-20 14:53:41 +0900 (48f5a32)
@@ -82,21 +82,21 @@ module Fluent
       end
 
       def emit(chunk)
-        values = []
+        records = []
         chunk.msgpack_each do |message|
           tag, _, record = message
           if /\Agroonga\.command\./ =~ tag
             name = $POSTMATCH
-            unless values.empty?
-              store_values(values)
-              values.clear
+            unless records.empty?
+              store_records(records)
+              records.clear
             end
-            send_command(name, record)
+            @client.send(name, record)
           else
-            values << record
+            records << record
           end
         end
-        store_values(values) unless values.empty?
+        store_records(records) unless records.empty?
       end
 
       private
@@ -106,12 +106,12 @@ module Fluent
         @client.send(command)
       end
 
-      def store_values(values)
+      def store_records(records)
         return if****@table*****?
 
         arguments = {
           "table" => @table,
-          "values" => Yajl::Encoder.encode(values),
+          "values" => Yajl::Encoder.encode(records),
         }
         send_command("load", arguments)
       end
-------------- next part --------------
HTML����������������������������...
Descargar 



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