[ 
https://issues.apache.org/jira/browse/HIVE-27473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17938252#comment-17938252
 ] 

Shohei Okumiya commented on HIVE-27473:
---------------------------------------

[~seonggon] 

I tried to decompile the current and your implementation. The order of steps is 
slightly different, but it might be acceptable.

[https://gist.github.com/okumin/a1a401e3ade967b4d742967d6023bef4]

 

I am a bit biased toward Option 1 if we can accept the restructure and complex 
overload. Option 1's very strong advantage is compatibility with the existing 
Glue Client or another client.

On the other hand, Option 2 could be slightly easier for new developers, and we 
can keep the current complicated SessionHiveMetaStoreClient and its family. For 
example, a developer needs to implement only `get_table_req`, and we're 
deprecating duplicated Thrift methods. This is the demo to implement Option 2.
 * 
[https://github.com/okumin/hive/commit/f847f90f359f0c88eded1d5626687b34e1a95504]
 * 
[https://github.com/okumin/aws-glue-data-catalog-client-for-apache-hive-metastore/commit/aee2cc5bc4e6c59a0cc1e9f7ad0f6f05f4d92691#diff-8d2ef9e663f0746fa2524d8adaee592979088de4e039e5996323eb15471d05bf]

Please share if you have more thoughts.

> Make SessionHiveMetaStoreClient and HiveMetaStoreClientWithLocalCache 
> composable
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-27473
>                 URL: https://issues.apache.org/jira/browse/HIVE-27473
>             Project: Hive
>          Issue Type: Improvement
>          Components: Hive
>    Affects Versions: 4.0.0-alpha-2
>            Reporter: Shohei Okumiya
>            Assignee: Shohei Okumiya
>            Priority: Major
>
> Currently, we implement the two classes using inheritance. It assumes we 
> always use a single implementation of IMetaStoreClient.
> Some community members have been willing to make IMetaStoreClient pluggable 
> as proposed in HIVE-12679. Considering the use case, we should provide the 
> additional traits with composition over inheritance.



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

Reply via email to