Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDFS-16500. Make asynchronous blocks deletion lock and unlock durtion threshold configurable. #4061

Merged
merged 2 commits into from
Apr 21, 2022

Conversation

smarthanwang
Copy link
Contributor

https://issues.apache.org/jira/browse/HDFS-16500

I have backport the nice feature HDFS-16043 to our internal branch, it works well in our testing cluster.

I think it's better to make the fields deleteBlockLockTimeMs and deleteBlockUnlockIntervalTimeMs configurable, so that we can control the lock and unlock duration.

private final long deleteBlockLockTimeMs = 500;
private final long deleteBlockUnlockIntervalTimeMs = 100;

And we should set the default value smaller to avoid blocking other requests long time when deleting some large directories.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 39s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ 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 _
-1 ❌ mvninstall 3m 32s /branch-mvninstall-root.txt root in trunk failed.
+1 💚 compile 2m 19s trunk passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚 compile 1m 13s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 0m 54s trunk passed
+1 💚 mvnsite 1m 22s trunk passed
+1 💚 javadoc 0m 55s trunk passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 1m 26s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 3m 9s trunk passed
+1 💚 shadedclient 25m 21s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 15s the patch passed
+1 💚 compile 1m 22s the patch passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚 javac 1m 22s the patch passed
+1 💚 compile 1m 12s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 1m 12s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 54s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 284 unchanged - 0 fixed = 285 total (was 284)
+1 💚 mvnsite 1m 21s the patch passed
+1 💚 javadoc 0m 52s the patch passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 1m 23s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 3m 16s the patch passed
+1 💚 shadedclient 22m 42s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 230m 30s /patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs in the patch passed.
+1 💚 asflicense 0m 46s The patch does not generate ASF License warnings.
303m 53s
Reason Tests
Failed junit tests hadoop.tools.TestHdfsConfigFields
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4061/1/artifact/out/Dockerfile
GITHUB PR #4061
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell
uname Linux da3081bf758f 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 4419c1c
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4061/1/testReport/
Max. process+thread count 3059 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4061/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@smarthanwang
Copy link
Contributor Author

@Hexiaoqiao could you please take a look?

@zhuxiangyi
Copy link
Contributor

@smarthanwang Thanks for your work , new parameters need to be added to hdfs-default.xml.

@smarthanwang
Copy link
Contributor Author

smarthanwang commented Mar 11, 2022

@smarthanwang Thanks for your work , new parameters need to be added to hdfs-default.xml.

@zhuxiangyi good suggestion, I would fix it.

@Hexiaoqiao
Copy link
Contributor

Thanks @smarthanwang involve me here. It almost look good to me. Just one nit, it seems changes default value here, any consideration? Just suggest keep it if no any concerns. Thanks again.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 54s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ 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 _
+1 💚 mvninstall 36m 9s trunk passed
+1 💚 compile 1m 32s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 compile 1m 24s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 0m 59s trunk passed
+1 💚 mvnsite 1m 30s trunk passed
+1 💚 javadoc 1m 4s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 30s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 3m 24s trunk passed
+1 💚 shadedclient 26m 52s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 24s the patch passed
+1 💚 compile 1m 30s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javac 1m 30s the patch passed
+1 💚 compile 1m 18s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 1m 18s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 52s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 284 unchanged - 0 fixed = 285 total (was 284)
+1 💚 mvnsite 1m 24s the patch passed
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 javadoc 0m 59s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 25s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 3m 36s the patch passed
+1 💚 shadedclient 25m 23s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 348m 24s hadoop-hdfs in the patch passed.
+1 💚 asflicense 0m 37s The patch does not generate ASF License warnings.
458m 59s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4061/2/artifact/out/Dockerfile
GITHUB PR #4061
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell xml
uname Linux ac02869061b7 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 06:54:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 19af2f3
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4061/2/testReport/
Max. process+thread count 2195 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4061/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@smarthanwang
Copy link
Contributor Author

Thanks @smarthanwang involve me here. It almost look good to me. Just one nit, it seems changes default value here, any consideration? Just suggest keep it if no any concerns. Thanks again.

@Hexiaoqiao thanks for comment.
When deleting a large directory, the deletion loop would continue for a long time, if we set the lock holding limit as 500ms, the rpcQueueTime of almost all rpc requests would increase to 500ms, it's too long for production cluster. So I think it's better to set a smaller default value which is not much greater than the avgRpcQueueTime of our cluster.

@smarthanwang
Copy link
Contributor Author

Hi @Hexiaoqiao, do you have any suggestion?

Copy link
Contributor

@Hexiaoqiao Hexiaoqiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late response. LGTM. +1 from my side.
Will commit if no other more comments.

@smarthanwang
Copy link
Contributor Author

@Hexiaoqiao thanks for reviews.

@Hexiaoqiao Hexiaoqiao changed the title HDFS-16500. Make asynchronous blocks deletion lock and unlock durtion… HDFS-16500. Make asynchronous blocks deletion lock and unlock durtion threshold configurable. Apr 21, 2022
@Hexiaoqiao Hexiaoqiao merged commit bf4730b into apache:trunk Apr 21, 2022
@Hexiaoqiao
Copy link
Contributor

Committed to trunk. Thanks @smarthanwang for your contributions.
BTW, Would you like to fix checkstyle about method length is 156 lines is over 150 limit for BlockManager, IMO this is historical issue, we should file another issue to refactor it.

@smarthanwang
Copy link
Contributor Author

@Hexiaoqiao thanks you. I would fix the checkstyle later

@smarthanwang
Copy link
Contributor Author

@Hexiaoqiao I have filed issue https://issues.apache.org/jira/browse/HDFS-16553 to fix the checkstyle, please take a look.

HarshitGupta11 pushed a commit to HarshitGupta11/hadoop that referenced this pull request Nov 28, 2022
… threshold configurable. (apache#4061). Contributed by Chengwei Wang.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants