[
https://issues.apache.org/jira/browse/HBASE-22119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16803305#comment-16803305
]
Xu Cang edited comment on HBASE-22119 at 3/27/19 8:08 PM:
----------------------------------------------------------
LGTM +1
(let's have a branch-1 patch if you don't mind, then I will push) thanks
was (Author: xucang):
LGTM +1
> 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.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)