You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2021/10/09 06:39:13 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #1190] Enhance error log detection

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

chengpan 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 4f8f4d9  [KYUUBI #1190] Enhance error log detection
4f8f4d9 is described below

commit 4f8f4d9c6b0b6da805d767dfb07534a906b0b2e1
Author: simon <zh...@cvte.com>
AuthorDate: Sat Oct 9 14:38:55 2021 +0800

    [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 <zh...@cvte.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala
index 62e3255..a2b863f 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala
@@ -121,7 +121,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()
               }