YUKI Hiroshi
null+****@clear*****
Sat Jun 28 03:21:29 JST 2014
YUKI Hiroshi 2014-06-28 03:21:29 +0900 (Sat, 28 Jun 2014) New Revision: f4151ee93c3d42a5808505391d9b1def68a142f8 https://github.com/droonga/droonga-engine/commit/f4151ee93c3d42a5808505391d9b1def68a142f8 Message: Show default option values Modified files: bin/droonga-engine-absorb-data bin/droonga-engine-catalog-generate bin/droonga-engine-catalog-modify Modified: bin/droonga-engine-absorb-data (+10 -0) =================================================================== --- bin/droonga-engine-absorb-data 2014-06-28 03:13:28 +0900 (64a8f1d) +++ bin/droonga-engine-absorb-data 2014-06-28 03:21:29 +0900 (32d6fe1) @@ -20,9 +20,11 @@ require "optparse" require "open3" require "droonga/engine/version" +require "droonga/catalog_generator" require "droonga/data_absorber" options = OpenStruct.new +options.dataset = Droonga::CatalogGenerator::DEFAULT_DATASET options.drndump = "drndump" options.client = "droonga-request" parser = OptionParser.new @@ -87,6 +89,14 @@ end parser.parse!(ARGV) +unless options.source_host + raise "You must specify the source host via --source-host option." +end +unless options.destination_host + raise "You must specify the destination host (this node) " + + "via --destination-host option." +end + Droonga::DataAbsorber.absorb(:drndump => options.drndump, :client => options.client, :dataset => options.dataset, Modified: bin/droonga-engine-catalog-generate (+12 -6) =================================================================== --- bin/droonga-engine-catalog-generate 2014-06-28 03:13:28 +0900 (975a62c) +++ bin/droonga-engine-catalog-generate 2014-06-28 03:21:29 +0900 (bbc9d94) @@ -42,23 +42,28 @@ parser.on("--output=PATH", end parser.on("--dataset=NAME", "Add a dataset its name is NAME.", - "And set the NAME to the current dataset.") do |name| + "And set the NAME to the current dataset.", + "(#{Droonga::CatalogGenerator::DEFAULT_DATASET})") do |name| current_dataset = datasets[name] = {} end parser.on("--n-workers=N", Integer, - "Use N workers for the current dataset.") do |n| + "Use N workers for the current dataset.", + "(#{Droonga::CatalogGenerator::DEFAULT_N_WORKERS})") do |n| current_dataset[:n_workers] = n end parser.on("--hosts=NAME1,NAME2,...", Array, - "Use given hosts for replicas of the current dataset.") do |hosts| + "Use given hosts for replicas of the current dataset.", + "(#{Droonga::CatalogGenerator::DEFAULT_HOSTS.join(",")})") do |hosts| current_dataset[:hosts] = hosts end parser.on("--port=PORT", Integer, - "Use the PORT as the port for the current dataset.") do |port| + "Use the PORT as the port for the current dataset.", + "(#{Droonga::CatalogGenerator::DEFAULT_PORT})") do |port| current_dataset[:port] = port end parser.on("--tag=TAG", - "Use the TAG as the tag for the current dataset.") do |tag| + "Use the TAG as the tag for the current dataset.", + "(#{Droonga::CatalogGenerator::DEFAULT_TAG})") do |tag| current_dataset[:tag] = tag end parser.on("--n-slices=N", Integer, @@ -66,7 +71,8 @@ parser.on("--n-slices=N", Integer, current_dataset[:n_slices] = n end parser.on("--plugins=PLUGIN1,PLUGIN2,...", Array, - "Use PLUGINS for the current dataset.") do |plugins| + "Use PLUGINS for the current dataset.", + "(#{Droonga::CatalogGenerator::DEFAULT_PLUGINS.join(",")})") do |plugins| current_dataset[:plugins] = plugins end parser.on("--schema=PATH", Modified: bin/droonga-engine-catalog-modify (+2 -1) =================================================================== --- bin/droonga-engine-catalog-modify 2014-06-28 03:13:28 +0900 (06dbab2) +++ bin/droonga-engine-catalog-modify 2014-06-28 03:21:29 +0900 (494b914) @@ -55,7 +55,8 @@ parser.on("--[no-]update", end parser.on("--dataset=NAME", "Add a dataset its name is NAME.", - "And set the NAME to the current dataset.") do |name| + "And set the NAME to the current dataset.", + "(#{Droonga::CatalogGenerator::DEFAULT_DATASET})") do |name| current_dataset = datasets[name] = {} end parser.on("--hosts=NAME1,NAME2,...", Array, -------------- next part -------------- HTML����������������������������...Download