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

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

                Author: ASF GitHub Bot
            Created on: 11/Nov/22 08:17
            Start Date: 11/Nov/22 08:17
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on code in PR #3712:
URL: https://github.com/apache/hive/pull/3712#discussion_r1019979184


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java:
##########
@@ -126,16 +126,11 @@ private void waitForCompactionToFinish(CompactionResponse 
resp) throws HiveExcep
         context.getConsole().printInfo("Interrupted while waiting for 
compaction with id=" + resp.getId());
         break;
       }
-
-      //this could be expensive when there are a lot of compactions....
-      //todo: update to search by ID once HIVE-13353 is done
-      ShowCompactResponse allCompactions = context.getDb().showCompactions();
-      for (ShowCompactResponseElement compaction : 
allCompactions.getCompacts()) {
-        if (resp.getId() != compaction.getId()) {
-          continue;
-        }
-
-        switch (compaction.getState()) {
+      ShowCompactRequest request = new ShowCompactRequest();

Review Comment:
   minor: could we create a constructor that accepts the id?





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

    Worklog Id:     (was: 825190)
    Time Spent: 1h 50m  (was: 1h 40m)

> Filter out compactions by id to minimise  expense of db operations
> ------------------------------------------------------------------
>
>                 Key: HIVE-26666
>                 URL: https://issues.apache.org/jira/browse/HIVE-26666
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 4.0.0
>            Reporter: KIRTI RUGE
>            Assignee: KIRTI RUGE
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> At present we use below operations while filtering out compactions in classes 
> like
> AlterTableCompactOperation
> cleaner
> Use show compaction filter option provided after 
> https://issues.apache.org/jira/browse/HIVE-13353



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

Reply via email to