On this page本页内容
sh.enableBalancing(namespace)
Enables the balancer for the specified namespace of the sharded collection.为分片集合的指定命名空间启用平衡器。
You can only run 只能在sh.enableBalancing()
on a mongos
instance. mongos
实例上运行sh.enableBalancing()
。如果在sh.enableBalancing()
errors if run on mongod
instance.mongod
实例上运行sh.enableBalancing()
,则它将出错。
The sh.enableBalancing()
method has the following parameter:sh.enableBalancing()
方法具有以下参数:
namespace | string |
For more information on the balancing process, see Manage Sharded Cluster Balancer and Sharded Cluster Balancer.有关平衡过程的更多信息,请参阅管理分片群集平衡器和分片群集平衡器。