[Groonga-commit] droonga/droonga-engine at 61b7e3a [master] Apply options for internal commands correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Jun 27 17:57:25 JST 2014


YUKI Hiroshi	2014-06-27 17:57:25 +0900 (Fri, 27 Jun 2014)

  New Revision: 61b7e3a19b343d29949832e18923072c45d73709
  https://github.com/droonga/droonga-engine/commit/61b7e3a19b343d29949832e18923072c45d73709

  Message:
    Apply options for internal commands correctly

  Modified files:
    bin/droonga-engine-absorb-data

  Modified: bin/droonga-engine-absorb-data (+20 -5)
===================================================================
--- bin/droonga-engine-absorb-data    2014-06-27 17:46:14 +0900 (09f104a)
+++ bin/droonga-engine-absorb-data    2014-06-27 17:57:25 +0900 (2071cdb)
@@ -38,12 +38,24 @@ parser.on("--host=HOST",
   drndump_options += ["--host", host]
 end
 parser.on("--port=PORT", Integer,
-            "Port number of the soruce cluster to be connected.") do |port|
+          "Port number of the soruce cluster to be connected.") do |port|
   drndump_options += ["--port", port.to_s]
 end
 parser.on("--tag=TAG",
           "Tag name to be used to communicate with Droonga system.") do |tag|
   drndump_options += ["--tag", tag]
+  droonga_request_options += ["--tag", tag]
+end
+
+parser.separator("")
+parser.separator("Destination:")
+parser.on("--destination-host=HOST",
+          "Host name of this cluster to be connected.") do |host|
+  options.destination_host = host
+end
+parser.on("--destination-port=PORT", Integer,
+          "Port number of this cluster to be connected.") do |port|
+  droonga_request_options += ["--port", port.to_s]
 end
 
 parser.separator("")
@@ -56,12 +68,11 @@ end
 parser.separator("")
 parser.separator("Droonga protocol:")
 parser.on("--receiver-host=HOST",
-          "Host name of this node to be received a response from the source cluster.") do |host|
-  drndump_options += ["--receiver-host", host]
-  droonga_request_options += ["--receiver-host", host]
+          "Host name of this node to be received a response from clusters.") do |host|
+  options.destination_host = host
 end
 parser.on("--receiver-port=PORT", Integer,
-          "Port number of this node to be received a response from the source cluster.") do |port|
+          "Port number of this node to be received a response from clusters.") do |port|
   drndump_options += ["--receiver-port", port.to_s]
   droonga_request_options += ["--receiver-port", port.to_s]
 end
@@ -79,6 +90,10 @@ end
 
 parser.parse!(ARGV)
 
+drndump_options += ["--receiver-host", options.destination_host]
+droonga_request_options += ["--host", options.destination_host]
+droonga_request_options += ["--receiver-host", options.destination_host]
+
 drndump_command_line = [options.drndump] + drndump_options
 droonga_request_command_line = [options.droonga_request] + droonga_request_options
 Open3.pipeline_r(drndump_command_line,
-------------- next part --------------
HTML����������������������������...
下載 



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