[ 
https://issues.apache.org/jira/browse/HIVE-26701?focusedWorklogId=827300&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-827300
 ]

ASF GitHub Bot logged work on HIVE-26701:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Nov/22 23:54
            Start Date: 18/Nov/22 23:54
    Worklog Time Spent: 10m 
      Work Description: nrg4878 commented on code in PR #3773:
URL: https://github.com/apache/hive/pull/3773#discussion_r1026978386


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/PersistenceManagerProvider.java:
##########
@@ -251,11 +277,14 @@ private static PersistenceManagerFactory 
initPMF(Configuration conf, boolean for
     if (dsp == null) {
       pmf = JDOHelper.getPersistenceManagerFactory(dsProp);
     } else {
-      try {
+      String sourceName = forCompactor ? "objectstore-compactor" : 
"objectstore";
+      try (DataSourceProvider.DataSourceNameConfigurator configurator =
+               new DataSourceProvider.DataSourceNameConfigurator(conf, 
sourceName)) {

Review Comment:
   so the name of the pool will be output to the metrics file as well?



##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -369,11 +369,15 @@ public void setConf(Configuration conf){
 
     int maxPoolSize = MetastoreConf.getIntVar(conf, 
ConfVars.CONNECTION_POOLING_MAX_CONNECTIONS);
     synchronized (TxnHandler.class) {
-      if (connPool == null) {
-        connPool = setupJdbcConnectionPool(conf, maxPoolSize);
-      }
-      if (connPoolMutex == null) {
-        connPoolMutex = setupJdbcConnectionPool(conf, maxPoolSize);
+      try (DataSourceProvider.DataSourceNameConfigurator configurator =
+               new DataSourceProvider.DataSourceNameConfigurator(conf, "txn")) 
{

Review Comment:
   nit: should we call this txnhandler instead of txn? 



##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/PersistenceManagerProvider.java:
##########
@@ -251,11 +277,14 @@ private static PersistenceManagerFactory 
initPMF(Configuration conf, boolean for
     if (dsp == null) {
       pmf = JDOHelper.getPersistenceManagerFactory(dsProp);
     } else {
-      try {
+      String sourceName = forCompactor ? "objectstore-compactor" : 
"objectstore";

Review Comment:
   will the pool name be as it is here or will it be something like 
objectstore-compactor-pool or objectstore-pool?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 827300)
    Time Spent: 40m  (was: 0.5h)

> Enable metrics for Database connection pools(1 & 2) used by ObjectStore in HMS
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-26701
>                 URL: https://issues.apache.org/jira/browse/HIVE-26701
>             Project: Hive
>          Issue Type: Bug
>          Components: Standalone Metastore
>            Reporter: Taraka Rama Rao Lethavadla
>            Assignee: Zhihua Deng
>            Priority: Major
>              Labels: hive-4.0.0-must, pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> We have metrics enabled for database connection pools(3 & 4) used in 
> TxnHandler. We don't have the same for pools(1 & 2) used by ObjectStore



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to