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 97A25200B54 for ; Thu, 28 Jul 2016 08:47:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 963CB160A63; Thu, 28 Jul 2016 06:47:22 +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 DFDD0160A85 for ; Thu, 28 Jul 2016 08:47:21 +0200 (CEST) Received: (qmail 39115 invoked by uid 500); 28 Jul 2016 06:47:21 -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 38848 invoked by uid 99); 28 Jul 2016 06:47:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2016 06:47:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A02612C0D65 for ; Thu, 28 Jul 2016 06:47:20 +0000 (UTC) Date: Thu, 28 Jul 2016 06:47:20 +0000 (UTC) From: "Heng Chen (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HBASE-16234) Expect and handle nulls when assigning replicas MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 28 Jul 2016 06:47:22 -0000 [ https://issues.apache.org/jira/browse/HBASE-16234?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D153= 97032#comment-15397032 ]=20 Heng Chen edited comment on HBASE-16234 at 7/28/16 6:47 AM: ------------------------------------------------------------ {code} + HTableDescriptor htd =3D master.getTableDescriptors().get(table); + if (htd =3D=3D null) { + LOG.warn("master can not get TableDescriptor from table '" + tab= le); + } else { + desiredRegionReplication =3D htd.getRegionReplication(); + } {code} If htd is null, why not continue the loop? wdyt? was (Author: chenheng): {quote} + HTableDescriptor htd =3D master.getTableDescriptors().get(table); + if (htd =3D=3D null) { + LOG.warn("master can not get TableDescriptor from table '" + tab= le); + } else { + desiredRegionReplication =3D htd.getRegionReplication(); + } {quote} If htd is null, why not continue the loop? wdyt? > Expect and handle nulls when assigning replicas > ----------------------------------------------- > > Key: HBASE-16234 > URL: https://issues.apache.org/jira/browse/HBASE-16234 > Project: HBase > Issue Type: Bug > Components: Region Assignment > Affects Versions: 2.0.0 > Reporter: Harsh J > Assignee: Yi Liang > Attachments: HBASE-16234-V1.patch, HBASE-16234-V1.patch, HBASE-16= 234-V2.patch, HBASE-16234-V3.patch > > > Observed this on a cluster: > {code} > FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starti= ng shutdown.=20 > java.lang.NullPointerException=20 > at org.apache.hadoop.hbase.master.AssignmentManager.replicaRegionsNotReco= rdedInMeta(AssignmentManager.java:2799)=20 > at org.apache.hadoop.hbase.master.AssignmentManager.assignAllUserRegions(= AssignmentManager.java:2778)=20 > at org.apache.hadoop.hbase.master.AssignmentManager.processDeadServersAnd= RegionsInTransition(AssignmentManager.java:638)=20 > at org.apache.hadoop.hbase.master.AssignmentManager.joinCluster(Assignmen= tManager.java:485)=20 > at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitializatio= n(HMaster.java:723)=20 > at org.apache.hadoop.hbase.master.HMaster.access$500(HMaster.java:169)=20 > at org.apache.hadoop.hbase.master.HMaster$1.run(HMaster.java:1481)=20 > at java.lang.Thread.run(Thread.java:745)=20 > {code} > It looks like {{FSTableDescriptors#get(=E2=80=A6)}} can be expected to re= turn null in some cases, but {{AssignmentManager.replicaRegionsNotRecordedI= nMeta(=E2=80=A6)}} does not currently have any handling for such a possibil= ity. -- This message was sent by Atlassian JIRA (v6.3.4#6332)