Rename shard to pool

Most of the work done in https://review.openstack.org/#/c/96463/
and here are for those left.

Change-Id: I9249747557b0784982f2fe75c1f13fd866a16616
Closes-Bug: #1333152
This commit is contained in:
pengfei wang 2014-06-24 13:43:09 +08:00
parent 005bf960ab
commit 1060dd8745
5 changed files with 23 additions and 23 deletions

View File

@ -64,14 +64,14 @@ protocol, which is one of the main requirements in todays scalable applicatio
Queues database stores the information about the queues and the messages Queues database stores the information about the queues and the messages
within these queues. Storage layer has to guarantee durability and availability of the data. within these queues. Storage layer has to guarantee durability and availability of the data.
Sharding Pooling
If sharding enabled, queuing service uses multiple queues databases in order If pooling enabled, queuing service uses multiple queues databases in order
to scale horizontally. A shard (queues database) can be added anytime without to scale horizontally. A pool (queues database) can be added anytime without
stopping the service. Each shard has a weight that is assigned during the stopping the service. Each pool has a weight that is assigned during the
creation time but can be changed later. Sharding is done by queue which creation time but can be changed later. Pooling is done by queue which
indicates that all messages for a particular queue can be found in the same shard (queues database). indicates that all messages for a particular queue can be found in the same pool (queues database).
Catalog Database Catalog Database
If sharding is enabled, catalog database has to be created. Catalog database If pooling is enabled, catalog database has to be created. Catalog database
maintains ``queues`` to ``queues database`` mapping. Storage layer has maintains ``queues`` to ``queues database`` mapping. Storage layer has
to guarantee durability and availability of data. to guarantee durability and availability of data.

View File

@ -156,8 +156,8 @@ Create a Marconi configuration file ``/etc/marconi.conf`` with the following con
# Show debugging output in logs (sets DEBUG log level output) # Show debugging output in logs (sets DEBUG log level output)
#debug = False #debug = False
# Sharding and admin mode configs # Pooling and admin mode configs
sharding = True pooling = True
admin_mode = True admin_mode = True
# Log to this file! # Log to this file!
@ -239,17 +239,17 @@ Start the queuing service::
#/usr/bin/uwsgi --ini /srv/marconi/uwsgi.ini #/usr/bin/uwsgi --ini /srv/marconi/uwsgi.ini
Configure Shards Configure Pools
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
To have a functional queuing service, we need to define a shard. On one of the To have a functional queuing service, we need to define a pool. On one of the
web servers run this command:: web servers run this command::
curl -i -X PUT -H 'X-Auth-Token: $TOKEN' -d '{"weight": 100, "uri": "mongodb://mydb0,mydb1,mydb2:27017/?replicaSet=catalog&w=2&readPreference=secondaryPreferred", "options": {"partitions": 8}}' http://localhost:8888/v1/shards/shard1 curl -i -X PUT -H 'X-Auth-Token: $TOKEN' -d '{"weight": 100, "uri": "mongodb://mydb0,mydb1,mydb2:27017/?replicaSet=catalog&w=2&readPreference=secondaryPreferred", "options": {"partitions": 8}}' http://localhost:8888/v1/pools/pool1
The above ``$TOKEN`` variable is the authentication token retrieved from The above ``$TOKEN`` variable is the authentication token retrieved from
identity service. If you choose not to enable Keystone authentication you won't identity service. If you choose not to enable Keystone authentication you won't
have to pass a token. have to pass a token.
Reminder: In larger deployments, catalog database and queues databases (shards) Reminder: In larger deployments, catalog database and queues databases (pools)
are going to be on different MongoDB replica-sets. are going to be on different MongoDB replica-sets.

View File

@ -14,13 +14,13 @@
# Options defined in marconi.bootstrap # Options defined in marconi.bootstrap
# #
# ('Enable sharding across multiple storage backends. ', 'If # Enable pooling across multiple storage backends. If
# sharding is enabled, the storage driver ', 'configuration is # pooling is enabled, the storage driver configuration is
# used to determine where the ', 'catalogue/control plane data # used to determine where the catalogue/control plane data
# is kept.') (boolean value) # is kept. (boolean value)
#sharding=false #pooling=false
# Activate endpoints to manage shard registry. (boolean value) # Activate endpoints to manage pool registry. (boolean value)
#admin_mode=false #admin_mode=false
@ -354,10 +354,10 @@
#enforce_token_bind=permissive #enforce_token_bind=permissive
[sharding:catalog] [pooling:catalog]
# #
# Options defined in marconi.storage.sharding # Options defined in marconi.storage.pooling
# #
# Catalog storage driver. (integer value) # Catalog storage driver. (integer value)

View File

@ -57,7 +57,7 @@ oslo.config.opts =
marconi.bootstrap = marconi.queues.bootstrap:_config_options marconi.bootstrap = marconi.queues.bootstrap:_config_options
marconi.storage.base = marconi.queues.storage.base:_config_options marconi.storage.base = marconi.queues.storage.base:_config_options
marconi.storage.pipeline = marconi.queues.storage.pipeline:_config_options marconi.storage.pipeline = marconi.queues.storage.pipeline:_config_options
marconi.storage.sharding = marconi.queues.storage.sharding:_config_options marconi.storage.pooling = marconi.queues.storage.pooling:_config_options
marconi.storage.mongodb = marconi.queues.storage.mongodb.options:_config_options marconi.storage.mongodb = marconi.queues.storage.mongodb.options:_config_options
# NOTE(flaper87): sqlite points to sqla for backwards compatibility # NOTE(flaper87): sqlite points to sqla for backwards compatibility

View File

@ -2,7 +2,7 @@ export OSLO_CONFIG_GENERATOR_EXTRA_MODULES="keystoneclient.middleware.auth_token
export OSLO_CONFIG_GENERATOR_EXTRA_LIBRARIES="marconi.bootstrap export OSLO_CONFIG_GENERATOR_EXTRA_LIBRARIES="marconi.bootstrap
marconi.storage.base marconi.storage.base
marconi.storage.pipeline marconi.storage.pipeline
marconi.storage.sharding marconi.storage.pooling
marconi.storage.mongodb marconi.storage.mongodb
marconi.storage.sqlalchemy marconi.storage.sqlalchemy
marconi.transport.wsgi marconi.transport.wsgi