Skip to content

TEZ-4561: Improve reported exception when DAGAppMaster is shutting down. - #365

Merged
ayushtkn merged 6 commits into
apache:masterfrom
ayushtkn:TEZ-4561
Sep 3, 2024
Merged

TEZ-4561: Improve reported exception when DAGAppMaster is shutting down.#365
ayushtkn merged 6 commits into
apache:masterfrom
ayushtkn:TEZ-4561

Conversation

@ayushtkn

Copy link
Copy Markdown
Member

No description provided.

@tez-yetus

This comment was marked as outdated.

@ayushtkn

Copy link
Copy Markdown
MemberAuthor

I think we can live with this checkstyle warning, creating an accessor method looks like an overkill to me

@ayushtkn

Copy link
Copy Markdown
MemberAuthor

Added a test.
Sharing the output of exception
When State is INITED

org.apache.tez.dag.api.TezUncheckedException: Cannot get ApplicationACLs before all services have started, The current service state is INITED

When State is STOPPED

org.apache.tez.dag.api.TezUncheckedException: Cannot get ApplicationACLs before all services have started, The current service state is STOPPED. The shutdown hook started at Fri Aug 16 16:08:09 IST 2024

@tez-yetus

This comment was marked as outdated.

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 30sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚mvninstall16m 24smaster passed
+1 💚compile0m 43smaster passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚compile0m 38smaster passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+1 💚checkstyle1m 30smaster passed
+1 💚javadoc0m 37smaster passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚javadoc0m 21smaster passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+0 🆗spotbugs1m 51sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs1m 48smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 28sthe patch passed
+1 💚compile0m 31sthe patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚javac0m 31sthe patch passed
+1 💚compile0m 26sthe patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+1 💚javac0m 26sthe patch passed
-0 ⚠️checkstyle0m 21stez-dag: The patch generated 1 new + 57 unchanged - 3 fixed = 58 total (was 60)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 10sthe patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚javadoc0m 10sthe patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+1 💚findbugs1m 14sthe patch passed
_ Other Tests _
+1 💚unit5m 8stez-dag in the patch passed.
+1 💚asflicense0m 17sThe patch does not generate ASF License warnings.
32m 16s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/3/artifact/out/Dockerfile
GITHUB PR#365
JIRA IssueTEZ-4561
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 06ebcb967f9f 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 toolmaven
Personalitypersonality/tez.sh
git revisionmaster / cd6ceec
Default JavaPrivate Build-1.8.0_422-8u422-b05-1~22.04-b05
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~22.04-b05
checkstylehttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/3/artifact/out/diff-checkstyle-tez-dag.txt
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/3/testReport/
Max. process+thread count222 (vs. ulimit of 5500)
modulesC: tez-dag U: tez-dag
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/3/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.


private String getShutdownTimeString() {
if (shutdownHandler != null && shutdownHandler.shutdownTime != null) {
return ". The shutdown hook started at " + shutdownHandler.shutdownTime;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's strange that this separate string generation method takes care of the closing point of the previous sentence, I believe that should go back to getApplicationACLs

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I moved the "." back to the {{getApplicationACLs}}

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec27m 8sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚mvninstall16m 59smaster passed
+1 💚compile0m 44smaster passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚compile0m 39smaster passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+1 💚checkstyle1m 31smaster passed
+1 💚javadoc0m 36smaster passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚javadoc0m 23smaster passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+0 🆗spotbugs1m 53sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs1m 51smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 28sthe patch passed
+1 💚compile0m 31sthe patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚javac0m 31sthe patch passed
+1 💚compile0m 27sthe patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+1 💚javac0m 27sthe patch passed
-0 ⚠️checkstyle0m 20stez-dag: The patch generated 1 new + 57 unchanged - 3 fixed = 58 total (was 60)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 10sthe patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚javadoc0m 10sthe patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+1 💚findbugs1m 15sthe patch passed
_ Other Tests _
+1 💚unit5m 6stez-dag in the patch passed.
+1 💚asflicense0m 17sThe patch does not generate ASF License warnings.
59m 40s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/4/artifact/out/Dockerfile
GITHUB PR#365
JIRA IssueTEZ-4561
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 249eda176fba 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 174d4e3
Default JavaPrivate Build-1.8.0_422-8u422-b05-1~22.04-b05
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~22.04-b05
checkstylehttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/4/artifact/out/diff-checkstyle-tez-dag.txt
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/4/testReport/
Max. process+thread count205 (vs. ulimit of 5500)
modulesC: tez-dag U: tez-dag
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/4/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@abstractdog

Copy link
Copy Markdown
Contributor

nit: what about changing shutdownTime to private?
not necessarily because of the checkstyle warning (private + accessor methods), but instead to keep it inline with other fields of DAGAppMasterShutdownHandler, like:

 private AtomicBoolean shutdownHandled = new AtomicBoolean(false);
private long sleepTimeBeforeExit = TezConstants.TEZ_DAG_SLEEP_TIME_BEFORE_EXIT;

I guess the usage scope of those are similar

@tez-yetus

This comment was marked as outdated.

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 34sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 1sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚mvninstall19m 8smaster passed
+1 💚compile0m 45smaster passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚compile0m 40smaster passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+1 💚checkstyle1m 42smaster passed
+1 💚javadoc0m 40smaster passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚javadoc0m 23smaster passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+0 🆗spotbugs2m 0sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs1m 58smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 27sthe patch passed
+1 💚compile0m 32sthe patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚javac0m 32sthe patch passed
+1 💚compile0m 26sthe patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+1 💚javac0m 26sthe patch passed
+1 💚checkstyle0m 21stez-dag: The patch generated 0 new + 57 unchanged - 3 fixed = 57 total (was 60)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 10sthe patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04
+1 💚javadoc0m 9sthe patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~22.04-b05
+1 💚findbugs1m 14sthe patch passed
_ Other Tests _
+1 💚unit5m 7stez-dag in the patch passed.
+1 💚asflicense0m 19sThe patch does not generate ASF License warnings.
35m 42s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/6/artifact/out/Dockerfile
GITHUB PR#365
JIRA IssueTEZ-4561
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 125dfebe230f 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 174d4e3
Default JavaPrivate Build-1.8.0_422-8u422-b05-1~22.04-b05
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu322.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~22.04-b05
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/6/testReport/
Max. process+thread count233 (vs. ulimit of 5500)
modulesC: tez-dag U: tez-dag
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-365/6/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ayushtkn

Copy link
Copy Markdown
MemberAuthor

@abstractdog I have changed the variable to private & used setter & getter, there was some FindBugs warning, which I have dodged, lemme know if things look good

@abstractdog
abstractdog self-requested a review September 3, 2024 09:57

@abstractdogabstractdog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@ayushtkn
ayushtkn merged commit 76490d4 into apache:masterSep 3, 2024
Sign up for freeto 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

@ayushtkn@tez-yetus@abstractdog