[
https://issues.apache.org/jira/browse/HBASE-21768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16773817#comment-16773817
]
Nihal Jain commented on HBASE-21768:
------------------------------------
{quote}But the rubocop check is too strick. I can not solve it . Can you help
out
{quote}
To fix this, see [Class:
RuboCop::Cop::Style::ConditionalAssignment|https://www.rubydoc.info/github/bbatsov/RuboCop/RuboCop/Cop/Style/ConditionalAssignment]
Instead of:
{code:java}
if foo
some_method
bar = 1
else
some_other_method
bar = 2
end
{code}
We could do:
{code:java}
bar = if foo
1
else
2
end
{code}
The current code seems more readable to me though.
Also in [^HBASE-21768.master.0004.patch] I see some irrelevant changes
{{quotas.rb.swp}}. Could you please check?
> list_quota_table_sizes/list_quota_snapshots should print human readable
> values for size
> ---------------------------------------------------------------------------------------
>
> Key: HBASE-21768
> URL: https://issues.apache.org/jira/browse/HBASE-21768
> Project: HBase
> Issue Type: Improvement
> Components: shell
> Reporter: xuqinya
> Assignee: xuqinya
> Priority: Minor
> Attachments: HBASE-21768.master.0001.patch,
> HBASE-21768.master.0002.patch, HBASE-21768.master.0003.patch,
> HBASE-21768.master.0004.patch
>
>
> +underlined text+Using space quota,
> list_quota_table_sizes/list_quota_snapshots should print human readable
> values for size.Keep the old implementation by default, add *HUMANREADABLE*
> constant.
> {code:java}
> hbase(main):001:0> list_quota_table_sizes
> TABLE SIZE
> TestTable 110399
> t1 5211
> hbase(main):002:0> list_quota_snapshots
> TABLE USAGE LIMIT IN_VIOLATION POLICY
> t1 5211 1073741824 false None
> {code}
> Using HUMANREADABLE :
> {code:java}
> hbase(main):001:0> list_quota_snapshots({HUMANREADABLE=>'true'})
> TABLE USAGE LIMIT IN_VIOLATION POLICY
> TestTable 20G 2T false None
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)