[KYUUBI #3711] PlanOnly should output engine logs to log files
### _Why are the changes needed?_ Fix https://github.com/apache/incubator-kyuubi/issues/3711 PlanOnly should output engine logs to log files so that they can be pulled from the front end. ### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3712 from Yikf/planOnly-log-out. Closes #3711 8469de9a [Yikf] planOnly should output engine logs to log files so that they can be pulled from the front end Authored-by: Yikf <yikaifei1@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
parent
bea8e4f1cb
commit
b8b9a2123d
@ -38,6 +38,11 @@ class PlanOnlyStatement(
|
||||
private val lineSeparator: String = System.lineSeparator()
|
||||
override def getOperationLog: Option[OperationLog] = Option(operationLog)
|
||||
|
||||
override protected def beforeRun(): Unit = {
|
||||
OperationLog.setCurrentOperationLog(operationLog)
|
||||
super.beforeRun()
|
||||
}
|
||||
|
||||
override protected def runInternal(): Unit = {
|
||||
try {
|
||||
val operation = executor.parseStatement(sessionId, statement)
|
||||
|
||||
@ -60,6 +60,11 @@ class PlanOnlyStatement(
|
||||
} else result.schema
|
||||
}
|
||||
|
||||
override protected def beforeRun(): Unit = {
|
||||
OperationLog.setCurrentOperationLog(operationLog)
|
||||
super.beforeRun()
|
||||
}
|
||||
|
||||
override protected def runInternal(): Unit = withLocalProperties {
|
||||
try {
|
||||
SQLConf.withExistingConf(spark.sessionState.conf) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user