You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/02/09 20:04:00 UTC

[jira] [Work logged] (HIVE-24743) [HS2] Send tableId to get_partitions_by_names_req HMS API from HS2

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

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

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



##########
File path: standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
##########
@@ -2223,6 +2224,29 @@ public PartitionsResponse getPartitionsRequest(PartitionsRequest req)
     return deepCopyPartitions(FilterUtils.filterPartitionsIfEnabled(isClientFilterEnabled, filterHook, parts));
   }
 
+  @Override
+  public GetPartitionsByNamesResult getPartitionsByNames(GetPartitionsByNamesRequest req)
+          throws NoSuchObjectException, MetaException, TException {
+    checkDbAndTableFilters(req.getCatName(), req.getDb_name(), req.getTbl_name());
+    req.setDb_name(prependCatalogToDbName(req.getCatName(), req.getDb_name(), conf));
+    if (req.getValidWriteIdList() == null) {
+      req.setValidWriteIdList(getValidWriteIdList(prependCatalogToDbName(req.getCatName(), req.getDb_name(),
+              conf), req.getTbl_name()));
+    }
+    if (req.getId() <= 0) {
+      req.setId(getTable(prependCatalogToDbName(req.getCatName(), req.getDb_name(), conf), req.getTbl_name()).getId());

Review comment:
       The table ID here will be only used by the cached HMS client, right? If it is used by HiveMetastoreClient, will we throw an error if the ID from getTable different from the one is passed-in?




----------------------------------------------------------------
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:
users@infra.apache.org


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

            Worklog Id:     (was: 550397)
    Remaining Estimate: 0h
            Time Spent: 10m

> [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
>          Time Spent: 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)