You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2017/06/02 17:46:19 UTC
ambari git commit: AMBARI-21000. Ambari does not work with
PGBouncer/PostgreSQL. (Robert Yokota via swagle)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 78af85f3f -> ee088e908
AMBARI-21000. Ambari does not work with PGBouncer/PostgreSQL. (Robert Yokota via swagle)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ee088e90
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ee088e90
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ee088e90
Branch: refs/heads/branch-2.5
Commit: ee088e90828110212d2002693c660cdbffca9010
Parents: 78af85f
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Fri Jun 2 10:45:47 2017 -0700
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Fri Jun 2 10:45:47 2017 -0700
----------------------------------------------------------------------
.../ambari/server/configuration/Configuration.java | 11 +++++++++++
.../ambari/server/scheduler/ExecutionSchedulerImpl.java | 2 ++
2 files changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/ee088e90/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index d7321d9..a06f2a9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -1731,6 +1731,13 @@ public class Configuration {
"server.execution.scheduler.maxDbConnections", "5");
/**
+ * The maximum number of prepared statements cached per database connection.
+ */
+ @Markdown(description = "The maximum number of prepared statements cached per database connection.")
+ public static final ConfigurationProperty<String> EXECUTION_SCHEDULER_MAX_STATEMENTS_PER_CONNECTION = new ConfigurationProperty<>(
+ "server.execution.scheduler.maxStatementsPerConnection", "120");
+
+ /**
* The tolerance, in {@link TimeUnit#MINUTES}, that Quartz will allow a misfired job to run.
*/
@Markdown(description = "The time, in minutes, that a scheduled job can be run after its missed scheduled execution time.")
@@ -4448,6 +4455,10 @@ public class Configuration {
return getProperty(EXECUTION_SCHEDULER_CONNECTIONS);
}
+ public String getExecutionSchedulerMaxStatementsPerConnection() {
+ return getProperty(EXECUTION_SCHEDULER_MAX_STATEMENTS_PER_CONNECTION);
+ }
+
public Long getExecutionSchedulerMisfireToleration() {
return Long.parseLong(getProperty(EXECUTION_SCHEDULER_MISFIRE_TOLERATION));
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/ee088e90/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionSchedulerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionSchedulerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionSchedulerImpl.java
index 76ebac6..7c0318f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionSchedulerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionSchedulerImpl.java
@@ -117,6 +117,8 @@ public class ExecutionSchedulerImpl implements ExecutionScheduler {
configuration.getDatabasePassword());
properties.setProperty("org.quartz.dataSource.myDS.maxConnections",
configuration.getExecutionSchedulerConnections());
+ properties.setProperty("org.quartz.dataSource.myDS.maxCachedStatementsPerConnection",
+ configuration.getExecutionSchedulerMaxStatementsPerConnection());
properties.setProperty("org.quartz.dataSource.myDS.validationQuery",
subProps[1]);