You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/10/29 10:41:55 UTC
[incubator-kyuubi] branch branch-1.6 updated: [KYUUBI #3711] PlanOnly should output engine logs to log files
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-1.6
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/branch-1.6 by this push:
new 91557fe4b [KYUUBI #3711] PlanOnly should output engine logs to log files
91557fe4b is described below
commit 91557fe4b36149ac26a5876c4a0ae4620d565dff
Author: Yikf <yi...@gmail.com>
AuthorDate: Sat Oct 29 10:41:37 2022 +0000
[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 <yi...@gmail.com>
Signed-off-by: Cheng Pan <ch...@apache.org>
(cherry picked from commit b8b9a2123dec1c24a1e5c44331e1069f135be15a)
Signed-off-by: Cheng Pan <ch...@apache.org>
---
.../org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala | 5 +++++
.../org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala
index 73cd49f47..e702551f5 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala
@@ -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)
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala
index 0839daf24..f4ea98c2a 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala
@@ -52,6 +52,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) {