Skip to content

HADOOP-19218. Addendum. Update TestFSNamesystemLockReport to exclude hostname resolution from regex. #6951

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

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

virajjasani
Copy link
Contributor

@virajjasani virajjasani commented Jul 19, 2024

Description of PR

Addendum to fix hostname resolution for the longest lock holding thread

How was this patch tested?

UTs

  • TestFSNamesystemLockReport
  • TestFSNamesystemLock

For code changes:

  • 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?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 21s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 1s 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 32m 39s trunk passed
+1 💚 compile 0m 40s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 compile 0m 38s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 checkstyle 0m 36s trunk passed
+1 💚 mvnsite 0m 42s trunk passed
+1 💚 javadoc 0m 41s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 1m 7s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 1m 48s trunk passed
+1 💚 shadedclient 20m 51s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 37s the patch passed
+1 💚 compile 0m 37s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javac 0m 37s the patch passed
+1 💚 compile 0m 32s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 javac 0m 32s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 28s the patch passed
+1 💚 mvnsite 0m 36s the patch passed
+1 💚 javadoc 0m 31s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 1m 2s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 1m 47s the patch passed
+1 💚 shadedclient 20m 50s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 194m 3s hadoop-hdfs in the patch passed.
+1 💚 asflicense 0m 29s The patch does not generate ASF License warnings.
280m 54s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6951/1/artifact/out/Dockerfile
GITHUB PR #6951
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux ccfb8e4611a7 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 40111c1
Default Java Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6951/1/testReport/
Max. process+thread count 4492 (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-6951/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@@ -8838,6 +8838,10 @@ private Supplier<String> getLockReportInfoSupplier(String src, String dst,
UserGroupInformation ugi = Server.getRemoteUser();
String userName = ugi != null ? ugi.toString() : null;
InetAddress addr = Server.getRemoteIp();
if (addr != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@virajjasani Thanks for your works. But I am concerned if it will involve more serious impact here because when hold lock for a long time and trigger hostname resolution here which is one IO inner lock. Thanks again.

Copy link
Contributor Author

@virajjasani virajjasani Jul 20, 2024

Choose a reason for hiding this comment

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

hmm, FSNamesystemLock#coarseLock (writeLock) is unlocked only after writing above log so we will incur extra latency for long lock holding thread. Btw, i think coarseLock writeLock can be unlocked before logging the info as well (by protecting longestWriteLockHeldInfo with either synchronizing or using another lock), but this is out of scope here so maybe sometime later.

Shall we keep ip address only for long lock hold audit logs (similar to FSNamesystem audit logs)? If yes, then we can directly make test changes (i.e. revert TestFSNamesystemLockReport changes done with 88914ca)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Strong +1 to update TestFSNamesystemLockReport only. And move log out of lock could improve at next PR. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, let me update the test. Thanks @Hexiaoqiao

@@ -8838,6 +8838,10 @@ private Supplier<String> getLockReportInfoSupplier(String src, String dst,
UserGroupInformation ugi = Server.getRemoteUser();
String userName = ugi != null ? ugi.toString() : null;
InetAddress addr = Server.getRemoteIp();
if (addr != null) {
// The host name resolution on InetAddress provides Hostname with IP address
addr.getHostName();

Choose a reason for hiding this comment

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

The parsing result is not used, are you sure it is useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is useful because once you perform hostname resolution, the implementation of InetAddress#toString lets you print both hostname as well as ip address.

@virajjasani virajjasani changed the title HADOOP-19218 Hostname resolution for the longest lock holding thread (ADDENDUM) HADOOP-19218 Update TestFSNamesystemLockReport to exclude hostname resolution from regex (ADDENDUM) Jul 20, 2024
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 46s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 50m 9s trunk passed
+1 💚 compile 1m 26s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 compile 1m 16s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 checkstyle 1m 16s trunk passed
+1 💚 mvnsite 1m 26s trunk passed
+1 💚 javadoc 1m 11s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 1m 46s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 3m 23s trunk passed
+1 💚 shadedclient 42m 39s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 13s the patch passed
+1 💚 compile 1m 17s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javac 1m 17s the patch passed
+1 💚 compile 1m 9s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 javac 1m 9s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 2s the patch passed
+1 💚 mvnsite 1m 17s the patch passed
+1 💚 javadoc 0m 59s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 1m 37s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 3m 20s the patch passed
+1 💚 shadedclient 41m 25s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 259m 51s /patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs in the patch passed.
+1 💚 asflicense 0m 45s The patch does not generate ASF License warnings.
417m 10s
Reason Tests
Failed junit tests hadoop.hdfs.protocol.datatransfer.sasl.TestSaslDataTransfer
hadoop.hdfs.TestMultipleNNPortQOP
hadoop.hdfs.server.balancer.TestBalancer
hadoop.hdfs.server.balancer.TestBalancerWithSaslDataTransfer
hadoop.hdfs.server.mover.TestMover
hadoop.hdfs.server.sps.TestExternalStoragePolicySatisfier
hadoop.hdfs.TestParallelShortCircuitReadUnCached
hadoop.hdfs.TestBlockTokenWrappingQOP
hadoop.hdfs.server.balancer.TestBalancerWithEncryptedTransfer
hadoop.hdfs.TestSecureEncryptionZoneWithKMS
hadoop.hdfs.protocol.datatransfer.sasl.TestSaslDataTransferExpiredBlockToken
hadoop.metrics2.sink.TestRollingFileSystemSinkWithSecureHdfs
hadoop.hdfs.TestEncryptedTransfer
hadoop.hdfs.TestTrashWithSecureEncryptionZones
Subsystem Report/Notes
Docker ClientAPI=1.46 ServerAPI=1.46 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6951/2/artifact/out/Dockerfile
GITHUB PR #6951
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 0291cf6eaca4 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 69ebdf6
Default Java Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6951/2/testReport/
Max. process+thread count 2958 (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-6951/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 6m 36s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 33m 6s trunk passed
+1 💚 compile 0m 40s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 compile 0m 37s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 checkstyle 0m 36s trunk passed
+1 💚 mvnsite 0m 45s trunk passed
+1 💚 javadoc 0m 40s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 1m 5s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 1m 41s trunk passed
+1 💚 shadedclient 20m 37s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 35s the patch passed
+1 💚 compile 0m 37s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javac 0m 37s the patch passed
+1 💚 compile 0m 32s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 javac 0m 32s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 29s the patch passed
+1 💚 mvnsite 0m 36s the patch passed
+1 💚 javadoc 0m 31s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 1m 4s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 1m 44s the patch passed
+1 💚 shadedclient 20m 59s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 191m 38s hadoop-hdfs in the patch passed.
+1 💚 asflicense 0m 29s The patch does not generate ASF License warnings.
285m 0s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6951/3/artifact/out/Dockerfile
GITHUB PR #6951
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 03f89e6b35ac 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 30bf42d
Default Java Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6951/3/testReport/
Max. process+thread count 4302 (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-6951/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

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.

LGTM. +1.

@Hexiaoqiao Hexiaoqiao changed the title HADOOP-19218 Update TestFSNamesystemLockReport to exclude hostname resolution from regex (ADDENDUM) HADOOP-19218. Addendum. Update TestFSNamesystemLockReport to exclude hostname resolution from regex. Jul 23, 2024
@Hexiaoqiao Hexiaoqiao merged commit e000cbf into apache:trunk Jul 23, 2024
4 checks passed
Hexiaoqiao pushed a commit that referenced this pull request Jul 23, 2024
…hostname resolution from regex. (#6951). Contributed by Viraj Jasani.

Signed-off-by: He Xiaoqiao <[email protected]>
(cherry picked from commit e000cbf)
@Hexiaoqiao
Copy link
Contributor

Committed to trunk and branch-3.4. Thanks @virajjasani .

KeeProMise pushed a commit to KeeProMise/hadoop that referenced this pull request Sep 9, 2024
…hostname resolution from regex. (apache#6951). Contributed by Viraj Jasani.

Signed-off-by: He Xiaoqiao <[email protected]>
Hexiaoqiao pushed a commit to Hexiaoqiao/hadoop that referenced this pull request Sep 12, 2024
…hostname resolution from regex. (apache#6951). Contributed by Viraj Jasani.

Signed-off-by: He Xiaoqiao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants