Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA7F611830 for ; Tue, 24 Jun 2014 22:47:06 +0000 (UTC) Received: (qmail 89363 invoked by uid 500); 24 Jun 2014 22:47:06 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 89320 invoked by uid 500); 24 Jun 2014 22:47:06 -0000 Mailing-List: contact commits-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 commits@hbase.apache.org Received: (qmail 89291 invoked by uid 99); 24 Jun 2014 22:47:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2014 22:47:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 25F07912169; Tue, 24 Jun 2014 22:47:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tedyu@apache.org To: commits@hbase.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: HBASE-11396 Invalid meta entries can lead to unstartable master (Craig Condit) Date: Tue, 24 Jun 2014 22:47:06 +0000 (UTC) Repository: hbase Updated Branches: refs/heads/0.98 01d5e7626 -> ac5318900 HBASE-11396 Invalid meta entries can lead to unstartable master (Craig Condit) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ac531890 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ac531890 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ac531890 Branch: refs/heads/0.98 Commit: ac531890044f3997bc224e4cb0423e20e338f5d0 Parents: 01d5e76 Author: Ted Yu Authored: Tue Jun 24 22:46:49 2014 +0000 Committer: Ted Yu Committed: Tue Jun 24 22:46:49 2014 +0000 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/hbase/HRegionInfo.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/ac531890/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java index 78e175d..afd1d04 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java @@ -1056,8 +1056,13 @@ public class HRegionInfo implements Comparable { cell = r.getColumnLatestCell(HConstants.CATALOG_FAMILY, HConstants.STARTCODE_QUALIFIER); if (cell == null || cell.getValueLength() == 0) return null; - return ServerName.valueOf(hostAndPort, - Bytes.toLong(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength())); + try { + return ServerName.valueOf(hostAndPort, + Bytes.toLong(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength())); + } catch (IllegalArgumentException e) { + LOG.error("Ignoring invalid region for server " + hostAndPort + "; cell=" + cell, e); + return null; + } } /**