[KYUUBI #1281] [BUG] Prettify error message from engine log.

### _Why are the changes needed?_

Prettify error message from engine log.

### _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.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1316 from jadireddi/1281-prettyify.

Closes #1281

ae0de364 [Jagadesh Adireddi] [KYUUBI #1281] [BUG] Prettify error message from engine log.

Authored-by: Jagadesh Adireddi <jadiredd@conviva.com>
Signed-off-by: Kent Yao <yao@apache.org>
This commit is contained in:
Jagadesh Adireddi 2021-11-01 09:58:12 +08:00 committed by Kent Yao
parent c6710ae963
commit a6777fea3f
No known key found for this signature in database
GPG Key ID: F7051850A0AF904D

View File

@ -191,7 +191,7 @@ trait ProcBuilder {
error match {
case UNCAUGHT_ERROR =>
KyuubiSQLException(s"Failed to detect the root cause, please check $engineLog at server " +
s"side if necessary. The last $engineLogMaxLines line(s) of log is: " +
s"side if necessary. The last $engineLogMaxLines line(s) of log are:\n" +
s"${lastRowsOfLog.toArray.mkString("\n")}")
case other => other
}