From 81d9a8f1ca2cf453301dc7d2a214ea652583dc4b Mon Sep 17 00:00:00 2001 From: zwangsheng <2213335496@qq.com> Date: Mon, 31 Oct 2022 16:54:02 +0800 Subject: [PATCH] [KYUUBI #3725] [BATCH] Improve submit batch job print engine builder command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### _Why are the changes needed?_ old version ```log 2022-10-31 11:37:49 [INFO] [KyuubiSessionManager-exec-pool: Thread-174] org.apache.kyuubi.operation.BatchJobSubmission#59 - Submitting SPARK batch[5515091e-9eac-4466-a547-be4ba1352b6a] job: /opt/spark/bin/spark-submit \ --class org.apache.spark.examples.SparkPi \ --conf spark.jars=xxx/spark-examples_2.12-3.3.1.jar \ --conf spark.kubernetes.driver.label.kyuubi-unique-tag=5515091e-9eac-4466-a547-be4ba1352b6a \ --conf spark.app.name=xxx-k8s测试 \ --conf spark.executorEnv.SPARK_USER_NAME=xxx \ --conf spark.kubernetes.driverEnv.SPARK_USER_NAME=xxx \ --conf spark.hive.server2.proxy.user=xxx \ --conf spark.kyuubi.client.ipAddress=xxx \ --conf spark.kubernetes.driverEnv.SPARK_USER_NAME=xxx \ --conf spark.executorEnv.SPARK_USER_NAME=xxx \ --proxy-user xxx xxx/spark-examples_2.12-3.3.1.jar 1000 ``` new version ```log 2022-10-31 11:37:49 [INFO] [KyuubiSessionManager-exec-pool: Thread-174] org.apache.kyuubi.operation.BatchJobSubmission#59 - Submitting SPARK batch[5515091e-9eac-4466-a547-be4ba1352b6a] job: /opt/spark/bin/spark-submit \ --class org.apache.spark.examples.SparkPi \ --conf spark.jars=xxx/spark-examples_2.12-3.3.1.jar \ --conf spark.kubernetes.driver.label.kyuubi-unique-tag=5515091e-9eac-4466-a547-be4ba1352b6a \ --conf spark.app.name=xxx-k8s测试 \ --conf spark.executorEnv.SPARK_USER_NAME=xxx \ --conf spark.kubernetes.driverEnv.SPARK_USER_NAME=xxx \ --conf spark.hive.server2.proxy.user=xxx \ --conf spark.kyuubi.client.ipAddress=xxx \ --conf spark.kubernetes.driverEnv.SPARK_USER_NAME=xxx \ --conf spark.executorEnv.SPARK_USER_NAME=xxx \ --proxy-user xxx xxx/spark-examples_2.12-3.3.1.jar 1000 ``` ### _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 #3725 from zwangsheng/improve/batch_log_builder. Closes #3725 87f8bad1 [zwangsheng] improve Authored-by: zwangsheng <2213335496@qq.com> Signed-off-by: hongdongdong --- .../scala/org/apache/kyuubi/operation/BatchJobSubmission.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala index d13125414..1dfef22b0 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala @@ -196,7 +196,7 @@ class BatchJobSubmission( private def submitAndMonitorBatchJob(): Unit = { var appStatusFirstUpdated = false try { - info(s"Submitting $batchType batch[$batchId] job: $builder") + info(s"Submitting $batchType batch[$batchId] job:\n$builder") val process = builder.start applicationInfo = currentApplicationInfo while (!applicationFailed(applicationInfo) && process.isAlive) {