zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject [zeppelin] branch branch-0.8 updated: [ZEPPELIN-3946] Fixed zeppelin hive interpreter broken pipe issue
Date Tue, 04 Jun 2019 01:31:04 GMT
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 <liuxun@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 <liuxun@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 <liuxun@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);


Mime
View raw message