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

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

                Author: ASF GitHub Bot
            Created on: 21/Jul/21 09:32
            Start Date: 21/Jul/21 09:32
    Worklog Time Spent: 10m 
      Work Description: lcspinter commented on a change in pull request #2507:
URL: https://github.com/apache/hive/pull/2507#discussion_r673815217



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnStore.java
##########
@@ -388,8 +388,17 @@ void onRename(String oldCatName, String oldDbName, String 
oldTabName, String old
    * @param workerVersion runtime version of the worker calling this
    * @return an info element for this compaction request, or null if there is 
no work to do now.
    */
+  @Deprecated

Review comment:
       Again, comment about what to use instead of this deprecated method.

##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
##########
@@ -165,16 +166,29 @@ public CompactionTxnHandler() {
     }
   }
 
+
   /**
    * This will grab the next compaction request off of
    * the queue, and assign it to the worker.
    * @param workerId id of the worker calling this, will be recorded in the db
-   * @param workerVersion runtime version of the Worker calling this
    * @return an info element for this compaction request, or null if there is 
no work to do now.
    */
+  @Deprecated

Review comment:
       Could you please add some comments, what to use instead of this method? 

##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
##########
@@ -204,7 +218,8 @@ public CompactionInfo findNextToCompact(String workerId, 
String workerVersion) t
           info.properties = rs.getString(6);
           // Now, update this record as being worked on by this worker.
           long now = getDbTime(dbConn);
-          s = "UPDATE \"COMPACTION_QUEUE\" SET \"CQ_WORKER_ID\" = '" + 
workerId + "', \"CQ_WORKER_VERSION\" = '" + workerVersion + "', " +
+          s = "UPDATE \"COMPACTION_QUEUE\" SET \"CQ_WORKER_ID\" = '" + 
rqst.getWorkerId() + "', " +
+            "\"CQ_WORKER_VERSION\" = '" + rqst.getWorkerVersion() + "', " +

Review comment:
       I believe the `getWorkerVersion()` can be null, if this method is called 
from `findNextToCompact(String workerId)`. Is `CQ_WORKER_VERSION='null'` is a 
valid scenario? Are we prepared to handle null values when processing the 
`CQ_WORKER_VERSION` column? 




-- 
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: 626007)
    Time Spent: 20m  (was: 10m)

> Changes to metastore API in HIVE-24880 are not backwards compatible
> -------------------------------------------------------------------
>
>                 Key: HIVE-25359
>                 URL: https://issues.apache.org/jira/browse/HIVE-25359
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Karen Coppage
>            Assignee: Karen Coppage
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> With HIVE-24880 find_next_compact(String workerId) was changed to 
> find_next_compact(String workerId, String workerVersion). This isn't 
> backwards compatible and could break other components
> This commit reverts that change, deprecates find_next_compact, adds a new 
> method: find_next_compact2(FindNextCompactRequest rqst) where 
> FindNextCompactRequest has fields workerId and workerVersion, and makes Hive 
> use find_next_compact2.



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

Reply via email to