This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-1.9
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/branch-1.9 by this push:
new 6c3d7dff3 [KYUUBI #6531] Fix SPARK-EngineTab stop/gracefulstop not work
6c3d7dff3 is described below
commit 6c3d7dff37560e18f758388d8b25579c053b7bbf
Author: promising-forever <[email protected]>
AuthorDate: Fri Jul 12 17:25:27 2024 +0800
[KYUUBI #6531] Fix SPARK-EngineTab stop/gracefulstop not work
# :mag: Description
## Issue References ๐
This pull request fixes #6531
## Describe Your Solution ๐ง
Fix SPARK-EngineTab stop/gracefulstop not work
## Types of changes :bookmark:
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Test Plan ๐งช
#### Behavior Without This Pull Request :coffin:
#### Behavior With This Pull Request :tada:
#### Related Unit Tests
---
# Checklist ๐
- [ ] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
**Be nice. Be informative.**
Closes #6533 from promising-forever/patch-1.
Closes #6531
66be0fdfd [promising-forever] [KYUUBI #6531] Fix SPARK-EngineTab
stop/gracefulstop not work
Authored-by: promising-forever
<[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit 8e84c2a72f281f91f70058adb6163e965818f82d)
Signed-off-by: Cheng Pan <[email protected]>
---
.../main/scala/org/apache/spark/ui/EngineTab.scala | 35 ++++++++++++----------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EngineTab.scala
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EngineTab.scala
index 5c031f943..0afcb5fec 100644
---
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EngineTab.scala
+++
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EngineTab.scala
@@ -105,24 +105,26 @@ case class EngineTab(
.buildChecked(ui)
if (SPARK_ENGINE_RUNTIME_VERSION >= "4.0") {
- attachHandlerMethod.invoke {
- val createRedirectHandlerMethod =
DynMethods.builder("createRedirectHandler")
- .impl(
- JettyUtils.getClass,
- classOf[String],
- classOf[String],
- classOf[jakarta.servlet.http.HttpServletRequest => Unit],
- classOf[String],
- classOf[Set[String]])
- .buildChecked(JettyUtils)
+ val createRedirectHandlerMethod =
DynMethods.builder("createRedirectHandler")
+ .impl(
+ JettyUtils.getClass,
+ classOf[String],
+ classOf[String],
+ classOf[jakarta.servlet.http.HttpServletRequest => Unit],
+ classOf[String],
+ classOf[Set[String]])
+ .buildChecked(JettyUtils)
+ attachHandlerMethod.invoke {
val killHandler =
(_: jakarta.servlet.http.HttpServletRequest) => handleKill()
- val gracefulKillHandler =
- (_: jakarta.servlet.http.HttpServletRequest) =>
handleGracefulKill()
-
createRedirectHandlerMethod
.invoke("/kyuubi/stop", "/kyuubi", killHandler, "", Set("GET",
"POST"))
+ }
+
+ attachHandlerMethod.invoke {
+ val gracefulKillHandler =
+ (_: jakarta.servlet.http.HttpServletRequest) =>
handleGracefulKill()
createRedirectHandlerMethod
.invoke("/kyuubi/gracefulstop", "/kyuubi", gracefulKillHandler,
"", Set("GET", "POST"))
}
@@ -140,11 +142,14 @@ case class EngineTab(
attachHandlerMethod.invoke {
val killHandler =
(_: javax.servlet.http.HttpServletRequest) => handleKill()
- val gracefulKillHandler =
- (_: javax.servlet.http.HttpServletRequest) => handleGracefulKill()
createRedirectHandlerMethod
.invoke("/kyuubi/stop", "/kyuubi", killHandler, "", Set("GET",
"POST"))
+ }
+
+ attachHandlerMethod.invoke {
+ val gracefulKillHandler =
+ (_: javax.servlet.http.HttpServletRequest) => handleGracefulKill()
createRedirectHandlerMethod
.invoke("/kyuubi/gracefulstop", "/kyuubi", gracefulKillHandler,
"", Set("GET", "POST"))
}