You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/07/14 16:02:47 UTC
[GitHub] [hbase] bitoffdev commented on a change in pull request #2058: HBASE-24722 Address hbase-shell commands with unintentional return values
bitoffdev commented on a change in pull request #2058:
URL: https://github.com/apache/hbase/pull/2058#discussion_r454467521
##########
File path: hbase-shell/src/main/ruby/shell/commands/balancer.rb
##########
@@ -44,7 +44,9 @@ def command(force = nil)
elsif !force.nil?
raise ArgumentError, "Invalid argument #{force}."
end
- formatter.row([admin.balancer(force_balancer) ? 'true' : 'false'])
+ did_balancer_run = !!admin.balancer(force_balancer)
+ formatter.row([did_balancer_run.to_s])
+ did_balancer_run
Review comment:
I think the simple implementation to encapsulate this pattern would be strange. I would rather leave this as is, and revisit the formatter more holistically as a separate ticket.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org