[Groonga-commit] droonga/droonga-engine at 33f52b0 [master] Use the term "metadata" isntead of "status" for remote commands

Zurück zum Archiv-Index

YUKI Hiroshi null+****@clear*****
Thu Dec 25 15:17:46 JST 2014


YUKI Hiroshi	2014-12-25 15:17:46 +0900 (Thu, 25 Dec 2014)

  New Revision: 33f52b017ff0844d7e4e8f3417650d3df820ba0b
  https://github.com/droonga/droonga-engine/commit/33f52b017ff0844d7e4e8f3417650d3df820ba0b

  Message:
    Use the term "metadata" isntead of "status" for remote commands

  Modified files:
    bin/droonga-engine-absorb-data
    bin/droonga-engine-join
    lib/droonga/command/remote.rb
    lib/droonga/command/serf_event_handler.rb

  Modified: bin/droonga-engine-absorb-data (+4 -4)
===================================================================
--- bin/droonga-engine-absorb-data    2014-12-25 15:14:16 +0900 (aa73f53)
+++ bin/droonga-engine-absorb-data    2014-12-25 15:17:46 +0900 (49e4783)
@@ -168,7 +168,7 @@ class AbsorbDataCommand
     last_progress = ""
     while true
       sleep(3)
-      response = run_remote_command(destination_node, "report_status",
+      response = run_remote_command(destination_node, "report_metadata",
                                     "node" => destination_node,
                                     "key" => "absorbing")
       if response
@@ -185,14 +185,14 @@ class AbsorbDataCommand
     end
     puts ""
 
-    response = run_remote_command(source_node, "report_status",
+    response = run_remote_command(source_node, "report_metadata",
                                   "node" => source_node,
                                   "key" => "last_processed_message_timestamp")
     timestamp = response["value"]
     if timestamp and not timestamp.empty?
       puts "The timestamp of the last processed message in the source node: #{timestamp}"
       puts "Setting effective message timestamp for the destination node..."
-      response = run_remote_command(destination_node, "set_status",
+      response = run_remote_command(destination_node, "set_metadata",
                                     "node" => destination_node,
                                     "key" => "effective_message_timestamp",
                                     "value" => timestamp)
@@ -211,7 +211,7 @@ class AbsorbDataCommand
       printf("%s", "#{progress}\r")
       last_progress = progress
     end
-    response = run_remote_command(source_node, "report_status",
+    response = run_remote_command(source_node, "report_metadata",
                                   "node" => source_node,
                                   "key" => "last_processed_message_timestamp")
     timestamp = response["value"]

  Modified: bin/droonga-engine-join (+3 -3)
===================================================================
--- bin/droonga-engine-join    2014-12-25 15:14:16 +0900 (fe30785)
+++ bin/droonga-engine-join    2014-12-25 15:17:46 +0900 (4547634)
@@ -189,7 +189,7 @@ class JoinCommand
     last_progress = ""
     while true
       sleep(3)
-      response = run_remote_command(joining_node, "report_status",
+      response = run_remote_command(joining_node, "report_metadata",
                                     "node" => joining_node,
                                     "key"  => "absorbing")
       if response
@@ -208,14 +208,14 @@ class JoinCommand
   end
 
   def set_effective_message_timestamp
-    response = run_remote_command(source_node, "report_status",
+    response = run_remote_command(source_node, "report_metadata",
                                   "node" => source_node,
                                   "key" => "last_processed_message_timestamp")
     timestamp = response["value"]
     if timestamp and not timestamp.empty?
       puts "The timestamp of the last processed message in the source node: #{timestamp}"
       puts "Setting effective message timestamp for the destination node..."
-      response = run_remote_command(joining_node, "set_status",
+      response = run_remote_command(joining_node, "set_metadata",
                                     "node" => joining_node,
                                     "key" => "effective_message_timestamp",
                                     "value" => timestamp)

  Modified: lib/droonga/command/remote.rb (+2 -2)
===================================================================
--- lib/droonga/command/remote.rb    2014-12-25 15:14:16 +0900 (adbfb62)
+++ lib/droonga/command/remote.rb    2014-12-25 15:17:46 +0900 (47a05e2)
@@ -94,14 +94,14 @@ module Droonga
         end
       end
 
-      class ReportStatus < Base
+      class ReportMetadata < Base
         def process
           metadata = NodeMetadata.new
           @response["value"] = metadata.get(@params["key"])
         end
       end
 
-      class SetStatus < Base
+      class SetMetadata < Base
         def process
           metadata = NodeMetadata.new
           metadata.set(@params["key"], @params["value"])

  Modified: lib/droonga/command/serf_event_handler.rb (+4 -4)
===================================================================
--- lib/droonga/command/serf_event_handler.rb    2014-12-25 15:14:16 +0900 (989fc29)
+++ lib/droonga/command/serf_event_handler.rb    2014-12-25 15:17:46 +0900 (be992aa)
@@ -76,10 +76,10 @@ module Droonga
         case event_name
         when "change_role"
           Remote::ChangeRole
-        when "report_status"
-          Remote::ReportStatus
-        when "set_status"
-          Remote::SetStatus
+        when "report_metadata"
+          Remote::ReportMetadata
+        when "set_metadata"
+          Remote::SetMetadata
         when "join"
           Remote::Join
         when "unjoin"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index