Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1AE4A17615 for ; Fri, 24 Oct 2014 14:44:35 +0000 (UTC) Received: (qmail 30660 invoked by uid 500); 24 Oct 2014 14:44:34 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 30550 invoked by uid 500); 24 Oct 2014 14:44:34 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 30238 invoked by uid 99); 24 Oct 2014 14:44:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2014 14:44:34 +0000 Date: Fri, 24 Oct 2014 14:44:34 +0000 (UTC) From: "Ted Yu (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-12337) Import tool fails with NullPointerException if clusterIds is not initialized MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Ted Yu created HBASE-12337: ------------------------------ Summary: Import tool fails with NullPointerException if clusterIds is not initialized Key: HBASE-12337 URL: https://issues.apache.org/jira/browse/HBASE-12337 Project: HBase Issue Type: Bug Reporter: Ted Yu Assignee: Ted Yu Flavio Pompermaier reported in this thread: http://search-hadoop.com/m/DHED4eZ8Nk1/Error+during+HBase+import&subj=Error+during+HBase+import Here is stack trace: {code} Error: java.lang.NullPointerException at org.apache.hadoop.hbase.client.Mutation.setClusterIds(Mutation.java:331) at org.apache.hadoop.hbase.mapreduce.Import$Importer.writeResult(Import.java:180) at org.apache.hadoop.hbase.mapreduce.Import$Importer.map(Import.java:142) at org.apache.hadoop.hbase.mapreduce.Import$Importer.map(Import.java:125) at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:167) at java.security.AccessController.doPrivileged(Native Method) {code} This was due to clusterIds not being initialized in setup() method: {code} try { zkw = new ZooKeeperWatcher(conf, context.getTaskAttemptID().toString(), null); clusterIds = Collections.singletonList(ZKClusterId.getUUIDForCluster(zkw)); } catch (ZooKeeperConnectionException e) { {code} Instead of throwing NullPointerException from Import$Importer, Import should exit early with proper message and exit code. -- This message was sent by Atlassian JIRA (v6.3.4#6332)