szehon-ho commented on a change in pull request #2647:
URL: https://github.com/apache/hive/pull/2647#discussion_r710336872
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
##########
@@ -368,33 +368,37 @@ public TxnHandler() {
public void setConf(Configuration conf){
this.conf = conf;
+ int maxPoolSize = MetastoreConf.getIntVar(conf,
ConfVars.CONNECTION_POOLING_MAX_CONNECTIONS);
+ long getConnectionTimeoutMs = 30000;
synchronized (TxnHandler.class) {
if (connPool == null) {
- Connection dbConn = null;
- // Set up the JDBC connection pool
- try {
- int maxPoolSize = MetastoreConf.getIntVar(conf,
ConfVars.CONNECTION_POOLING_MAX_CONNECTIONS);
- long getConnectionTimeoutMs = 30000;
- connPool = setupJdbcConnectionPool(conf, maxPoolSize,
getConnectionTimeoutMs);
- /*the mutex pools should ideally be somewhat larger since some
operations require 1
+ connPool = setupJdbcConnectionPool(conf, maxPoolSize,
getConnectionTimeoutMs);
Review comment:
Do you mean eager initialization on HMS startup? I had thought it too
and initially did not want to change the behavior and potentially add more
connections for for HMS user who do not use any Txn functions. Is it what you
mean? (Not sure all the threads will inevitably fail though, after the first
succeeds they will skip)
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
##########
@@ -368,33 +368,37 @@ public TxnHandler() {
public void setConf(Configuration conf){
this.conf = conf;
+ int maxPoolSize = MetastoreConf.getIntVar(conf,
ConfVars.CONNECTION_POOLING_MAX_CONNECTIONS);
+ long getConnectionTimeoutMs = 30000;
synchronized (TxnHandler.class) {
if (connPool == null) {
- Connection dbConn = null;
- // Set up the JDBC connection pool
- try {
- int maxPoolSize = MetastoreConf.getIntVar(conf,
ConfVars.CONNECTION_POOLING_MAX_CONNECTIONS);
- long getConnectionTimeoutMs = 30000;
- connPool = setupJdbcConnectionPool(conf, maxPoolSize,
getConnectionTimeoutMs);
- /*the mutex pools should ideally be somewhat larger since some
operations require 1
+ connPool = setupJdbcConnectionPool(conf, maxPoolSize,
getConnectionTimeoutMs);
Review comment:
Do you mean eager initialization on HMS startup? It's possible and I
had thought it too and initially did not want to change the behavior and
potentially add more connections for for HMS user who do not use any Txn
functions. Is it what you mean? (Not sure all the threads will inevitably
fail though, after the first succeeds they will skip)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]