Navigation Menu

Skip to content

Commit

Permalink
Show default number of slices
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 27, 2014
1 parent 40ebba6 commit b155b66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/droonga-engine-catalog-generate
Expand Up @@ -67,7 +67,8 @@ parser.on("--tag=TAG",
current_dataset[:tag] = tag
end
parser.on("--n-slices=N", Integer,
"Use N slices for each replica.") do |n|
"Use N slices for each replica.",
"(#{Droonga::CatalogGenerator::DEFAULT_N_SLICES})") do |n|
current_dataset[:n_slices] = n
end
parser.on("--plugins=PLUGIN1,PLUGIN2,...", Array,
Expand Down
3 changes: 2 additions & 1 deletion lib/droonga/catalog_generator.rb
Expand Up @@ -20,6 +20,7 @@ class CatalogGenerator
DEFAULT_DATASET = "Default"
DEFAULT_HOSTS = ["127.0.0.1"]
DEFAULT_N_WORKERS = 4
DEFAULT_N_SLICES = 1
DEFAULT_PLUGINS = ["groonga", "search", "crud", "dump", "system"]
DEFAULT_PORT = 10031
DEFAULT_TAG = "droonga"
Expand Down Expand Up @@ -151,7 +152,7 @@ def initialize(host, options={})
@host = host
@port = options[:port] || DEFAULT_PORT
@tag = options[:tag] || DEFAULT_TAG
@n_slices = options[:n_slices] || 1
@n_slices = options[:n_slices] || DEFAULT_N_SLICES

@n_volumes = 0
end
Expand Down

0 comments on commit b155b66

Please sign in to comment.