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

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

                Author: ASF GitHub Bot
            Created on: 25/Aug/22 14:51
            Start Date: 25/Aug/22 14:51
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on code in PR #3513:
URL: https://github.com/apache/hive/pull/3513#discussion_r955067604


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java:
##########
@@ -229,17 +231,33 @@ public CompactionInfo 
findNextToCompact(FindNextCompactRequest rqst) throws Meta
       }
 
       Connection dbConn = null;
-      Statement stmt = null;
+      PreparedStatement stmt = null;
       //need a separate stmt for executeUpdate() otherwise it will close the 
ResultSet(HIVE-12725)
       Statement updStmt = null;
       ResultSet rs = null;
+
+      long poolTimeout = MetastoreConf.getTimeVar(conf, 
ConfVars.COMPACTOR_WORKER_POOL_TIMEOUT, TimeUnit.MILLISECONDS);
+
       try {
         dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED, 
connPoolCompaction);
-        stmt = dbConn.createStatement();
-        String query = "SELECT \"CQ_ID\", \"CQ_DATABASE\", \"CQ_TABLE\", 
\"CQ_PARTITION\", " +
-          "\"CQ_TYPE\", \"CQ_TBLPROPERTIES\" FROM \"COMPACTION_QUEUE\" WHERE 
\"CQ_STATE\" = '" + INITIATED_STATE + "'";
+        StringBuilder sb = new StringBuilder();
+        sb.append("SELECT \"CQ_ID\", \"CQ_DATABASE\", \"CQ_TABLE\", 
\"CQ_PARTITION\", " +
+          "\"CQ_TYPE\", \"CQ_POOL_NAME\", \"CQ_TBLPROPERTIES\" FROM 
\"COMPACTION_QUEUE\" WHERE \"CQ_STATE\" = '" + INITIATED_STATE + "' AND ");
+        boolean hasPoolName = 
org.apache.commons.lang3.StringUtils.isNotBlank(rqst.getPoolName());

Review Comment:
   we should remove this stringifyException and use simply e.getMessage(), see 
HIVE-22417





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

    Worklog Id:     (was: 803671)
    Time Spent: 7.5h  (was: 7h 20m)

> Add priority queueing to compaction
> -----------------------------------
>
>                 Key: HIVE-26443
>                 URL: https://issues.apache.org/jira/browse/HIVE-26443
>             Project: Hive
>          Issue Type: New Feature
>            Reporter: László Végh
>            Assignee: László Végh
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: Pool based compaction queues.docx
>
>          Time Spent: 7.5h
>  Remaining Estimate: 0h
>
> The details can be found in the attached design doc.



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

Reply via email to