Mongodb Sharding Commands

2014-11-24 07:50:36 · 作者: · 浏览: 4

Mongodb Sharding Commands
Java代码 www.2cto.com
sh.addShard('replicateSet1/host:port');
sh.enableSharding('database');
//Shard key should be index of the collection
sh.shardCollection('db.collection', 'shard key');
sh.status();