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

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

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


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -5822,25 +5824,43 @@ public void compact(String dbname, String tableName, 
String partName, String com
    * @param tblproperties the list of tblproperties to overwrite for this 
compaction
    * @return id of new request or id already existing request for specified 
resource
    * @throws HiveException
+   * @deprecated use {@link #compact3(CompactionRequest)}
    */
+  @Deprecated
   public CompactionResponse compact2(String dbname, String tableName, String 
partName, String compactType,
                                      Map<String, String> tblproperties)
       throws HiveException {
-    try {
-      CompactionType cr = null;
+      CompactionType cr;
       if ("major".equalsIgnoreCase(compactType)) {
         cr = CompactionType.MAJOR;
       } else if ("minor".equalsIgnoreCase(compactType)) {
         cr = CompactionType.MINOR;
       } else {
         throw new RuntimeException("Unknown compaction type " + compactType);
       }
-      return getMSC().compact2(dbname, tableName, partName, cr, tblproperties);
+      CompactionRequest request = new CompactionRequest(dbname, tableName, cr);
+      request.setPartitionname(partName);
+      request.setProperties(tblproperties);
+      return compact3(request);
+  }
+
+  /**
+   * Enqueue a compaction request.  Only 1 compaction for a given resource 
(db/table/partSpec) can
+   * be scheduled/running at any given time.
+   * @param request The {@link CompactionRequest} object containing the 
details required to enqueue
+   *                a compaction request.
+   * @throws HiveException
+   */
+  public CompactionResponse compact3(CompactionRequest request)

Review Comment:
   rename to simply `compact`





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

    Worklog Id:     (was: 802039)
    Time Spent: 2h 50m  (was: 2h 40m)

> 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: 2h 50m
>  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