Skip to content

TEZ-4743: Refactor ProfileServlet and ProfileOutputServlet to use standard response.sendError API - #527

Merged
abstractdog merged 1 commit into
apache:masterfrom
Aggarwal-Raghav:TEZ-4743
Jul 27, 2026
Merged

TEZ-4743: Refactor ProfileServlet and ProfileOutputServlet to use standard response.sendError API#527
abstractdog merged 1 commit into
apache:masterfrom
Aggarwal-Raghav:TEZ-4743

Conversation

@Aggarwal-Raghav

Copy link
Copy Markdown
Contributor
  • Replaced manual error writing with the standard, built-in response.sendError(...) API in both servlets
  • Removed the obsolete writeMessage() and PrintStream logic
  • If the ?file= parameter is missing, the servlet now correctly returns a 400 Bad Request instead of incorrectly returning a 200 OK success code

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec4m 15sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe 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.
_ master Compile Tests _
+1 💚mvninstall6m 16smaster passed
-1 ❌compile2m 49s/branch-compile-root.txtroot in master failed.
-0 ⚠️checkstyle0m 27s/buildtool-branch-checkstyle-tez-common.txtThe patch fails to run checkstyle in tez-common
+1 💚javadoc0m 31smaster passed
+0 🆗spotbugs1m 4stez-common in master has 13 extant spotbugs warnings.
_ Patch Compile Tests _
-1 ❌mvninstall1m 17s/patch-mvninstall-root.txtroot in the patch failed.
+1 💚codespell1m 59sNo new issues.
-1 ❌compile0m 22s/patch-compile-root.txtroot in the patch failed.
-1 ❌javac0m 22s/patch-compile-root.txtroot in the patch failed.
+1 💚blanks0m 0sThe patch has no blanks issues.
-0 ⚠️checkstyle0m 35s/buildtool-patch-checkstyle-tez-common.txtThe patch fails to run checkstyle in tez-common
-1 ❌javadoc0m 31s/patch-javadoc-tez-common.txttez-common in the patch failed.
-1 ❌spotbugs0m 44s/patch-spotbugs-tez-common.txttez-common in the patch failed.
_ Other Tests _
-1 ❌unit0m 14s/patch-unit-root.txtroot in the patch failed.
+0 🆗asflicense0m 16sASF License check generated no output?
23m 8s
SubsystemReport/Notes
DockerClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/1/artifact/out/Dockerfile
Optional Testsdupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
unameLinux c478e300147c 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitytez-personality.sh
git revisionmaster / b9d8c0f
Default JavaEclipse Adoptium-21.0.11+10-LTS
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/1/testReport/
Max. process+thread count116 (vs. ulimit of 5500)
modulesC: tez-common U: tez-common
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/1/console
versionsgit=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@abstractdog

Copy link
Copy Markdown
Contributor

this looks good so far 👍 assuming a rebase

@Aggarwal-Raghav

Copy link
Copy Markdown
ContributorAuthor

Will do in an hour

@Aggarwal-Raghav
Aggarwal-Raghavforce-pushed the TEZ-4743 branch 2 times, most recently from fe925d5 to 811deb4CompareJuly 23, 2026 05:34
@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 11sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+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 _
+0 🆗mvndep0m 36sMaven dependency ordering for branch
+1 💚mvninstall4m 41smaster passed
+1 💚compile4m 2smaster passed
+1 💚checkstyle1m 0smaster passed
+1 💚javadoc0m 55smaster passed
+0 🆗spotbugs0m 53stez-common in master has 13 extant spotbugs warnings.
+0 🆗spotbugs0m 51stez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall3m 47sthe patch passed
+1 💚codespell1m 37sNo new issues.
+1 💚compile4m 3sthe patch passed
+1 💚javac4m 3sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 53sthe patch passed
+1 💚javadoc0m 53sthe patch passed
-1 ❌spotbugs1m 5s/new-spotbugs-tez-common.htmltez-common generated 1 new + 13 unchanged - 0 fixed = 14 total (was 13)
_ Other Tests _
+1 💚unit78m 19sroot in the patch passed.
+1 💚asflicense0m 58sThe patch does not generate ASF License warnings.
107m 51s
ReasonTests
SpotBugsmodule:tez-common
HTTP parameter written to Servlet error page in org.apache.tez.common.web.ProfileOutputServlet.doGet(HttpServletRequest, HttpServletResponse) At ProfileOutputServlet.java:error page in org.apache.tez.common.web.ProfileOutputServlet.doGet(HttpServletRequest, HttpServletResponse) At ProfileOutputServlet.java:[line 61]
SubsystemReport/Notes
DockerClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/3/artifact/out/Dockerfile
Optional Testsdupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
unameLinux 4446ddf0551d 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitytez-personality.sh
git revisionmaster / dd8137f
Default JavaEclipse Adoptium-21.0.11+10-LTS
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/3/testReport/
Max. process+thread count1498 (vs. ulimit of 5500)
modulesC: tez-common tez-tests U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/3/console
versionsgit=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@Aggarwal-Raghav

Copy link
Copy Markdown
ContributorAuthor

There is a delay in github webhooks. I forced pushed to fix the spotbugs vulnerability but its not getting reflected in PR.

@Aggarwal-Raghav
Aggarwal-Raghavforce-pushed the TEZ-4743 branch 2 times, most recently from 811deb4 to 582e485CompareJuly 23, 2026 07:49
@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 11sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+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 _
+0 🆗mvndep0m 33sMaven dependency ordering for branch
+1 💚mvninstall4m 38smaster passed
+1 💚compile4m 1smaster passed
+1 💚checkstyle0m 59smaster passed
+1 💚javadoc0m 55smaster passed
+0 🆗spotbugs0m 53stez-common in master has 13 extant spotbugs warnings.
+0 🆗spotbugs0m 50stez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall3m 42sthe patch passed
+1 💚codespell1m 37sNo new issues.
+1 💚compile4m 3sthe patch passed
+1 💚javac4m 3sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 53sthe patch passed
+1 💚javadoc0m 54sthe patch passed
+1 💚spotbugs2m 5sthe patch passed
_ Other Tests _
-1 ❌unit75m 10s/patch-unit-root.txtroot in the patch passed.
+1 💚asflicense1m 0sThe patch does not generate ASF License warnings.
104m 30s
ReasonTests
Failed junit teststez.dag.app.TestSpeculation
SubsystemReport/Notes
DockerClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/4/artifact/out/Dockerfile
Optional Testsdupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
unameLinux fe54da384fba 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitytez-personality.sh
git revisionmaster / dd8137f
Default JavaEclipse Adoptium-21.0.11+10-LTS
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/4/testReport/
Max. process+thread count2128 (vs. ulimit of 5500)
modulesC: tez-common tez-tests U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/4/console
versionsgit=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@tez-yetus

This comment was marked as outdated.

Comment threadtez-common/src/main/java/org/apache/tez/common/web/ProfileServlet.java Outdated
…ndard response.sendError API
- Replaced manual error writing with the standard, built-in response.sendError(...) API in both servlets
- Removed the obsolete writeMessage() and PrintStream logic
- If the `?file=` parameter is missing, the servlet now correctly returns a 400 Bad Request instead of incorrectly returning a 200 OK success code
@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 12sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+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 _
+0 🆗mvndep0m 36sMaven dependency ordering for branch
+1 💚mvninstall4m 37smaster passed
+1 💚compile4m 6smaster passed
+1 💚checkstyle0m 58smaster passed
+1 💚javadoc0m 57smaster passed
+0 🆗spotbugs0m 53stez-common in master has 13 extant spotbugs warnings.
+0 🆗spotbugs0m 51stez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗mvndep0m 9sMaven dependency ordering for patch
+1 💚mvninstall3m 46sthe patch passed
+1 💚codespell1m 36sNo new issues.
+1 💚compile4m 4sthe patch passed
+1 💚javac4m 4sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 54sthe patch passed
+1 💚javadoc0m 54sthe patch passed
+1 💚spotbugs2m 4sthe patch passed
_ Other Tests _
+1 💚unit73m 42sroot in the patch passed.
+1 💚asflicense1m 0sThe patch does not generate ASF License warnings.
103m 16s
SubsystemReport/Notes
DockerClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/6/artifact/out/Dockerfile
Optional Testsdupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
unameLinux 8f8181295d72 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitytez-personality.sh
git revisionmaster / dd8137f
Default JavaEclipse Adoptium-21.0.11+10-LTS
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/6/testReport/
Max. process+thread count2127 (vs. ulimit of 5500)
modulesC: tez-common tez-tests U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-527/6/console
versionsgit=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@Aggarwal-Raghav

Copy link
Copy Markdown
ContributorAuthor

Addressed review comment @abstractdog

@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.

LGTM

@abstractdog
abstractdog merged commit efab6a1 into apache:masterJul 27, 2026
6 checks passed
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

@Aggarwal-Raghav@tez-yetus@abstractdog