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

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

bq. Could we change the returned type to be ImmutableHTD in Table and Admin 
leaving the APIs as they are. If client tries to modify the IHTD, they'll get 
an exception the first time they try. The javadoc says we return an immurable 
(least I thought it did).
copy that. I will address your comment.

The HTD has a swath of deprecated methods...Firstly, we need to refactor HTD.

{noformat}
  /**
   * Default constructor which constructs an empty object.
   * For deserializing an HTableDescriptor instance only.
   * @deprecated As of release 0.96 (<a 
href="https://issues.apache.org/jira/browse/HBASE-5453";>HBASE-5453</a>).
   *             This was made protected in 2.0.0 and will be removed in HBase 
3.0.0.
   *             Used by Writables and Writables are going away.
   */
  @Deprecated
  protected HTableDescriptor() {
    super();
  }
{noformat}

The construction is deprecated in 1.0.0 (HBASE-5453). Could we remove it in 
2.0?  I can't see the point of “This was made protected in 2.0.0 and will be 
removed in HBase 3.0.0."

> Discuss mutable vs immutable HTableDescriptor
> ---------------------------------------------
>
>                 Key: HBASE-15583
>                 URL: https://issues.apache.org/jira/browse/HBASE-15583
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: Gabor Liptak
>            Priority: Minor
>              Labels: beginner
>             Fix For: 2.0.0
>
>
> From [~enis] in https://issues.apache.org/jira/browse/HBASE-15505:
>     PS Should UnmodifyableHTableDescriptor be renamed to 
> UnmodifiableHTableDescriptor?
> It should be named ImmutableHTableDescriptor to be consistent with 
> collections naming. Let's do this as a subtask of the parent jira, not here. 
> Thinking about it though, why would we return an Immutable HTD in 
> HTable.getTableDescriptor() versus a mutable HTD in 
> Admin.getTableDescriptor(). It does not make sense. Should we just get rid of 
> the Immutable ones?
> We also have UnmodifyableHRegionInfo which is not used at the moment it 
> seems. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to