Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
2.5.0, 2.4.13, 3.0.0-alpha-4
-
None
-
Reviewed
Description
When executing the command ’graceful_stop.sh --restart --reload‘, the balance state cannot be restored normally. Because the related command returned the wrong result:
HBASE_BALANCER_STATE=$(echo 'balance_switch false' | hbase shell -n | tail -1)
echo ${HBASE_BALANCER_STATE}
hbase:002:0>
The information returned by "echo 'balance_switch false' | hbase shell -n" is as follows:
hbase:001:0> balance_switch false #line 1
2022-08-05 22:41:57,269 INFO [RPCClient-NioEventLoopGroup-1-1] Configuration.deprecation: hbase.client.pause.cqtbe is deprecated. Instead, use hbase.client.pause.server.overloaded #line 2
Previous balancer state : true # line 3
Took 0.6787 seconds #line 4
=> true #line 5
hbase:002:0> #line 6
head -1 is #line 1: "hbase:001:0> balance_switch false"
tail -1 is #line 6: "hbase:002:0>"
balance_switch.rb is as follows:
def command(enableDisable)
prev_state = !!admin.balance_switch(enableDisable)
formatter.row(["Previous balancer state : #{prev_state}"])
prev_state
end
#line 3 and #line 5 of 'true' represent the previous balance status.
So we can use the value of #line 5 as the state of the previous balance.
Attachments
Issue Links
- links to