Navigation Menu

Skip to content

Commit

Permalink
Accept "--hosts" option to specify all nodes directly
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 27, 2014
1 parent 50f5695 commit 687a26f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/droonga-engine-modify-catalog
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 687a26f

Please sign in to comment.