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

YARN-11287. Fix NoClassDefFoundError after YARN-10793(#4603) #4828

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

slfan1989
Copy link
Contributor

@slfan1989 slfan1989 commented Aug 30, 2022

JIRA: YARN-11287. Fix NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory After YARN-10793(#4603).

After executing the yarn-project global unit test, I found the following error:

ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test (default-test) on project hadoop-yarn-server-applicationhistoryservice: Execution default-test of goal org.apache.maven.plugins:maven-surefire-
plugin:3.0.0-M1:test failed: java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory: org.junit.platform.launcher.core.LauncherFactory -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :hadoop-yarn-server-applicationhistoryservice 

@slfan1989 slfan1989 changed the title YARN-11287. Fix NoClassDefFoundError After YARN-10793(https://github.com/apache/hadoop/pull/4603) YARN-11287. Fix NoClassDefFoundError After YARN-10793(#4603) Aug 30, 2022
@slfan1989
Copy link
Contributor Author

slfan1989 commented Aug 30, 2022

@ashutoshcipher @aajisaka I found that after YARN-10793 Upgrade Junit from 4 to 5 in hadoop-yarn-server-applicationhistoryservice, Junit Test under the entire module of Yarn will have an exception, java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory : org.junit.platform.launcher.core.LauncherFactory.

-1 ❌ unit 36m 10s hadoop-yarn in the patch failed.

I import a dependency in the hadoop-yarn-server-applicationhistoryservice module.

The compilation report is as follows
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4817/5/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn.txt

I think when upgrading junit test 4 to 5, we should consider global unit tests.

I confirmed that this modification is possible.

+1 💚 | unit | 237m 49s |   | hadoop-yarn in the patch passed.

Can you help review the code, thank you very much!

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 3s 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.
+0 🆗 xmllint 0m 0s xmllint 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 42m 7s trunk passed
+1 💚 compile 0m 40s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 compile 0m 37s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 mvnsite 0m 43s trunk passed
+1 💚 javadoc 0m 45s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 0m 33s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 shadedclient 69m 35s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 32s the patch passed
+1 💚 compile 0m 35s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javac 0m 35s the patch passed
+1 💚 compile 0m 33s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 0m 33s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 34s the patch passed
+1 💚 javadoc 0m 29s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 0m 28s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 shadedclient 27m 4s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 4m 36s hadoop-yarn-server-applicationhistoryservice in the patch passed.
+1 💚 asflicense 0m 40s The patch does not generate ASF License warnings.
106m 38s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4828/1/artifact/out/Dockerfile
GITHUB PR #4828
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux 7b53dd05640d 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 9f8f718
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /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-4828/1/testReport/
Max. process+thread count 1801 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4828/1/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@aajisaka
Copy link
Member

+1 for the change. Thank you @slfan1989

I think when upgrading junit test 4 to 5, we should consider global unit tests.

Qbt job daily runs global unit tests, but I couldn't find any issue https://ci-hadoop.apache.org/job/hadoop-qbt-trunk-java8-linux-x86_64/967/artifact/out/

Probably qbt didn't run test on hadoop-yarn because the module itself has no Java tests.

@aajisaka aajisaka merged commit 8a47ed6 into apache:trunk Aug 30, 2022
@aajisaka aajisaka changed the title YARN-11287. Fix NoClassDefFoundError After YARN-10793(#4603) YARN-11287. Fix NoClassDefFoundError after YARN-10793(#4603) Aug 30, 2022
@slfan1989
Copy link
Contributor Author

@aajisaka @ashutoshcipher Thank you very much for helping to review the code!

HarshitGupta11 pushed a commit to HarshitGupta11/hadoop that referenced this pull request Nov 28, 2022
…e/LauncherFactory after YARN-10793 (apache#4828)

Co-authored-by: slfan1989 <louj1988@@>
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
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.

3 participants