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

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

                Author: ASF GitHub Bot
            Created on: 04/Oct/21 15:08
            Start Date: 04/Oct/21 15:08
    Worklog Time Spent: 10m 
      Work Description: belugabehr commented on a change in pull request #2344:
URL: https://github.com/apache/hive/pull/2344#discussion_r721458020



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
##########
@@ -368,20 +363,22 @@ private void executeNoResult(final String queryText) 
throws SQLException {
   }
 
   public Database getDatabase(String catName, String dbName) throws 
MetaException{
-    Query queryDbSelector = null;
-    Query queryDbParams = null;
-    try {
+    String queryTextDbSelector= "select "
+        + "\"DB_ID\", \"NAME\", \"DB_LOCATION_URI\", \"DESC\", "
+        + "\"OWNER_NAME\", \"OWNER_TYPE\", \"CTLG_NAME\" , \"CREATE_TIME\", 
\"DB_MANAGED_LOCATION_URI\", "
+        + "\"TYPE\", \"DATACONNECTOR_NAME\", \"REMOTE_DBNAME\""
+        + "FROM "+ DBS
+        + " where \"NAME\" = ? and \"CTLG_NAME\" = ? ";
+    String queryTextDbParams = "select \"PARAM_KEY\", \"PARAM_VALUE\" "
+        + " from " + DATABASE_PARAMS + " "
+        + " WHERE \"DB_ID\" = ? "
+        + " AND \"PARAM_KEY\" IS NOT NULL";

Review comment:
       Not related to this PR directly, but there *has* to be a better way of 
doing this.  This should come from an external resource.




-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

    Worklog Id:     (was: 659630)
    Time Spent: 15h  (was: 14h 50m)

> Metastore some JDO query objects do not close properly
> ------------------------------------------------------
>
>                 Key: HIVE-23633
>                 URL: https://issues.apache.org/jira/browse/HIVE-23633
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zhihua Deng
>            Assignee: Zhihua Deng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>         Attachments: HIVE-23633.01.patch
>
>          Time Spent: 15h
>  Remaining Estimate: 0h
>
> After patched [HIVE-10895|https://issues.apache.org/jira/browse/HIVE-10895],  
> The metastore still has seen a memory leak on db resources: many 
> StatementImpls left unclosed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to