[ https://issues.apache.org/jira/browse/HBASE-20703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16508181#comment-16508181 ]
Sean Busbey commented on HBASE-20703: ------------------------------------- Rubocop complaints should either be fixed or contextually disabled. e.g. {code} /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/set_quota.rb:89:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for command is too high. [11/6] {code} While it'd be good for us to fix this, I don't think the level of rewriting needed is a priority right now so disabling this one for the method is a good idea. {code} /testptch/hbase/hbase-shell/src/main/ruby/shell/commands/list_quota_snapshots.rb:54:81: C: Metrics/LineLength: Line is too long. [95/80] {code} This one should get fixed. I thought we allowed a line length of 100; alternatively I'd be supportive of changing the rubocop config to do that. > When quota feature is off shell should give a nice message > ---------------------------------------------------------- > > Key: HBASE-20703 > URL: https://issues.apache.org/jira/browse/HBASE-20703 > Project: HBase > Issue Type: Improvement > Components: shell, Usability > Affects Versions: 2.0.0 > Reporter: Sean Busbey > Assignee: Xu Cang > Priority: Major > Attachments: HBASE-20703.master.001.patch, > HBASE-20703.master.004.patch, HBASE-20703.master.005.patch, > HBASE-20703.master.006.patch, HBASE-20703.master.007.patch > > > When quota is off the shell gives a error that requires knowledge of our > implementation details to understand: > {code} > 2.2.1 :001 > list_snapshot_sizes > SNAPSHOT SIZE > > > ERROR: Unknown table hbase:quota! > For usage try 'help "list_snapshot_sizes"' > Took 1.6285 seconds > > > 2.2.1 :002 > list_quota_snapshots > TABLE USAGE LIMIT IN_VIOLATION POLICY > ERROR: Unknown table hbase:quota! > For usage try 'help "list_quota_snapshots"' > Took 0.0371 seconds > {code} > Or it just doesn't mention that quotas can't exist: > {code} > 2.2.1 :003 > list_quotas > OWNER QUOTAS > > > 0 row(s) > Took 0.0475 seconds > > > 2.2.1 :004 > list_quota_table_sizes > TABLE SIZE > > > 0 row(s) > Took 0.1221 seconds > {code} > set quota gives a better pointer that the problem is the feature is off: > {code} > 2.2.1 :005 > set_quota USER => 'busbey', GLOBAL_BYPASS => true > ERROR: org.apache.hadoop.hbase.DoNotRetryIOException: > java.lang.UnsupportedOperationException: quota support disabled > at > org.apache.hadoop.hbase.quotas.MasterQuotaManager.checkQuotaSupport(MasterQuotaManager.java:442) > at > org.apache.hadoop.hbase.quotas.MasterQuotaManager.setQuota(MasterQuotaManager.java:124) > at > org.apache.hadoop.hbase.master.MasterRpcServices.setQuota(MasterRpcServices.java:1555) > at > org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java) > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) > at > org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) > at > org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) > Caused by: java.lang.UnsupportedOperationException: quota support disabled > ... 8 more > For usage try 'help "set_quota"' > {code} > Instead we should give a nice message, like you get if visibility labels is > off: > {code} > 2.2.1 :06 > list_labels > ERROR: DISABLED: Visibility labels feature is not available > For usage try 'help "list_labels"' > Took 0.0426 seconds > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)