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

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

                Author: ASF GitHub Bot
            Created on: 17/Feb/21 18:20
            Start Date: 17/Feb/21 18:20
    Worklog Time Spent: 10m 
      Work Description: yongzhi commented on a change in pull request #1956:
URL: https://github.com/apache/hive/pull/1956#discussion_r577839999



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -3195,17 +3196,24 @@ public void alterPartitions(String dbName, String 
tableName,
   public List<org.apache.hadoop.hive.metastore.api.Partition> 
getPartitionsByNames(String dbName, String tableName,
       List<String> partitionNames) throws HiveException {
     try {
-      return getMSC().getPartitionsByNames(dbName, tableName, partitionNames);
+      GetPartitionsByNamesRequest req = new GetPartitionsByNamesRequest();
+      req.setDb_name(dbName);
+      req.setTbl_name(tableName);
+      req.setNames(partitionNames);
+      return getPartitionsByNames(req, null);
     } catch (Exception e) {
       LOG.error("Failed getPartitionsByNames", e);
       throw new HiveException(e);
     }
   }
 
-    public List<org.apache.hadoop.hive.metastore.api.Partition> 
getPartitionsByNames(GetPartitionsByNamesRequest req)
+    public List<org.apache.hadoop.hive.metastore.api.Partition> 
getPartitionsByNames(GetPartitionsByNamesRequest req,
+      Table table)
         throws HiveException {
     try {
-      Table table = getTable(req.getDb_name(), req.getTbl_name());
+      if( table == null ) {
+        table = getTable(req.getDb_name(), req.getTbl_name());

Review comment:
       As if you do not use cached client, you need not table id, it will be 
different for the client direct use HMS apis (no need to call getTable). 




----------------------------------------------------------------
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.

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


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

    Worklog Id:     (was: 553779)
    Time Spent: 1h 10m  (was: 1h)

> [HS2] Send tableId to get_partitions_by_names_req HMS API from HS2
> ------------------------------------------------------------------
>
>                 Key: HIVE-24743
>                 URL: https://issues.apache.org/jira/browse/HIVE-24743
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Kishen Das
>            Assignee: Kishen Das
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> As part of ( HIVE-23821: Send tableId in request for all the new HMS 
> get_partition APIs ) we added logic to send tableId in the request for 
> several get_partition APIs, but looks like it was missed out for 
> getPartitionsByNames. TableId and validWriteIdList are used to maintain 
> consistency, when HMS API response is being served from a remote cache. 



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

Reply via email to