[
https://issues.apache.org/jira/browse/HDFS-17641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17895773#comment-17895773
]
ASF GitHub Bot commented on HDFS-17641:
---------------------------------------
PrateekSane commented on code in PR #7123:
URL: https://github.com/apache/hadoop/pull/7123#discussion_r1829884099
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -4738,6 +4738,12 @@ public long getMissingReplOneBlocksCount() {
// not locking
return blockManager.getMissingReplOneBlocksCount();
}
+
+ @Metric({"BadlyDistBlocks", "Number of Badly Distributed Blocks"})
+ public long getBadlyDistributedBlocksCount() {
+ // not locking
+ return blockManager.getBadlyDistributedBlocksCount();
+ }
Review Comment:
I think both are needed since the BlockManager gets the count,
BadlyDistBlocks exposes metric for Metrics2 and theres also
BadlyDistributedBlocks metric for MBean
> Add badly distributed blocks metric for low redundancy blocks
> --------------------------------------------------------------
>
> Key: HDFS-17641
> URL: https://issues.apache.org/jira/browse/HDFS-17641
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Reporter: Prateek Sane
> Priority: Minor
> Labels: pull-request-available
>
> Low Redundancy blocks have different priority levels including highest
> priority, very low redundancy, low redundancy, badly distributed, and corrupt.
> Having a metric for the number of badly distributed blocks would be helpful.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]