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

Xiang Li commented on HBASE-21478:
----------------------------------

Hi [~yuzhih...@gmail.com]
 I uploaded the very first patch v000 to demonstrate my idea.
 * Add a new function called "getTablesForDisplayInOrder()" into RSGroupInfo.
 ** Whenever it is called, the new private member "tablesForDisplayInOrder" is 
refreshed according to the "tables".
 ** The comparator compares namespace then qualifier, while it puts the system 
tables in front of the tables with other namespaces.
 ** "tablesForDisplayInOrder" is not allocated in the constructor but when the 
very first time getTablesForDisplayInOrder() is called, to save the memory.
 * For HBase shell, get_rsgroup.rb and list_rsgroups.rb are updated to use 
getTablesForDisplayInOrder() instead of getTables().
 * For HMaster web UI, rsgroup.jsp is updated to use 
getTablesForDisplayInOrder() instead of getTables and sort(). Without the 
change, it is already sorted according to namespace then qualifier, but it does 
not put the system tables first. I make the change here to make web be 
consistent with the shell.

Would you please help to review the patch at your convenience? I am trying to 
add some new UTs.

> Make table sorted when displaying rsgroup info in shell and master web UI
> -------------------------------------------------------------------------
>
>                 Key: HBASE-21478
>                 URL: https://issues.apache.org/jira/browse/HBASE-21478
>             Project: HBase
>          Issue Type: Improvement
>          Components: rsgroup
>            Reporter: Xiang Li
>            Assignee: Xiang Li
>            Priority: Minor
>
> Regarding the output of the command of "get_rsgoup" in hbase shell, or the 
> section of "Server Group" of HMaster's web UI, the tables are not sorted, so 
> not quite easy to read, like:
> {code}
> hbase(main):003:0> get_rsgroup 'default'
> GROUP INFORMATION
> ...
> Tables:
> table3
> ns2:table22
> table1
> ns1:table11
> ...
> {code}
> They could be sorted in the order of namespace then table name:
> {code}
> table1
> table3
> ns1:table11
> ns2:table22
> {code}



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

Reply via email to