sh.disableBalancing()
On this page本页内容
Description描述
sh.disableBalancing(namespace)
-
Disables the balancer for the specified sharded collection.禁用指定分片集合的平衡器。This does not affect the balancing of chunks for other sharded collections in the same cluster.这不会影响同一集群中其他分片集合的块的平衡。ImportantYou can only run您只能在sh.disableBalancing()
on amongos
instance.sh.disableBalancing()
errors if run onmongod
instance.mongos
实例上运行sh.disableBalancing()
。如果在mongod
实例上运行,则会出现sh.disableBalancing()
错误。Thesh.disableBalancing()
method has the following parameter:sh.disableBalancing()
方法具有以下参数:Parameter参数Type类型Description描述namespace
string The namespace of the collection.集合的命名空间。For more information on the balancing process, see Manage Sharded Cluster Balancer and Sharded Cluster Balancer.有关平衡过程的更多信息,请参阅管理分片群集平衡器和分片群集平衡器。