Apache9 commented on PR #5661: URL: https://github.com/apache/hbase/pull/5661#issuecomment-1948090170
> > It is a bit strange that why we need to an extra step after calling an admin method, is this because we are calling an old API in RSGroupAdmin, not the method in Admin interface? > > After the update [HBASE-23807](https://issues.apache.org/jira/browse/HBASE-23807), the old APIs in RSGroupAdmin are no longer being utilized in shell commands. The commands related to moving namespaces only move tables belonging to the namespaces to a new RS group without modifying the namespace descriptor itself. This behavior has remained same since the initial development of commands like **move_namespaces_rsgroup** and **move_servers_namespaces_rsgroup** ([HBASE-19336](https://issues.apache.org/jira/browse/HBASE-19336)). Having Admin API would be beneficial to control moving the namespace to new RS group programmatically. > > > I'm still a bit confused by 'moves tables in the namespaces and servers to rsgroup.'. Why we need to care about tables here? Just change the namespace descriptor and also move the servers is enough?\ > > If we just change the namespace descriptor and don't move the tables in the namespace then the existing tables belong to old RS group and what ever the tables created after that will be with new RS group so with in the the same namespace tables belongs to multiple rs groups in that case. If we are still ok to have such behavior then just changing the namespace descriptor is fine. OK, finally I understand the problem here. We are simulating the old behavior of move_namespaces_rsgroup and move_servers_namespaces_rsgroup, where there was no rs group information in namespace descriptor yet, so we just change all the rs group information for the tables in the namespace. I think in the old time, newly created tables will still be in the default rs group if you do not set it manually right? So in the HBase OP's view, usually if they want to change the rs group of a namespace, they will 1. change the create table script, so new table created will be in the new rs group 2. call move_namespaces_rsgroup, to move the current tables in the namespace to the new rs group. Since now, we have namespace descriptor support, seems the simplest way is to just set the rs group information in namespace descriptor, and then reopen all the tables under the namespace. But there is another problem that, if we have rs group information in the table descriptor, it we just change the rs group information in namespace descriptor, it is not enough to move the table to the new rs group. So the problem is we add a new dimension here, there are new combinations of configurations which makes old shell commands not enough to cover all the possibilities. There are basically two ways, first is to change the old shell commands's behavior, like what we have done here, but not enough ,for me I think at least we should provide an option that whether we should override the rs group information in table descriptor. Another way is to keep the old shell commands as is, and introduce new shell commands. WDYT? I do not use rs group feature much, so I'm not sure which one is better. Thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
