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();