long-long-float
null+****@clear*****
Wed Aug 27 17:29:16 JST 2014
long-long-float 2014-08-27 17:29:16 +0900 (Wed, 27 Aug 2014) New Revision: 8055b70843222fbac86f12546b9a10a16dd5a300 https://github.com/long-long-float/droonga-engine/commit/8055b70843222fbac86f12546b9a10a16dd5a300 Merged 60208e4: Merge pull request #14 from long-long-float/improvement-cli Message: Modify indent Modified files: bin/droonga-engine-join Modified: bin/droonga-engine-join (+12 -15) =================================================================== --- bin/droonga-engine-join 2014-08-27 17:26:44 +0900 (e5d5271) +++ bin/droonga-engine-join 2014-08-27 17:29:16 +0900 (0129ff8) @@ -30,25 +30,25 @@ options = nil begin options = Slop.parse(:help => true) do |opt| opt.on("no-copy", "Don\'t copy data from the source cluster.", - :default => false) + :default => false) opt.separator("Connections:") opt.on(:host=, - "Host name of the node to be joined.", - :required => true) + "Host name of the node to be joined.", + :required => true) opt.on("replica-source-host=", - "Host name of the soruce cluster to be connected.", - :required => true) + "Host name of the soruce cluster to be connected.", + :required => true) opt.on(:dataset=, - "Tag dataset name of the cluster to be joined as a node.", - :default => Droonga::CatalogGenerator::DEFAULT_DATASET) + "Tag dataset name of the cluster to be joined as a node.", + :default => Droonga::CatalogGenerator::DEFAULT_DATASET) opt.on(:port=, - "Port number of the source cluster to be connected.", - :as => Integer, - :default => Droonga::CatalogGenerator::DEFAULT_PORT) + "Port number of the source cluster to be connected.", + :as => Integer, + :default => Droonga::CatalogGenerator::DEFAULT_PORT) opt.on(:tag=, - "Tag name of the soruce cluster to be connected.", - :default => Droonga::CatalogGenerator::DEFAULT_TAG) + "Tag name of the soruce cluster to be connected.", + :default => Droonga::CatalogGenerator::DEFAULT_TAG) end rescue Slop::MissingOptionError => e STDERR.puts e @@ -59,15 +59,12 @@ joining_node = "#{options[:host]}:#{options[:port]}/#{options[:tag]}" source_node = "#{options["replica-source-host"]}:#{options[:port]}/#{options[:tag]}" def run_remote_command(target, command, options) - p [command, options] result = Droonga::Serf.send_query(target, command, options) puts result[:result] puts result[:error] unless result[:error].empty? result[:response] end -p [joining_node, source_node] - puts "Joining new replica to the cluster..." run_remote_command(joining_node, "join", "node" => joining_node, -------------- next part -------------- HTML����������������������������...Download