Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F0B8E7777 for ; Wed, 20 Jul 2011 02:17:22 +0000 (UTC) Received: (qmail 81671 invoked by uid 500); 20 Jul 2011 02:17:22 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 81605 invoked by uid 500); 20 Jul 2011 02:17:22 -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 81596 invoked by uid 99); 20 Jul 2011 02:17:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2011 02:17:21 +0000 X-ASF-Spam-Status: No, hits=-2001.1 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2011 02:17:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E9D4E45666 for ; Wed, 20 Jul 2011 02:16:57 +0000 (UTC) Date: Wed, 20 Jul 2011 02:16:57 +0000 (UTC) From: "gaojinchao (JIRA)" To: issues@hbase.apache.org Message-ID: <639443216.6471.1311128217954.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1145643091.21692.1310957520074.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-4112) Creating table may throw NullPointerException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-4112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] gaojinchao updated HBASE-4112: ------------------------------ Resolution: Fixed Status: Resolved (was: Patch Available) > Creating table may throw NullPointerException > --------------------------------------------- > > Key: HBASE-4112 > URL: https://issues.apache.org/jira/browse/HBASE-4112 > Project: HBase > Issue Type: Bug > Components: master > Affects Versions: 0.90.3 > Reporter: gaojinchao > Assignee: gaojinchao > Fix For: 0.90.4 > > Attachments: HBASE-4112_Trunk.patch, HBASE-4112_branch90V1.patch > > > It happened in latest branch 0.90. but I can't reproduce it. > > > > It seems using api getHRegionInfoOrNull is better or check the input parameter before call getHRegionInfo. > > > > Code: > > public static Writable getWritable(final byte [] bytes, final > > Writable w) > > throws IOException { > > return getWritable(bytes, 0, bytes.length, w); > > } > > return getWritable(bytes, 0, bytes.length, w); // It seems input > > parameter bytes is null > > > > logs: > > 11/07/15 10:15:42 INFO zookeeper.ClientCnxn: Socket connection > > established to C4C3.site/157.5.100.3:2181, initiating session > > 11/07/15 10:15:42 INFO zookeeper.ClientCnxn: Session establishment > > complete on server C4C3.site/157.5.100.3:2181, sessionid = 0x2312b8e3f700002, negotiated timeout = 180000 [INFO] Create : ufdr111 222! > > [INFO] Create : ufdr111 start! > > java.lang.NullPointerException > > at > > org.apache.hadoop.hbase.util.Writables.getWritable(Writables.java:75) > > at > > org.apache.hadoop.hbase.util.Writables.getHRegionInfo(Writables.java:1 > > 19) > > at > > org.apache.hadoop.hbase.client.HBaseAdmin$1.processRow(HBaseAdmin.java > > :306) > > at > > org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:1 > > 90) > > at > > org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:9 > > 5) > > at > > org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:7 > > 3) > > at > > org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java: > > 325) > > at createTable.main(createTable.java:96) > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira