[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 <timothy65535@163.com>
Co-authored-by: root <root@XTZJ-20211013DV.localdomain>
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
timothy65535 2021-10-29 17:22:53 +08:00 committed by Cheng Pan
parent f40f630faa
commit 0724f444c5
No known key found for this signature in database
GPG Key ID: 8001952629BCC75D
4 changed files with 4 additions and 5 deletions

View File

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

View File

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

View File

@ -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] = {

View File

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