Repository: zeppelin Updated Branches: refs/heads/master 3bd94ddc7 -> 293993c60
[ZEPPELIN-1246] In JDBCInterpreter.getScheduler, use getMaxConcurrentConnection instead of hardcoding maxConcurrency to 10 ### What is this PR for? In JDBCInterpreter.getScheduler, use getMaxConcurrentConnection instead of hardcoding maxConcurrency to 10 ### What type of PR is it? Improvement ### Todos * [ ] - Task ### What is the Jira issue? [ZEPPELIN-1246] (https://issues.apache.org/jira/browse/ZEPPELIN-1246) ### How should this be tested? Set zeppelin.jdbc.concurrent.max_connection to 2 and verify after starting two long-running queries, a third query is pending. ### 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: Prasad Wagle <pwa...@twitter.com> Closes #1240 from prasadwagle/ZEPPELIN-1246 and squashes the following commits: 4e98b82 [Prasad Wagle] Merge branch 'master' into ZEPPELIN-1246 449245a [Prasad Wagle] Merge branch 'master' into ZEPPELIN-1246 62affdf [Prasad Wagle] In JDBCInterpreter.getScheduler, use getMaxConcurrentConnection instead of hardcoding maxConcurrency to 10 Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/293993c6 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/293993c6 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/293993c6 Branch: refs/heads/master Commit: 293993c6059e6e1ea73a032cf1062db40527a012 Parents: 3bd94dd Author: Prasad Wagle <pwa...@twitter.com> Authored: Sun Aug 7 18:42:51 2016 -0700 Committer: Alexander Bezzubov <b...@apache.org> Committed: Tue Aug 9 18:48:02 2016 +0900 ---------------------------------------------------------------------- jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/293993c6/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java ---------------------------------------------------------------------- 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 d5f6236..0eb0dff 100644 --- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java +++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java @@ -495,7 +495,8 @@ public class JDBCInterpreter extends Interpreter { public Scheduler getScheduler() { String schedulerName = JDBCInterpreter.class.getName() + this.hashCode(); return isConcurrentExecution() ? - SchedulerFactory.singleton().createOrGetParallelScheduler(schedulerName, 10) + SchedulerFactory.singleton().createOrGetParallelScheduler(schedulerName, + getMaxConcurrentConnection()) : SchedulerFactory.singleton().createOrGetFIFOScheduler(schedulerName); }