You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by fe...@apache.org on 2022/12/09 14:24:08 UTC

[incubator-kyuubi] branch branch-1.6 updated: [KYUUBI #3949] Print the simple batch report if no log fetch to prevent misunderstand

This is an automated email from the ASF dual-hosted git repository.

feiwang 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 2fdd9cc71 [KYUUBI #3949] Print the simple batch report if no log fetch to prevent misunderstand
2fdd9cc71 is described below

commit 2fdd9cc71f10257fc006bdcb7b2c80ba07d6097b
Author: fwang12 <fw...@ebay.com>
AuthorDate: Fri Dec 9 22:23:49 2022 +0800

    [KYUUBI #3949] Print the simple batch report if no log fetch to prevent misunderstand
    
    ### _Why are the changes needed?_
    
    With yarn-cluster mode, if `spark.yarn.submit.waitAppCompletion` is false and `kyuubi-ctl` wait completion is true, we need still print some simple batch report to prevent misunderstand.
    
    The batch report format refer spark-submit log.
    ```
    Application report for <ApplicationID> (state: RUNNING)
    ```
    
    ### _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
    
    - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #3949 from turboFei/ctl_log.
    
    Closes #3949
    
    8fbba0f8 [fwang12] keep same format with app state
    ea5597fa [fwang12] print appId
    d6d839c1 [fwang12] Print the simple batch report if no log fetch
    bb908b1b [fwang12] log batch state if there is no log
    
    Authored-by: fwang12 <fw...@ebay.com>
    Signed-off-by: fwang12 <fw...@ebay.com>
    (cherry picked from commit 7aa344540590deb50bd2df9cbcc257b87fa7db53)
    Signed-off-by: fwang12 <fw...@ebay.com>
---
 .../main/scala/org/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala b/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala
index eb5fd49d5..164523d71 100644
--- a/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala
+++ b/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala
@@ -81,6 +81,12 @@ class LogBatchCommand(
           }
 
           if (!done) {
+            if (!Option(log).exists(_.getRowCount > 0)) {
+              Option(batch).foreach { batch =>
+                info(s"Application report for ${batch.getAppId} (state: ${batch.getAppState})," +
+                  s" batch id: $batchId (state: ${batch.getState})")
+              }
+            }
             Thread.sleep(conf.get(CTL_BATCH_LOG_QUERY_INTERVAL))
           }
         }