You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by li...@apache.org on 2019/06/04 01:31:04 UTC

[zeppelin] branch branch-0.8 updated: [ZEPPELIN-3946] Fixed zeppelin hive interpreter broken pipe issue

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

liuxun pushed a commit to branch branch-0.8
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.8 by this push:
     new 5c3478f  [ZEPPELIN-3946] Fixed zeppelin hive interpreter broken pipe issue
5c3478f is described below

commit 5c3478f930e95b109476de7b8ce661341d2c3d40
Author: Xun Liu <li...@apache.org>
AuthorDate: Fri May 31 12:37:58 2019 +0800

    [ZEPPELIN-3946] Fixed zeppelin hive interpreter broken pipe issue
    
    Upon raising the concern (ZEPPELIN-3860), we were suggested to upgrade the zeppelin service from 0.7.3 to 0.8.0 version. With the current zeppelin version i.e 0.8.0 the frequency of broken pipe error has gone up.
    
    When connecting to a database through a database connection pool, If there is no sql operation for a long time, The database connection pool will actively close this connection. The connection between the client and the database is broken.
    
    So by increasing
    ```
    poolableConnectionFactory.setValidationQuery("show databases");
    ```
    Periodically call the `show databases` statement, Keep the connection to the database.
    
    [Bug Fix]
    
    * https://issues.apache.org/jira/browse/ZEPPELIN-3946
    
    The user passed the actual test, Verification solves this problem.
    [CI Pass](https://travis-ci.org/liuxunorg/zeppelin/builds/539529259)
    
    * Does the licenses files need update? no
    * Is there breaking changes for older versions?  no
    * Does this needs documentation? no
    
    Author: Xun Liu <li...@apache.org>
    
    Closes #3374 from liuxunorg/ZEPPELIN-3946 and squashes the following commits:
    
    f2877fd4b [Xun Liu] [ZEPPELIN-3946] Fixed zeppelin hive interpreter broken pipe issue
    
    (cherry picked from commit e158a3e97a0b57e92c1f2a165433dbbdac166106)
    Signed-off-by: liuxunorg <li...@apache.org>
---
 jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
index 9b3777a..ee973ba 100644
--- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
+++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
@@ -405,6 +405,7 @@ public class JDBCInterpreter extends KerberosInterpreter {
     final String maxConnectionLifetime =
         StringUtils.defaultIfEmpty(getProperty("zeppelin.jdbc.maxConnLifetime"), "-1");
     poolableConnectionFactory.setMaxConnLifetimeMillis(Long.parseLong(maxConnectionLifetime));
+    poolableConnectionFactory.setValidationQuery("show databases");
     ObjectPool connectionPool = new GenericObjectPool(poolableConnectionFactory);
 
     poolableConnectionFactory.setPool(connectionPool);