YUKI Hiroshi
null+****@clear*****
Fri Jun 27 21:53:58 JST 2014
YUKI Hiroshi 2014-06-27 21:53:58 +0900 (Fri, 27 Jun 2014) New Revision: 687a26ff4d6a47b5a539b1b066ac91260d1f92f1 https://github.com/droonga/droonga-engine/commit/687a26ff4d6a47b5a539b1b066ac91260d1f92f1 Message: Accept "--hosts" option to specify all nodes directly Modified files: bin/droonga-engine-modify-catalog Modified: bin/droonga-engine-modify-catalog (+5 -1) =================================================================== --- bin/droonga-engine-modify-catalog 2014-06-27 21:47:08 +0900 (3ff9bb3) +++ bin/droonga-engine-modify-catalog 2014-06-27 21:53:58 +0900 (6b01028) @@ -59,6 +59,10 @@ parser.on("--dataset=NAME", "And set the NAME to the current dataset.") do |name| current_dataset = datasets[name] = {} end +parser.on("--hosts=NAME1,NAME2,...", Array, + "Use given hosts as replicas for the current dataset.") do |hosts| + current_dataset[:hosts] = hosts +end parser.on("--add-replica-hosts=NAME1,NAME2,...", Array, "Use given hosts to be added as replicas to the current dataset.") do |hosts| current_dataset[:add_replica_hosts] = hosts @@ -103,7 +107,7 @@ def fill_dataset(options, source) end options[:tag] = nodes.first[:tag] options[:port] = nodes.first[:port].to_i - options[:hosts] = nodes.collect do |node| + options[:hosts] ||= nodes.collect do |node| node[:host] end -------------- next part -------------- HTML����������������������������...Download