You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Duo Zhang (Jira)" <ji...@apache.org> on 2022/08/09 02:00:00 UTC

[jira] [Resolved] (HBASE-27275) graceful_stop.sh unable to restore the balance state

     [ https://issues.apache.org/jira/browse/HBASE-27275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Duo Zhang resolved HBASE-27275.
-------------------------------
    Fix Version/s: 2.5.0
                   3.0.0-alpha-4
                   2.4.14
     Hadoop Flags: Reviewed
       Resolution: Fixed

Pushed to branch-2.4+.

Thanks [~heliangjun] for contributing!

> graceful_stop.sh unable to restore the balance state
> ----------------------------------------------------
>
>                 Key: HBASE-27275
>                 URL: https://issues.apache.org/jira/browse/HBASE-27275
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 2.4.13, 2.5.1, 3.0.0-alpha-4
>            Reporter: LiangJun He
>            Assignee: LiangJun He
>            Priority: Blocker
>             Fix For: 2.5.0, 3.0.0-alpha-4, 2.4.14
>
>
> When executing the command ’graceful_stop.sh --restart --reload‘, the balance state cannot be restored normally. Because the related command returned the wrong result:
> {code:java}
> HBASE_BALANCER_STATE=$(echo 'balance_switch false' | hbase shell -n | tail -1)
> echo ${HBASE_BALANCER_STATE} 
> hbase:002:0>
> {code}
>  
> The information returned by  "echo 'balance_switch false' | hbase shell -n" is as follows:
> hbase:001:0> balance_switch false  {color:#ff0000}#line 1{color}
> 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 {color:#ff0000}#line 2{color}
> Previous balancer state : true   {color:#ff0000}# line 3{color}
> Took 0.6787 seconds {color:#ff0000}#line 4{color}
> => true  {color:#ff0000}#line 5{color}
> hbase:002:0> {color:#ff0000}#line 6{color}
>  
> head -1 is {color:#172b4d}#line 1{color}: "hbase:001:0> balance_switch false"
> tail -1 is {color:#172b4d}#line 6{color}: "hbase:002:0>"
>  
> {color:#172b4d}balance_switch.rb is as follows:{color}
> {code:java}
> def command(enableDisable)
>   prev_state = !!admin.balance_switch(enableDisable)
>   formatter.row(["Previous balancer state : #{prev_state}"])
>   prev_state
> end{code}
> #line 3 and #line 5 of 'true'  represent the previous balance status.
> So we can use the value of {color:#172b4d}#line 5{color}  as the state of the previous balance.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)