Skip to content

Conversation

@LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Jan 23, 2026

What changes were proposed in this pull request?

This PR replaces GzipHandler with CompressionHandler in JettyUtils because GzipHandler has been deprecated and marked with forRemoval = true. The modification follows the deprecation guideline refer to

https://github.com/jetty/jetty.project/blob/e9d4cba5a9d8ed62100bb09480af6fbb39c636cb/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java#L42-L49

/**
 * @deprecated use the new {@code CompressionHandler} available in {@code org.eclipse.jetty.compression:jetty-compression-server}
 *             with your choice of compression implementation (gzip is {@code org.eclipse.jetty.compression:jetty-compression-gzip},
 *             brotli is {@code org.eclipse.jetty.compression:jetty-compression-brotli}, and zstandard is
 *             {@code org.eclipse.jetty.compression:jetty-compression-zstandard})
 */
@Deprecated(since = "12.1.1", forRemoval = true)
public class GzipHandler extends Handler.Wrapper implements GzipFactory

Why are the changes needed?

Cleanup deprecated API usage.

Does this PR introduce any user-facing change?

No

How was this patch tested?

  • Pass Github Actions
  • Manually built a Spark distribution and verified that the UI displays correctly.

Was this patch authored or co-authored using generative AI tooling?

No

@LuciferYang LuciferYang marked this pull request as draft January 23, 2026 03:19
@github-actions
Copy link

github-actions bot commented Jan 23, 2026

JIRA Issue Information

=== Improvement SPARK-55193 ===
Summary: Use CompressionHandler as a replacement for the deprecated GzipHandler in JettyUtils
Assignee: None
Status: Open
Affected: ["4.2.0"]


This comment was automatically generated by GitHub Actions

@LuciferYang LuciferYang changed the title Use CompressionHandler as a replacement for the deprecated GzipHandler in JettyUtils [SPARK-55193][CORE][BUILD] Use CompressionHandler as a replacement for the deprecated GzipHandler in JettyUtils Jan 26, 2026
@github-actions github-actions bot removed the INFRA label Jan 26, 2026
val gzipHandler = new GzipHandler()
gzipHandler.setHandler(handler)
rootHandler.addHandler(gzipHandler)
val compressionHandler = new CompressionHandler()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

CompressionHandler loads org.eclipse.jetty.compression.gzip.GzipCompression via SPI

@LuciferYang LuciferYang marked this pull request as ready for review January 26, 2026 07:49
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.

1 participant