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