mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
renamed sharding to set-shards
This commit is contained in:
parent
9f959fc6ed
commit
f09dacdd11
@ -204,7 +204,7 @@ def run_load(args):
|
||||
workers.start()
|
||||
|
||||
|
||||
def run_sharding(args):
|
||||
def run_set_shards(args):
|
||||
b = bigchaindb.Bigchain()
|
||||
r.table('bigchain').reconfigure(shards=args.num_shards, replicas=1).run(b.conn)
|
||||
r.table('backlog').reconfigure(shards=args.num_shards, replicas=1).run(b.conn)
|
||||
@ -251,7 +251,7 @@ def main():
|
||||
help='Start BigchainDB')
|
||||
|
||||
# parser for configuring the number of shards
|
||||
sharding_parser = subparsers.add_parser('sharding',
|
||||
sharding_parser = subparsers.add_parser('set-shards',
|
||||
help='Configure number of shards')
|
||||
|
||||
sharding_parser.add_argument('num_shards', metavar='num_shards', type=int, default=1,
|
||||
|
@ -229,11 +229,11 @@ def test_start_rethinkdb_exits_when_cannot_start(mock_popen):
|
||||
|
||||
def test_configure_sharding(b):
|
||||
import rethinkdb as r
|
||||
from bigchaindb.commands.bigchain import run_sharding
|
||||
from bigchaindb.commands.bigchain import run_set_shards
|
||||
|
||||
# change number of shards
|
||||
args = Namespace(num_shards=3)
|
||||
run_sharding(args)
|
||||
run_set_shards(args)
|
||||
|
||||
# retrieve table configuration
|
||||
table_config = list(r.db('rethinkdb')
|
||||
|
Loading…
x
Reference in New Issue
Block a user