You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "aswinmprabhu (via GitHub)" <gi...@apache.org> on 2026/01/18 18:49:02 UTC

[PR] HDFS-17789. Add NormalUnderReplBlocksCount and BadlyDistributedBlocksCount to getStats() NN RPC [hadoop]

aswinmprabhu opened a new pull request, #8190:
URL: https://github.com/apache/hadoop/pull/8190

   ### Description of PR
   
   Reopening PR: https://github.com/apache/hadoop/pull/7963
   
   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?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HDFS-17789. Add NormalUnderReplBlocksCount and BadlyDistributedBlocksCount to getStats() NN RPC [hadoop]

Posted by "hadoop-yetus (via GitHub)" <gi...@apache.org>.
hadoop-yetus commented on PR #8190:
URL: https://github.com/apache/hadoop/pull/8190#issuecomment-3808414265

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   0m 43s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  1s |  |  detect-secrets was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain any @author tags.  |
   | -1 :x: |  test4tests  |   0m  0s |  |  The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.  |
   |||| _ trunk Compile Tests _ |
   | +0 :ok: |  mvndep  |   9m 16s |  |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |  26m 55s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   3m 32s |  |  trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  compile  |   4m  1s |  |  trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  checkstyle  |   0m 46s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 43s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 20s |  |  trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   1m 21s |  |  trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  spotbugs  |   4m 34s |  |  trunk passed  |
   | -1 :x: |  shadedclient  |  17m 56s |  |  branch has errors when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 19s |  |  Maven dependency ordering for patch  |
   | -1 :x: |  mvninstall  |   0m 20s | [/patch-mvninstall-hadoop-hdfs-project_hadoop-hdfs.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-mvninstall-hadoop-hdfs-project_hadoop-hdfs.txt) |  hadoop-hdfs in the patch failed.  |
   | -1 :x: |  mvninstall  |   0m 21s | [/patch-mvninstall-hadoop-hdfs-project_hadoop-hdfs-client.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-mvninstall-hadoop-hdfs-project_hadoop-hdfs-client.txt) |  hadoop-hdfs-client in the patch failed.  |
   | -1 :x: |  compile  |   0m 20s | [/patch-compile-hadoop-hdfs-project-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-compile-hadoop-hdfs-project-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt) |  hadoop-hdfs-project in the patch failed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04.  |
   | -1 :x: |  javac  |   0m 20s | [/patch-compile-hadoop-hdfs-project-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-compile-hadoop-hdfs-project-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt) |  hadoop-hdfs-project in the patch failed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04.  |
   | -1 :x: |  compile  |   0m 21s | [/patch-compile-hadoop-hdfs-project-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-compile-hadoop-hdfs-project-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt) |  hadoop-hdfs-project in the patch failed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04.  |
   | -1 :x: |  javac  |   0m 21s | [/patch-compile-hadoop-hdfs-project-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-compile-hadoop-hdfs-project-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt) |  hadoop-hdfs-project in the patch failed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04.  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks issues.  |
   | -0 :warning: |  checkstyle  |   0m 19s | [/buildtool-patch-checkstyle-hadoop-hdfs-project.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/buildtool-patch-checkstyle-hadoop-hdfs-project.txt) |  The patch fails to run checkstyle in hadoop-hdfs-project  |
   | -1 :x: |  mvnsite  |   0m 21s | [/patch-mvnsite-hadoop-hdfs-project_hadoop-hdfs.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-mvnsite-hadoop-hdfs-project_hadoop-hdfs.txt) |  hadoop-hdfs in the patch failed.  |
   | -1 :x: |  mvnsite  |   0m 20s | [/patch-mvnsite-hadoop-hdfs-project_hadoop-hdfs-client.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-mvnsite-hadoop-hdfs-project_hadoop-hdfs-client.txt) |  hadoop-hdfs-client in the patch failed.  |
   | -1 :x: |  javadoc  |   0m 21s | [/patch-javadoc-hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-javadoc-hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt) |  hadoop-hdfs in the patch failed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04.  |
   | -1 :x: |  javadoc  |   0m 20s | [/patch-javadoc-hadoop-hdfs-project_hadoop-hdfs-client-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-javadoc-hadoop-hdfs-project_hadoop-hdfs-client-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt) |  hadoop-hdfs-client in the patch failed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04.  |
   | -1 :x: |  javadoc  |   0m 21s | [/patch-javadoc-hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-javadoc-hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt) |  hadoop-hdfs in the patch failed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04.  |
   | -1 :x: |  javadoc  |   0m 21s | [/patch-javadoc-hadoop-hdfs-project_hadoop-hdfs-client-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-javadoc-hadoop-hdfs-project_hadoop-hdfs-client-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt) |  hadoop-hdfs-client in the patch failed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04.  |
   | -1 :x: |  spotbugs  |   0m 21s | [/patch-spotbugs-hadoop-hdfs-project_hadoop-hdfs.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-spotbugs-hadoop-hdfs-project_hadoop-hdfs.txt) |  hadoop-hdfs in the patch failed.  |
   | -1 :x: |  spotbugs  |   0m 20s | [/patch-spotbugs-hadoop-hdfs-project_hadoop-hdfs-client.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-spotbugs-hadoop-hdfs-project_hadoop-hdfs-client.txt) |  hadoop-hdfs-client in the patch failed.  |
   | +1 :green_heart: |  shadedclient  |   5m 49s |  |  patch has no errors when building and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | -1 :x: |  unit  |   0m 21s | [/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt) |  hadoop-hdfs in the patch failed.  |
   | -1 :x: |  unit  |   0m 21s | [/patch-unit-hadoop-hdfs-project_hadoop-hdfs-client.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs-client.txt) |  hadoop-hdfs-client in the patch failed.  |
   | +0 :ok: |  asflicense  |   0m 21s |  |  ASF License check generated no output?  |
   |  |   |  80m 43s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.53 ServerAPI=1.53 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/8190 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 10bb20d61b28 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 20f5e88df0c1420e6e65addaadfd8a535305a675 |
   | Default Java | Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 |
   | Multi-JDK versions | /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 |
   |  Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/testReport/ |
   | Max. process+thread count | 258 (vs. ulimit of 5500) |
   | modules | C: hadoop-hdfs-project/hadoop-hdfs hadoop-hdfs-project/hadoop-hdfs-client U: hadoop-hdfs-project |
   | Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8190/2/console |
   | versions | git=2.25.1 maven=3.9.11 spotbugs=4.9.7 |
   | Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HDFS-17789. Add NormalUnderReplBlocksCount and BadlyDistributedBlocksCount to getStats() NN RPC [hadoop]

Posted by "ctrezzo (via GitHub)" <gi...@apache.org>.
ctrezzo commented on PR #8190:
URL: https://github.com/apache/hadoop/pull/8190#issuecomment-3808182993

   @aswinmprabhu can you address the failing check-style issues? Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org