[
https://issues.apache.org/jira/browse/HBASE-27878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
huginn updated HBASE-27878:
---------------------------
Description:
Running the balance_rsgroup 'default' command can fail when the assignment
state contains a region without a current RegionServer. The command asks the
RSGroup balancer to build a cluster view from the current region assignments.
If an assignment has a null ServerName, that value is used as a server key.
RSGroupBasedLoadBalancer#correctAssignments then calls getAddress() on the null
server, causing a NullPointerException and preventing the RSGroup balance
operation from completing.
The observed failure is:
hbase(main):001:0> balance_rsgroup 'default'
ERROR: java.io.IOException: Cannot invoke
"org.apache.hadoop.hbase.ServerName.getAddress()" because "currentHostServer"
is null
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:466)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:133)
at
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:338)
at
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:318)
Caused by: java.lang.NullPointerException: Cannot invoke
"org.apache.hadoop.hbase.ServerName.getAddress()" because "currentHostServer"
is null
at
org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer.correctAssignments(RSGroupBasedLoadBalancer.java:320)
at
org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer.balanceCluster(RSGroupBasedLoadBalancer.java:126)
at
org.apache.hadoop.hbase.rsgroup.RSGroupAdminServer.balanceRSGroup(RSGroupAdminServer.java:461)
at
org.apache.hadoop.hbase.rsgroup.RSGroupAdminEndpoint$RSGroupAdminServiceImpl.balanceRSGroup(RSGroupAdminEndpoint.java:301)
at
org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos$RSGroupAdminService.callMethod(RSGroupAdminProtos.java:14948)
at
org.apache.hadoop.hbase.master.MasterRpcServices.execMasterService(MasterProtos.java:921)
at
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:394)
... 3 more
For usage try 'help "balance_rsgroup"'
The fix is to skip assignments that do not have a current RegionServer when
constructing the RSGroup balancer input. Those regions are not currently
balanceable; skipping them allows balancing to continue for the remaining valid
assignments.
was:
hbase(main):001:0> balance_rsgroup 'default'
ERROR: java.io.IOException: Cannot invoke
"org.apache.hadoop.hbase.ServerName.getAddress()" because "currentHostServer"
is null
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:466)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:133)
at
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:338)
at
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:318)
Caused by: java.lang.NullPointerException: Cannot invoke
"org.apache.hadoop.hbase.ServerName.getAddress()" because "currentHostServer"
is null
at
org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer.correctAssignments(RSGroupBasedLoadBalancer.java:320)
at
org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer.balanceCluster(RSGroupBasedLoadBalancer.java:126)
at
org.apache.hadoop.hbase.rsgroup.RSGroupAdminServer.balanceRSGroup(RSGroupAdminServer.java:461)
at
org.apache.hadoop.hbase.rsgroup.RSGroupAdminEndpoint$RSGroupAdminServiceImpl.balanceRSGroup(RSGroupAdminEndpoint.java:301)
at
org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos$RSGroupAdminService.callMethod(RSGroupAdminProtos.java:14948)
at
org.apache.hadoop.hbase.master.MasterRpcServices.execMasterService(MasterRpcServices.java:921)
at
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:394)
... 3 more
For usage try 'help "balance_rsgroup"'
Summary: balance_rsgroup NullPointerException (was:
https://issues.apache.org/jira/secure/AddComment!default.jspa?id=13666855)
> balance_rsgroup NullPointerException
> ------------------------------------
>
> Key: HBASE-27878
> URL: https://issues.apache.org/jira/browse/HBASE-27878
> Project: HBase
> Issue Type: Bug
> Reporter: zhengsicheng
> Assignee: zhengsicheng
> Priority: Minor
> Labels: pull-request-available
>
> Running the balance_rsgroup 'default' command can fail when the assignment
> state contains a region without a current RegionServer. The command asks the
> RSGroup balancer to build a cluster view from the current region assignments.
> If an assignment has a null ServerName, that value is used as a server key.
> RSGroupBasedLoadBalancer#correctAssignments then calls getAddress() on the
> null server, causing a NullPointerException and preventing the RSGroup
> balance operation from completing.
> The observed failure is:
> hbase(main):001:0> balance_rsgroup 'default'
> ERROR: java.io.IOException: Cannot invoke
> "org.apache.hadoop.hbase.ServerName.getAddress()" because "currentHostServer"
> is null
> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:466)
> at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:133)
> at
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:338)
> at
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:318)
> Caused by: java.lang.NullPointerException: Cannot invoke
> "org.apache.hadoop.hbase.ServerName.getAddress()" because "currentHostServer"
> is null
> at
> org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer.correctAssignments(RSGroupBasedLoadBalancer.java:320)
> at
> org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer.balanceCluster(RSGroupBasedLoadBalancer.java:126)
> at
> org.apache.hadoop.hbase.rsgroup.RSGroupAdminServer.balanceRSGroup(RSGroupAdminServer.java:461)
> at
> org.apache.hadoop.hbase.rsgroup.RSGroupAdminEndpoint$RSGroupAdminServiceImpl.balanceRSGroup(RSGroupAdminEndpoint.java:301)
> at
> org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos$RSGroupAdminService.callMethod(RSGroupAdminProtos.java:14948)
> at
> org.apache.hadoop.hbase.master.MasterRpcServices.execMasterService(MasterProtos.java:921)
> at
> org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:394)
> ... 3 more
> For usage try 'help "balance_rsgroup"'
> The fix is to skip assignments that do not have a current RegionServer when
> constructing the RSGroup balancer input. Those regions are not currently
> balanceable; skipping them allows balancing to continue for the remaining
> valid assignments.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)