[jira] [Commented] (HBASE-18528) Support to modify TableDescriptor/ColumnFamilyDescriptor through MasterObserver; Or disable that.

2017-08-08 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18528:


Let me address the issue that *we should NOT allow user to modify the passed 
table descriptor* first. Leave the cleanup with another issue.

> Support to modify TableDescriptor/ColumnFamilyDescriptor through 
> MasterObserver; Or disable that.
> -
>
> Key: HBASE-18528
> URL: https://issues.apache.org/jira/browse/HBASE-18528
> Project: HBase
>  Issue Type: Sub-task
>  Components: Coprocessors, master
>Reporter: Chia-Ping Tsai
>Assignee: Chia-Ping Tsai
>Priority: Critical
> Fix For: 3.0.0, 2.0.0-alpha-2
>
>
> We are replacing the HTableDescriptor by TableDescriptor from code base. The 
> TableDescriptor is designed to be a read-only object so user can't modifiy it 
> through MasterObserver. HBASE-18502 change many methods of MasterObserver to 
> use TableDescriptor but some deprecated methods still accept the 
> HTableDescriptor. User may be confused by why some methods can't modify the 
> table descriptor.
> In short, Should we allow user to modify the passed table descriptor?
> # if yes, we should introduce a mechanism that user can return a modified 
> table descripror
> # if no, we should pass ImmutableHTableDescriptor to user. Or we just remove 
> all methods accepting the HTableDescriptor
> Ditto for HColumnDescriptor.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18528) Support to modify TableDescriptor/ColumnFamilyDescriptor through MasterObserver; Or disable that.

2017-08-07 Thread Anoop Sam John (JIRA)

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

Anoop Sam John commented on HBASE-18528:


What we need is change the param type from deprecated HTableDescriptor  to 
TableDescriptor right?  Which deprecated methods u want to remove?  Ya may be 
we can remove deprecated methods as we are any way breaking CP for 2.0  So lets 
do all cleanup. If you see RegionObserver there may be so many APIs ready for 
removal then. (But that is any way another issue)

> Support to modify TableDescriptor/ColumnFamilyDescriptor through 
> MasterObserver; Or disable that.
> -
>
> Key: HBASE-18528
> URL: https://issues.apache.org/jira/browse/HBASE-18528
> Project: HBase
>  Issue Type: Sub-task
>  Components: Coprocessors, master
>Reporter: Chia-Ping Tsai
>Assignee: Chia-Ping Tsai
>Priority: Critical
> Fix For: 3.0.0, 2.0.0-alpha-2
>
>
> We are replacing the HTableDescriptor by TableDescriptor from code base. The 
> TableDescriptor is designed to be a read-only object so user can't modifiy it 
> through MasterObserver. HBASE-18502 change many methods of MasterObserver to 
> use TableDescriptor but some deprecated methods still accept the 
> HTableDescriptor. User may be confused by why some methods can't modify the 
> table descriptor.
> In short, Should we allow user to modify the passed table descriptor?
> # if yes, we should introduce a mechanism that user can return a modified 
> table descripror
> # if no, we should pass ImmutableHTableDescriptor to user. Or we just remove 
> all methods accepting the HTableDescriptor
> Ditto for HColumnDescriptor.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18528) Support to modify TableDescriptor/ColumnFamilyDescriptor through MasterObserver; Or disable that.

2017-08-07 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18528:


Personally, I prefer removeing the deprecated methods which use the 
HTableDescriptor. Reserving the deprecated APIs puts some ugly code. Also, we 
need to create a ImmutableHTableDescriptor for the deprecated API...
{code}
  public void preCreateTableAction(final HTableDescriptor htd, final 
HRegionInfo[] regions,
   final User user)
  throws IOException {
execOperation(coprocessors.isEmpty() ? null : new 
CoprocessorOperation(user) {
  @Override
  public void call(MasterObserver oserver, 
ObserverContext ctx)
  throws IOException {
oserver.preCreateTableHandler(ctx, htd, regions);
oserver.preCreateTableAction(ctx, htd, regions);
  }
});
  }
{code}
If it is legal to break the CP in major version, why not remove the deprecated 
APIs?

> Support to modify TableDescriptor/ColumnFamilyDescriptor through 
> MasterObserver; Or disable that.
> -
>
> Key: HBASE-18528
> URL: https://issues.apache.org/jira/browse/HBASE-18528
> Project: HBase
>  Issue Type: Sub-task
>  Components: Coprocessors, master
>Reporter: Chia-Ping Tsai
>Assignee: Chia-Ping Tsai
>Priority: Critical
> Fix For: 3.0.0, 2.0.0-alpha-2
>
>
> We are replacing the HTableDescriptor by TableDescriptor from code base. The 
> TableDescriptor is designed to be a read-only object so user can't modifiy it 
> through MasterObserver. HBASE-18502 change many methods of MasterObserver to 
> use TableDescriptor but some deprecated methods still accept the 
> HTableDescriptor. User may be confused by why some methods can't modify the 
> table descriptor.
> In short, Should we allow user to modify the passed table descriptor?
> # if yes, we should introduce a mechanism that user can return a modified 
> table descripror
> # if no, we should pass ImmutableHTableDescriptor to user. Or we just remove 
> all methods accepting the HTableDescriptor
> Ditto for HColumnDescriptor.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18528) Support to modify TableDescriptor/ColumnFamilyDescriptor through MasterObserver; Or disable that.

2017-08-07 Thread Anoop Sam John (JIRA)

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

Anoop Sam John commented on HBASE-18528:


We might need the desc to be passed to CPs. This can give many details 
(getters)..  ImmutableHTableDescriptor  is again an impl class and we want to 
pass interfaces.  TableDesc or ColumnDesc interface type only we can pass.  Ya 
the object passed to be ImmutableHTableDescriptor  (I believe that only u mean 
here).  That object any way throw Exception while calling setters on it right.

> Support to modify TableDescriptor/ColumnFamilyDescriptor through 
> MasterObserver; Or disable that.
> -
>
> Key: HBASE-18528
> URL: https://issues.apache.org/jira/browse/HBASE-18528
> Project: HBase
>  Issue Type: Sub-task
>  Components: Coprocessors, master
>Reporter: Chia-Ping Tsai
>Assignee: Chia-Ping Tsai
>Priority: Critical
> Fix For: 3.0.0, 2.0.0-alpha-2
>
>
> We are replacing the HTableDescriptor by TableDescriptor from code base. The 
> TableDescriptor is designed to be a read-only object so user can't modifiy it 
> through MasterObserver. HBASE-18502 change many methods of MasterObserver to 
> use TableDescriptor but some deprecated methods still accept the 
> HTableDescriptor. User may be confused by why some methods can't modify the 
> table descriptor.
> In short, Should we allow user to modify the passed table descriptor?
> # if yes, we should introduce a mechanism that user can return a modified 
> table descripror
> # if no, we should pass ImmutableHTableDescriptor to user. Or we just remove 
> all methods accepting the HTableDescriptor
> Ditto for HColumnDescriptor.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18528) Support to modify TableDescriptor/ColumnFamilyDescriptor through MasterObserver; Or disable that.

2017-08-07 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18528:


bq. We should NOT allow this IMO.
Should we pass ImmutableHTableDescriptor to user ? Or remove all methods 
accepting the HTableDescriptor?

> Support to modify TableDescriptor/ColumnFamilyDescriptor through 
> MasterObserver; Or disable that.
> -
>
> Key: HBASE-18528
> URL: https://issues.apache.org/jira/browse/HBASE-18528
> Project: HBase
>  Issue Type: Sub-task
>  Components: Coprocessors, master
>Reporter: Chia-Ping Tsai
>Assignee: Chia-Ping Tsai
>Priority: Critical
> Fix For: 3.0.0, 2.0.0-alpha-2
>
>
> We are replacing the HTableDescriptor by TableDescriptor from code base. The 
> TableDescriptor is designed to be a read-only object so user can't modifiy it 
> through MasterObserver. HBASE-18502 change many methods of MasterObserver to 
> use TableDescriptor but some deprecated methods still accept the 
> HTableDescriptor. User may be confused by why some methods can't modify the 
> table descriptor.
> In short, Should we allow user to modify the passed table descriptor?
> # if yes, we should introduce a mechanism that user can return a modified 
> table descripror
> # if no, we should pass ImmutableHTableDescriptor to user. Or we just remove 
> all methods accepting the HTableDescriptor
> Ditto for HColumnDescriptor.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18528) Support to modify TableDescriptor/ColumnFamilyDescriptor through MasterObserver; Or disable that.

2017-08-07 Thread Anoop Sam John (JIRA)

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

Anoop Sam John commented on HBASE-18528:


bq.In short, Should we allow user to modify the passed table descriptor?
We should NOT allow this IMO.

> Support to modify TableDescriptor/ColumnFamilyDescriptor through 
> MasterObserver; Or disable that.
> -
>
> Key: HBASE-18528
> URL: https://issues.apache.org/jira/browse/HBASE-18528
> Project: HBase
>  Issue Type: Sub-task
>  Components: Coprocessors, master
>Reporter: Chia-Ping Tsai
>Assignee: Chia-Ping Tsai
>Priority: Critical
> Fix For: 3.0.0, 2.0.0-alpha-2
>
>
> We are replacing the HTableDescriptor by TableDescriptor from code base. The 
> TableDescriptor is designed to be a read-only object so user can't modifiy it 
> through MasterObserver. HBASE-18502 change many methods of MasterObserver to 
> use TableDescriptor but some deprecated methods still accept the 
> HTableDescriptor. User may be confused by why some methods can't modify the 
> table descriptor.
> In short, Should we allow user to modify the passed table descriptor?
> # if yes, we should introduce a mechanism that user can return a modified 
> table descripror
> # if no, we should pass ImmutableHTableDescriptor to user. Or we just remove 
> all methods accepting the HTableDescriptor
> Ditto for HColumnDescriptor.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18528) Support to modify TableDescriptor/ColumnFamilyDescriptor through MasterObserver; Or disable that.

2017-08-06 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18528:


ping [~jamestaylor]

> Support to modify TableDescriptor/ColumnFamilyDescriptor through 
> MasterObserver; Or disable that.
> -
>
> Key: HBASE-18528
> URL: https://issues.apache.org/jira/browse/HBASE-18528
> Project: HBase
>  Issue Type: Sub-task
>  Components: Coprocessors, master
>Reporter: Chia-Ping Tsai
>Assignee: Chia-Ping Tsai
>Priority: Critical
> Fix For: 3.0.0, 2.0.0-alpha-2
>
>
> We are replacing the HTableDescriptor by TableDescriptor from code base. The 
> TableDescriptor is designed to be a read-only object so user can't modifiy it 
> through MasterObserver. HBASE-18502 change many methods of MasterObserver to 
> use TableDescriptor but some deprecated methods still accept the 
> HTableDescriptor. User may be confused by why some methods can't modify the 
> table descriptor.
> In short, Should we allow user to modify the passed table descriptor?
> # if yes, we should introduce a mechanism that user can return a modified 
> table descripror
> # if no, we should pass ImmutableHTableDescriptor to user. Or we just remove 
> all methods accepting the HTableDescriptor
> Ditto for HColumnDescriptor.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)