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

Carl Steinbach commented on HIVE-3278:
--------------------------------------

bq. FWIW, having two sets of identically named classes (stuff under 
metastore.api & ql.metadata) has already caused some confusion. Typically this 
confusion has been people using the metastore.api versions not realizing 
ql.metadata adds some business logic.

This is precisely the problem I'm trying to solve. I'm proposing that we extend 
each of the Thrift types with a lightweight wrapper where the subclass name is 
prefixed with a "T", e.g. o.a.h.hive.metastore.api.Table would be extended by 
o.a.hive.metastore.api.thrift.TTable, etc, and then replace all of the 
references to o.a.h.hive.metastore.api.* classes with the corresponding 
o.a.hive.metastore.api.thrift.T* classes. It would have been nice if this had 
been done originally in the Thrift IDL, but that didn't happen, and we can't 
change it now without breaking backward compatibility. My goal in doing this is 
to make the code more readable (e.g. get rid of those awful canonical class 
name references), as well as to highlight the fact that we have Thrift types 
polluting the code.

The Hive source should only reference Thrift types immediately above and below 
the Thrift interface layer. In all other places it should be decoupled from the 
Thrift interface and types, and should instead use types similar to the ones in 
ql.metadata.
                
> Create wrappers around Thrift Metastore objects for improved readability
> ------------------------------------------------------------------------
>
>                 Key: HIVE-3278
>                 URL: https://issues.apache.org/jira/browse/HIVE-3278
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to