HDFS-17112. Show decommission duration in JMX and HTML. (#5866). Contributed by Shuyan Zhang.

Reviewed-by: hfutatzhanghb <1036798979@qq.com>
Reviewed-by: Tao Li <tomscut@apache.org>
Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
This commit is contained in:
zhangshuyan 2023-07-24 14:38:00 +08:00 committed by GitHub
parent 4d4b099309
commit 49c98da838
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -6664,6 +6664,8 @@ public String getDecomNodes() {
node.getLeavingServiceStatus().getOutOfServiceOnlyReplicas()) node.getLeavingServiceStatus().getOutOfServiceOnlyReplicas())
.put("underReplicateInOpenFiles", .put("underReplicateInOpenFiles",
node.getLeavingServiceStatus().getUnderReplicatedInOpenFiles()) node.getLeavingServiceStatus().getUnderReplicatedInOpenFiles())
.put("decommissionDuration",
monotonicNow() - node.getLeavingServiceStatus().getStartTime())
.build(); .build();
info.put(node.getXferAddrWithHostname(), innerinfo); info.put(node.getXferAddrWithHostname(), innerinfo);
} }

View File

@ -406,6 +406,7 @@
<th>Under replicated blocks</th> <th>Under replicated blocks</th>
<th>Blocks with no live replicas</th> <th>Blocks with no live replicas</th>
<th>Under Replicated Blocks <br/>In files under construction</th> <th>Under Replicated Blocks <br/>In files under construction</th>
<th>Decommission duration</th>
</tr> </tr>
</thead> </thead>
{#DecomNodes} {#DecomNodes}
@ -414,6 +415,7 @@
<td>{underReplicatedBlocks}</td> <td>{underReplicatedBlocks}</td>
<td>{decommissionOnlyReplicas}</td> <td>{decommissionOnlyReplicas}</td>
<td>{underReplicateInOpenFiles}</td> <td>{underReplicateInOpenFiles}</td>
<td>{decommissionDuration}ms</td>
</tr> </tr>
{/DecomNodes} {/DecomNodes}
</table> </table>