You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Monani Mihir (JIRA)" <ji...@apache.org> on 2018/07/06 12:05:00 UTC

[jira] [Commented] (HBASE-16910) Avoid NPE when starting StochasticLoadBalancer

    [ https://issues.apache.org/jira/browse/HBASE-16910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16534754#comment-16534754 ] 

Monani Mihir commented on HBASE-16910:
--------------------------------------

Hi [~mantonov] , are you planning to pick this patch for branch-1.3 ? 

Apart from issue mention in JIRA, when ever we do master failover, below error will be thrown :- 
{code:java}
2018-03-10 01:08:37,403 DEBUG [main-EventThread] master.ActiveMasterManager - No master available. Notifying waiting threads
.
.
.
2018-03-10 01:09:42,571 ERROR [.activeMasterManager] balancer.StochasticLoadBalancer - failed to get the size of all tables, exception = null
{code}
Master failover will works without this patch too. Its just throw above mentioned error even if it is set is *setByTable = false*

> Avoid NPE when starting StochasticLoadBalancer
> ----------------------------------------------
>
>                 Key: HBASE-16910
>                 URL: https://issues.apache.org/jira/browse/HBASE-16910
>             Project: HBase
>          Issue Type: Bug
>          Components: Balancer
>    Affects Versions: 2.0.0
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>            Priority: Minor
>             Fix For: 1.4.0, 2.0.0
>
>         Attachments: HBASE-16910-branch-1.patch, HBASE-16910-v1.patch, HBASE-16910.patch
>
>
> When master start, it initialize StochasticLoadBalancer.
> {code}
> this.balancer.setClusterStatus(getClusterStatus());
> this.balancer.setMasterServices(this);
> {code}
> It first setClusterStatus(), then setMasterService(). But in setClusterStatus method, it use master service which is not initialized. So it will throw NPE.
> {code}
> int tablesCount = isByTable ? services.getTableDescriptors().getAll().size() : 1;
> {code}
> It happens when set isByTable is ture.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)