sh.isBalancerRunning()

On this page本页内容

Definition定义

sh.isBalancerRunning()

Returns a document describing the status of the balancer.返回描述平衡器状态的文档。

Output Document输出文档

The following is an example of a document returned by the command:以下是命令返回的文档示例:

{
  mode: 'full',
  inBalancerRound: false,
  numBalancerRounds: Long("1143"),
  ok: 1,
  '$clusterTime': {
     clusterTime: Timestamp({ t: 1639753724, i: 3 }),
     signature: {
        hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
        keyId: Long("0")
     }
  },
  operationTime: Timestamp({ t: 1639753724, i: 3 })
}
Field字段Description描述
mode

String that specifies whether the balancer thread is running or stopped. 指定平衡器线程是正在运行还是已停止的字符串。Possible values are:可能的值为:

  • "full"
    Balancer thread is running but not necessarily in a balancing round.平衡线程正在运行,但不一定在平衡回合中。
  • "off"
    Balancer thread is stopped. 平衡器线程已停止。Chunk balancing cannot occur in this mode.在此模式下无法进行区块平衡。
inBalancerRoundBoolean that specifies if the balancer is currently in a balancing round.布尔值,指定平衡器当前是否处于平衡轮。
numBalancerRoundsNumber of balancer rounds which have occurred since the config servers were started. 自配置服务器启动以来发生的平衡器轮次数。This value is reset to 0 when the config servers are restarted.重新启动配置服务器时,此值将重置为0。
okSee Command Response.请参阅命令响应
$clusterTimeSee Command Response.请参阅命令响应
operationTimeSee Command Response.请参阅命令响应
←  sh.help()sh.moveChunk() →