Skip to content

Commit

Permalink
[KYUUBI #3949] Print the simple batch report if no log fetch to preve…
Browse files Browse the repository at this point in the history
…nt 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

8fbba0f [fwang12] keep same format with app state
ea5597f [fwang12] print appId
d6d839c [fwang12] Print the simple batch report if no log fetch
bb908b1 [fwang12] log batch state if there is no log

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
  • Loading branch information
turboFei committed Dec 9, 2022
1 parent 083fd38 commit 7aa3445
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
Expand Down

0 comments on commit 7aa3445

Please sign in to comment.