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

Chia-Ping Tsai commented on HBASE-20853:
----------------------------------------

{code:java}
- HTableDescriptor getTableDescriptor() throws IOException;
+ default HTableDescriptor getTableDescriptor() throws IOException {
+ return (HTableDescriptor)getDescriptor();
+ }{code}
The default impl of TableDescriptor is ModifyableTableDescriptor rather than 
HTableDescriptor. Hence, casting the TD to HTD may cause CCE. We can use "new 
HTableDescriptor(getDescriptor)" here since the method "getTableDescriptor" is 
deprecated and instantiating an new HTableDescriptor won't burn out the hbase.

> Polish "Add defaults to Table Interface so Implementors don't have to"
> ----------------------------------------------------------------------
>
>                 Key: HBASE-20853
>                 URL: https://issues.apache.org/jira/browse/HBASE-20853
>             Project: HBase
>          Issue Type: Sub-task
>          Components: API
>            Reporter: stack
>            Assignee: Balazs Meszaros
>            Priority: Major
>              Labels: beginner, beginners
>             Fix For: 3.0.0, 2.0.2, 2.1.1
>
>         Attachments: HBASE-20853.master.001.patch, 
> HBASE-20853.master.002.patch, HBASE-20853.master.003.patch
>
>
> This issue is to address feedback that came in after commit on the parent 
> (FYI [~chia7712]). See tail of parent issue and amendment attached to parent 
> adding better defaults to the Table Interface.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to