Skip to content

Conversation

@slfan1989
Copy link
Contributor

@slfan1989 slfan1989 commented Mar 1, 2025

Description of PR

JIRA: YARN-11782. [Federation] Fix incorrect error messages and improve failure handling.

While upgrading the JUnit tests for the yarn router module, I encountered some test failures. One of the errors was due to incorrect error messages. I will fix the incorrect error messages in this JIRA.

How was this patch tested?

Unit tests are not required.

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?

@slfan1989
Copy link
Contributor Author

@ayushtkn @TaoYang526 Could you please review this PR? Thank you very much! This is a minor issue. When the request is null, we should provide an error message, and the content of the error message should be consistent with the method name.

Copy link
Contributor

@cnauroth cnauroth left a comment

Choose a reason for hiding this comment

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

+1 pending successful pre-submit.

The changes make sense to me, but I'm curious to know why the JUnit 5 upgrade revealed this problem. I'd expect if there was an assertion on these test messages, then they would have failed in JUnit 4 too.

@slfan1989
Copy link
Contributor Author

+1 pending successful pre-submit.

The changes make sense to me, but I'm curious to know why the JUnit 5 upgrade revealed this problem. I'd expect if there was an assertion on these test messages, then they would have failed in JUnit 4 too.

@cnauroth Thank you very much for reviewing the code! I was able to reproduce the issue by running the unit tests with Junit4 locally, but Yetus did not detect it. For a long time, the YARN module used a mix of Junit4 and Junit5, and this mixed approach may have caused the maven-surefire-plugin to not filter out the problematic unit tests. However, once we fully upgraded to Junit5, the exceptions in the unit tests were exposed.

Copy link
Contributor

@zhtttylz zhtttylz left a comment

Choose a reason for hiding this comment

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

+1,LGTM @slfan1989

@cnauroth
Copy link
Contributor

cnauroth commented Mar 2, 2025

+1 pending successful pre-submit.
The changes make sense to me, but I'm curious to know why the JUnit 5 upgrade revealed this problem. I'd expect if there was an assertion on these test messages, then they would have failed in JUnit 4 too.

@cnauroth Thank you very much for reviewing the code! I was able to reproduce the issue by running the unit tests with Junit4 locally, but Yetus did not detect it. For a long time, the YARN module used a mix of Junit4 and Junit5, and this mixed approach may have caused the maven-surefire-plugin to not filter out the problematic unit tests. However, once we fully upgraded to Junit5, the exceptions in the unit tests were exposed.

That's very interesting! Do you think it indicates a Yetus bug? If so, please file a bug against that project.

To be clear, I am still +1 on this patch, and thank you!

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

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

LGTM

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 27m 29s 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 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 41m 41s trunk passed
+1 💚 compile 0m 33s trunk passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04
+1 💚 compile 0m 29s trunk passed with JDK Private Build-1.8.0_442-8u442-b06us1-0ubuntu120.04-b06
+1 💚 checkstyle 0m 28s trunk passed
+1 💚 mvnsite 0m 33s trunk passed
+1 💚 javadoc 0m 35s trunk passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 0m 28s trunk passed with JDK Private Build-1.8.0_442-8u442-b06us1-0ubuntu120.04-b06
+1 💚 spotbugs 0m 57s trunk passed
+1 💚 shadedclient 38m 54s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 23s the patch passed
+1 💚 compile 0m 24s the patch passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04
+1 💚 javac 0m 24s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Private Build-1.8.0_442-8u442-b06us1-0ubuntu120.04-b06
+1 💚 javac 0m 21s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 17s the patch passed
+1 💚 mvnsite 0m 24s the patch passed
+1 💚 javadoc 0m 23s the patch passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 0m 20s the patch passed with JDK Private Build-1.8.0_442-8u442-b06us1-0ubuntu120.04-b06
+1 💚 spotbugs 0m 55s the patch passed
+1 💚 shadedclient 38m 40s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 28s hadoop-yarn-server-router in the patch passed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
157m 20s
Subsystem Report/Notes
Docker ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7449/1/artifact/out/Dockerfile
GITHUB PR #7449
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 8d0d5b18621b 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / f12a588
Default Java Private Build-1.8.0_442-8u442-b06us1-0ubuntu120.04-b06
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_442-8u442-b06us1-0ubuntu120.04-b06
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7449/1/testReport/
Max. process+thread count 529 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7449/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.

@slfan1989
Copy link
Contributor Author

@cnauroth @ayushtkn @zhtttylz Thanks for the review! Merged into trunk.

@slfan1989 slfan1989 merged commit 4b9e1dc into apache:trunk Mar 3, 2025
1 of 3 checks passed
YanivKunda pushed a commit to YanivKunda/hadoop that referenced this pull request Mar 23, 2025
…lure handling. (apache#7449)

Co-authored-by: Ayush Saxena <ayushsaxena@apache.org>
Co-authored-by: Chris Nauroth <cnauroth@apache.org>
Co-authored-by: Hualong Zhang <hualong.z@hotmail.com>
Reviewed-by: Ayush Saxena <ayushsaxena@apache.org>
Reviewed-by: Chris Nauroth <cnauroth@apache.org>
Reviewed-by: Hualong Zhang <hualong.z@hotmail.com>
Signed-off-by: Shilun Fan <slfan1989@apache.org>
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.

5 participants