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

Josh Elser updated HBASE-26550:
-------------------------------
    Description: 
Noticed this in a unit test from [https://github.com/apache/hbase/pull/3851]

I believe this is a result of the new balance() implementation in the Master, 
and a client submitting a request to the master before it's completed its 
instantiation. Simple fix to avoid the NPE.
{noformat}
Failed after attempts=2, exceptions:
2021-12-07T18:14:19.203Z, java.io.IOException: java.io.IOException
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:461)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:138)
        at 
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:354)
        at 
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:334)
Caused by: java.lang.NullPointerException
        at 
org.apache.hadoop.hbase.master.HMaster.getProcedures(HMaster.java:3335)
        at 
org.apache.hadoop.hbase.master.ServerManager.areDeadServersInProgress(ServerManager.java:505)
        at org.apache.hadoop.hbase.master.HMaster.balance(HMaster.java:1886)
        at 
org.apache.hadoop.hbase.master.MasterRpcServices.balance(MasterRpcServices.java:740)
        at 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:393)
        ... 3 more {noformat}

  was:
Noticed this in a unit test from [https://github.com/apache/hbase/pull/3851]

I believe this is a result of the new balance() implementation in the Master, 
and a client submitting a request to the master before it's completed its 
instantiation. Simple fix to avoid the NPE.


> NPE if balance request comes in before master is initialized
> ------------------------------------------------------------
>
>                 Key: HBASE-26550
>                 URL: https://issues.apache.org/jira/browse/HBASE-26550
>             Project: HBase
>          Issue Type: Bug
>          Components: Balancer, master
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>            Priority: Minor
>             Fix For: 3.0.0-alpha-2
>
>
> Noticed this in a unit test from [https://github.com/apache/hbase/pull/3851]
> I believe this is a result of the new balance() implementation in the Master, 
> and a client submitting a request to the master before it's completed its 
> instantiation. Simple fix to avoid the NPE.
> {noformat}
> Failed after attempts=2, exceptions:
> 2021-12-07T18:14:19.203Z, java.io.IOException: java.io.IOException
>       at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:461)
>       at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:138)
>       at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:354)
>       at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:334)
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.hadoop.hbase.master.HMaster.getProcedures(HMaster.java:3335)
>       at 
> org.apache.hadoop.hbase.master.ServerManager.areDeadServersInProgress(ServerManager.java:505)
>       at org.apache.hadoop.hbase.master.HMaster.balance(HMaster.java:1886)
>       at 
> org.apache.hadoop.hbase.master.MasterRpcServices.balance(MasterRpcServices.java:740)
>       at 
> org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
>       at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:393)
>       ... 3 more {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to