[ https://issues.apache.org/jira/browse/HBASE-18350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16198667#comment-16198667 ]
Sean Busbey commented on HBASE-18350: ------------------------------------- {code}/testptch/hbase/hbase-shell/src/main/ruby/hbase/rsgroup_admin.rb:48:7: C: Redundant `return` detected.{code} the "return group" here: {code} - - res unless block_given? + return group end {code} should just be "group" {code} /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb:32:7: C: Assignment Branch Condition size for command is too high. [20.02/15] /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb:32:7: C: Method has too many lines. [11/10] {code} The method looks fine to me. Should silence Rubocop here. {code} /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb:42:11: C: Favor modifier `if` usage when having a single-line body. Another good alternative is the usage of control flow `&&`/`||`. /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb:42:11: C: Favor `unless` over `if` for negative conditions. {code} This is saying that in this case: {code} - formatter.row([group]) + if !group.getName.match(regex) + next + end {code} you should instead say {{next unless group.getName.match(regex)}} {code} /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb:71:11: C: Favor modifier `if` usage when having a single-line body. Another good alternative is the usage of control flow `&&`/`||`. /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb:71:11: C: Favor `unless` over `if` for negative conditions. {code} this is saying that in this case: {code} + if !group_name_printed + formatter.row([group.getName, '']) + end {code} you should instead say {{formatter.row(\[group.getName,''\]) unless group_name_printed}} {code} /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb:34:7: C: Assignment Branch Condition size for command is too high. [31.78/15] /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb:34:7: C: Method has too many lines. [33/10] /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb:34:7: C: Perceived complexity for command is too high. [8/7] /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb:41:9: C: Block has too many lines. [26/25] {code} All of these point to "Shell::Command::ListRsgroups#command" is too complicated. I agree with rubocop, but I don't see a way this can be meaningfully simplified given our current shell codebase, so I think you should silence these as well. > RSGroups are broken under AMv2 > ------------------------------ > > Key: HBASE-18350 > URL: https://issues.apache.org/jira/browse/HBASE-18350 > Project: HBase > Issue Type: Bug > Components: rsgroup > Affects Versions: 2.0.0-alpha-1 > Reporter: Stephen Yuan Jiang > Assignee: Balazs Meszaros > Priority: Blocker > Fix For: 2.0.0-beta-2 > > Attachments: HBASE-18350.master.001.patch > > > The following RSGroups tests were disabled by Core Proc-V2 AM in HBASE-14614: > - Disabled/Ignore TestRSGroupsOfflineMode#testOffline; need to dig in on what > offline is. > - Disabled/Ignore TestRSGroups. > This JIRA tracks the work to enable them (or remove/modify if not applicable). -- This message was sent by Atlassian JIRA (v6.4.14#64029)