This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 0724f44 [KYUUBI #1310] Remove redundant store parameter
0724f44 is described below
commit 0724f444c587937045bcd3e92fd768a7fa9c3e00
Author: timothy65535 <[email protected]>
AuthorDate: Fri Oct 29 17:22:53 2021 +0800
[KYUUBI #1310] Remove redundant store parameter
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
The `store` is a member variable of `SparkSQLEngine`, we can get it from
`SparkSQLEngine` directly.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run
test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests)
locally before make a pull request
Closes #1310 from timothy65535/patch.
Closes #1310
1a97a1c7 [root] trigger rebuild
eae0fe34 [timothy65535] Remove redundant parameter
Lead-authored-by: timothy65535 <[email protected]>
Co-authored-by: root <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.../src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala | 2 +-
.../src/main/scala/org/apache/spark/kyuubi/ui/EnginePage.scala | 2 +-
.../src/main/scala/org/apache/spark/kyuubi/ui/EngineSessionPage.scala | 2 +-
.../src/main/scala/org/apache/spark/kyuubi/ui/EngineTab.scala | 3 +--
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
index 223e54a..57b4aa5 100644
---
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
+++
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
@@ -134,7 +134,7 @@ object SparkSQLEngine extends Logging {
}
try {
engine.start()
- EngineTab(engine, store)
+ EngineTab(engine)
val event = EngineEvent(engine)
info(event)
EventLoggingService.onEvent(event)
diff --git
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EnginePage.scala
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EnginePage.scala
index 555c6a3..117b6b2 100644
---
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EnginePage.scala
+++
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EnginePage.scala
@@ -35,7 +35,7 @@ import org.apache.kyuubi.engine.spark.events.SessionEvent
import org.apache.kyuubi.engine.spark.events.SparkStatementEvent
case class EnginePage(parent: EngineTab) extends WebUIPage("") {
- private val store = parent.store
+ private val store = parent.engine.store
override def render(request: HttpServletRequest): Seq[Node] = {
val content =
diff --git
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EngineSessionPage.scala
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EngineSessionPage.scala
index f2eaf99..0a532a3 100644
---
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EngineSessionPage.scala
+++
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EngineSessionPage.scala
@@ -30,7 +30,7 @@ import org.apache.spark.util.Utils
/** Page for Spark Web UI that shows statistics of jobs running in the engine
server */
case class EngineSessionPage(parent: EngineTab)
extends WebUIPage("session") with Logging {
- val store = parent.store
+ val store = parent.engine.store
/** Render the page */
def render(request: HttpServletRequest): Seq[Node] = {
diff --git
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EngineTab.scala
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EngineTab.scala
index 5ccbe68..4feae3a 100644
---
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EngineTab.scala
+++
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/ui/EngineTab.scala
@@ -25,13 +25,12 @@ import scala.util.control.NonFatal
import org.apache.kyuubi.{Logging, Utils}
import org.apache.kyuubi.config.KyuubiConf
import org.apache.kyuubi.engine.spark.SparkSQLEngine
-import org.apache.kyuubi.engine.spark.events.EngineEventsStore
import org.apache.kyuubi.service.ServiceState
/**
* Note that [[SparkUITab]] is private for Spark
*/
-case class EngineTab(engine: SparkSQLEngine, store: EngineEventsStore)
+case class EngineTab(engine: SparkSQLEngine)
extends SparkUITab(engine.spark.sparkContext.ui.orNull, "kyuubi") with
Logging {
override val name: String = "Kyuubi Query Engine"