[ 
https://issues.apache.org/jira/browse/HBASE-22119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiang Li updated HBASE-22119:
-----------------------------
    Status: Patch Available  (was: Open)

> Provide functions in RSGroupInfo to check if a group is the default group
> -------------------------------------------------------------------------
>
>                 Key: HBASE-22119
>                 URL: https://issues.apache.org/jira/browse/HBASE-22119
>             Project: HBase
>          Issue Type: Improvement
>          Components: rsgroup
>            Reporter: Xiang Li
>            Assignee: Xiang Li
>            Priority: Minor
>         Attachments: HBASE-22119.branch-1.000.patch, 
> HBASE-22119.master.000.patch
>
>
> There are several places to check if a group is the "default" group, where 
> the input could be a String or a RSGroupInfo.
> It is better to provide official functions in RSGroupInfo to tell if a group 
> is the default group, so as to
> * Simply the code
> * Make it more safe. It is not safe as there is no null check like 
> {code}
> if (!group.getName().equals(RSGroupInfo.DEFAULT_GROUP))
> {code}
> It is more safe to check like:
> {code}
> RSGroupInfo.DEFAULT_GROUP.equals(group.getName())
> {code}



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

Reply via email to