Skip to content

Conversation

@xiejiajun
Copy link
Contributor

@xiejiajun xiejiajun commented Jul 7, 2020

What is this PR for?

  • Added support for personalized configuration of the JDBCInterpreter database connection pool.
  • This feature can be used to solve the runtime error caused by HiveServer2 Session timeout.
  • This connection pool configuration Compatible with the official configuration of dbcp2

What type of PR is it?

[Feature]

Todos

  • - Task

What is the Jira issue?

How should this be tested?

  • manually tested
  • Supported configuration items
    • validationQuery
    • testOnBorrow
    • testOnCreate
    • testOnReturn
    • testWhileIdle
    • timeBetweenEvictionRunsMillis
    • maxWaitMillis
    • maxIdle
    • minIdle
    • maxTotal

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update? NO
  • Is there breaking changes for older versions? NO
  • Does this needs documentation? NO

@zjffdu
Copy link
Contributor

zjffdu commented Jul 7, 2020

Thanks for the contribution @xiejiajun Could you update jdbc.md about this new feature ?

@xiejiajun
Copy link
Contributor Author

Thanks for the contribution @xiejiajun Could you update jdbc.md about this new feature ?

@zjffdu Ok, I have updated the jdbc.md document for this feature.

| maxTotal | -1 | The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit. |
| validationQuery | show database | The SQL query that will be used to validate connections from this pool before returning them to the caller. If specified, this query MUST be an SQL SELECT statement that returns at least one row. If not specified, connections will be validation by calling the isValid() method. |


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use html table to render this. Here's one example of spark interpreter.

https://github.com/apache/zeppelin/blob/master/docs/interpreter/spark.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use html table to render this. Here's one example of spark interpreter.

https://github.com/apache/zeppelin/blob/master/docs/interpreter/spark.md

@zjffdu OK, I have updated the datasource pool docs in the jdbc.md with the html table syntax.

asfgit pushed a commit that referenced this pull request Jul 12, 2020
…Interpreter database connection pool

### What is this PR for?
- Added support for personalized configuration of the JDBCInterpreter database connection pool.
- This feature can be used to solve the runtime error caused by HiveServer2 Session timeout.
- This connection pool configuration Compatible with [the official configuration of dbcp2 ](http://commons.apache.org/proper/commons-dbcp/configuration.html)

### What type of PR is it?
[Feature]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4941

### How should this be tested?
* manually tested
* Supported configuration items
    - validationQuery
    - testOnBorrow
    - testOnCreate
    - testOnReturn
    - testWhileIdle
    - timeBetweenEvictionRunsMillis
    - maxWaitMillis
    - maxIdle
    - minIdle
    - maxTotal

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? NO
* Is there breaking changes for older versions? NO
* Does this needs documentation? NO

Author: xiejiajun <[email protected]>
Author: JakeXie <[email protected]>
Author: xie-jia-jun <[email protected]>

Closes #3844 from xiejiajun/jdbc-pool-config and squashes the following commits:

3bb622b [xiejiajun] use html table display datasource pool configuration in the jdbc.md document
88b1ce0 [xiejiajun] jdbc interpreter datasource connection pool  document
1f2eb55 [xiejiajun] Compatible with the official configuration of dbcp2 connection pool
5c7f666 [xiejiajun] JDBCInterprete supports personalized database connection pool configuration to cope with scenarios such as HiveSession timeout
3d57719 [xiejiajun] Merge branch 'branch-0.9' of https://github.com/apache/zeppelin into apache-0.9
0e5f65a [xiejiajun] Merge branch 'branch-0.9' of https://github.com/apache/zeppelin into apache-0.9
076668a [JakeXie] Merge pull request #7 from apache/branch-0.9
00e14dd [JakeXie] Merge pull request #5 from apache/branch-0.9
9bb7341 [xiejiajun] Merge remote-tracking branch 'origin/branch-0.9' into branch-0.9
9bc5605 [xiejiajun] bug fix:  when we removing a paragraph , an interpreter process refused to connect due to it abnormal stop , which eventually caused the remove paragraph operation to fail to complete.
97d2714 [xie-jia-jun] Merge pull request #2 from apache/branch-0.9
9b3c744 [xiejiajun] added timeout for getting Thrift client to avoid situations where the interpreter may not be restarted when the interpreter process exits unexpectedly
@asfgit asfgit closed this in 706a957 Jul 12, 2020
prabhjyotsingh pushed a commit to prabhjyotsingh/zeppelin that referenced this pull request Aug 14, 2020
…Interpreter database connection pool

### What is this PR for?
- Added support for personalized configuration of the JDBCInterpreter database connection pool.
- This feature can be used to solve the runtime error caused by HiveServer2 Session timeout.
- This connection pool configuration Compatible with [the official configuration of dbcp2 ](http://commons.apache.org/proper/commons-dbcp/configuration.html)

### What type of PR is it?
[Feature]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4941

### How should this be tested?
* manually tested
* Supported configuration items
    - validationQuery
    - testOnBorrow
    - testOnCreate
    - testOnReturn
    - testWhileIdle
    - timeBetweenEvictionRunsMillis
    - maxWaitMillis
    - maxIdle
    - minIdle
    - maxTotal

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? NO
* Is there breaking changes for older versions? NO
* Does this needs documentation? NO

Author: xiejiajun <[email protected]>
Author: JakeXie <[email protected]>
Author: xie-jia-jun <[email protected]>

Closes apache#3844 from xiejiajun/jdbc-pool-config and squashes the following commits:

3bb622b [xiejiajun] use html table display datasource pool configuration in the jdbc.md document
88b1ce0 [xiejiajun] jdbc interpreter datasource connection pool  document
1f2eb55 [xiejiajun] Compatible with the official configuration of dbcp2 connection pool
5c7f666 [xiejiajun] JDBCInterprete supports personalized database connection pool configuration to cope with scenarios such as HiveSession timeout
3d57719 [xiejiajun] Merge branch 'branch-0.9' of https://github.com/apache/zeppelin into apache-0.9
0e5f65a [xiejiajun] Merge branch 'branch-0.9' of https://github.com/apache/zeppelin into apache-0.9
076668a [JakeXie] Merge pull request apache#7 from apache/branch-0.9
00e14dd [JakeXie] Merge pull request apache#5 from apache/branch-0.9
9bb7341 [xiejiajun] Merge remote-tracking branch 'origin/branch-0.9' into branch-0.9
9bc5605 [xiejiajun] bug fix:  when we removing a paragraph , an interpreter process refused to connect due to it abnormal stop , which eventually caused the remove paragraph operation to fail to complete.
97d2714 [xie-jia-jun] Merge pull request #2 from apache/branch-0.9
9b3c744 [xiejiajun] added timeout for getting Thrift client to avoid situations where the interpreter may not be restarted when the interpreter process exits unexpectedly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants