Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 63C7B200BBD for ; Tue, 25 Oct 2016 08:20:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 625CF160B02; Tue, 25 Oct 2016 06:20:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CF309160B00 for ; Tue, 25 Oct 2016 08:19:59 +0200 (CEST) Received: (qmail 63353 invoked by uid 500); 25 Oct 2016 06:19:58 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 63335 invoked by uid 99); 25 Oct 2016 06:19:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2016 06:19:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8542A2C2A6B for ; Tue, 25 Oct 2016 06:19:58 +0000 (UTC) Date: Tue, 25 Oct 2016 06:19:58 +0000 (UTC) From: "Guanghao Zhang (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16910) Avoid NPE when starting StochasticLoadBalancer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 25 Oct 2016 06:20:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-16910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15604349#comment-15604349 ] Guanghao Zhang commented on HBASE-16910: ---------------------------------------- Attach a patch for branch-1. It can be applied on branch-1 and branch-1.3. This bug was introduced by HBASE-13965, it was applied on branch-1.3. So this fix only need be applied on brnach-1.3 and branch-1, too. Thanks. > 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: 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 (v6.3.4#6332)