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:23:59 UTC
[incubator-kyuubi] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 7aa344540 [KYUUBI #3949] Print the simple batch report if no log fetch to prevent misunderstand
7aa344540 is described below
commit 7aa344540590deb50bd2df9cbcc257b87fa7db53
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>
---
.../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 0ac209329..cc051629d 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))
}
}