[ https://issues.apache.org/jira/browse/HDFS-17789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17952591#comment-17952591 ]
ASF GitHub Bot commented on HDFS-17789: --------------------------------------- aswinmprabhu opened a new pull request, #7695: URL: https://github.com/apache/hadoop/pull/7695 ### Description of PR At LinkedIn, we use the stats from the getStats() NN RPC call to evaluate safety checks that ensure that various maintenance ops are safe to run. Due to a migration we are undertaking, the badly distributed block count is very high for the cluster undergoing migration. This is not a safety problem. However, to distinguish it from the actual low redundancy block count, we need both these values to be available from the getStats() RPC. The current low redundancy blocks count value available is the [sum](https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/LowRedundancyBlocks.java#L138-L146) of all the different types of low redundancy blocks, including normal low redundancy blocks and badly distributed blocks. This PR adds these 2 values separately to the array returned by getStats() RPC. ### How was this patch tested? Trivial change. It has been running in our prod cluster for a bit now. Build passes: ``` [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 42:50 min [INFO] Finished at: 2025-05-19T14:51:09+05:30 [INFO] ------------------------------------------------------------------------ ``` ### For code changes: - [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? - [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? > Add NormalLowRedundancyBlocksCount and BadlyDistributedBlocksCount to > getStats() NN RPC > --------------------------------------------------------------------------------------- > > Key: HDFS-17789 > URL: https://issues.apache.org/jira/browse/HDFS-17789 > Project: Hadoop HDFS > Issue Type: New Feature > Components: namenode > Reporter: Aswin M Prabhu > Assignee: Aswin M Prabhu > Priority: Trivial > > At LinkedIn, we use the stats from the getStats() NN RPC call to evaluate > safety checks that ensure that various maintenance ops are safe to run. > Due to a migration we are undertaking, the badly distributed block count is > very high for the cluster undergoing migration. This is not a safety problem. > However, to distinguish it from the actual low redundancy block count, we > need both these values to be available from the getStats() RPC. The current > low redundancy blocks count value available is the > [sum|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/LowRedundancyBlocks.java#L138-L146] > of all the different types of low redundancy blocks, including normal low > redundancy blocks and badly distributed blocks. > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org