HDFS-17433. metrics sumOfActorCommandQueueLength should only record valid commands. (#6644)
This commit is contained in:
parent
77c600d769
commit
2eb7246ea7
@ -1487,8 +1487,10 @@ void enqueue(List<DatanodeCommand> cmds) throws InterruptedException {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void enqueue(DatanodeCommand[] cmds) throws InterruptedException {
|
void enqueue(DatanodeCommand[] cmds) throws InterruptedException {
|
||||||
queue.put(() -> processCommand(cmds));
|
if (cmds.length != 0) {
|
||||||
dn.getMetrics().incrActorCmdQueueLength(1);
|
queue.put(() -> processCommand(cmds));
|
||||||
|
dn.getMetrics().incrActorCmdQueueLength(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user