[KYUUBI #1190] Enhance error log detection
### Why are the changes needed?
When line2 is read, it does not contain `at` or `cause by`, so all of the following messages are discarded.
#1190
```
2021-10-09 09:35:14.528 ERROR spark.SparkSQLEngine: Failed to instantiate SparkSession: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient;
org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient;
at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:113)
at org.apache.spark.sql.hive.HiveExternalCatalog.databaseExists(HiveExternalCatalog.scala:225)
at org.apache.spark.sql.internal.SharedState.externalCatalog$lzycompute(SharedState.scala:137)
```
### _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 #1200 from simon824/fixut.
Closes #1190
d239df0e [simon] codestyle
83cb7d83 [simon] fixut
2d399883 [simon] Merge remote-tracking branch 'upstream/master'
3d9c12d3 [simon] Merge remote-tracking branch 'upstream/master'
5b905dbd [simon] Merge remote-tracking branch 'upstream/master'
Authored-by: simon <zhangshiming@cvte.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 4f8f4d9c6b)
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
parent
547b270f0e
commit
1a9bf3600d
@ -120,7 +120,9 @@ trait ProcBuilder {
|
||||
error = KyuubiSQLException(sb.toString() + s"\n See more: $engineLog")
|
||||
line = reader.readLine()
|
||||
while (sb.length < maxErrorSize && line != null &&
|
||||
(line.startsWith("\tat ") || line.startsWith("Caused by: "))) {
|
||||
(containsIgnoreCase(line, "Exception:") ||
|
||||
line.startsWith("\tat ") ||
|
||||
line.startsWith("Caused by: "))) {
|
||||
sb.append("\n" + line)
|
||||
line = reader.readLine()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user