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 C49345756 for ; Thu, 12 May 2011 18:48:22 +0000 (UTC) Received: (qmail 38171 invoked by uid 500); 12 May 2011 18:48:22 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 38149 invoked by uid 500); 12 May 2011 18:48:22 -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 38142 invoked by uid 99); 12 May 2011 18:48:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 May 2011 18:48:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 May 2011 18:48:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7AC6323889EA; Thu, 12 May 2011 18:47:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1102418 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java Date: Thu, 12 May 2011 18:47:59 -0000 To: commits@hbase.apache.org From: stack@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110512184759.7AC6323889EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stack Date: Thu May 12 18:47:59 2011 New Revision: 1102418 URL: http://svn.apache.org/viewvc?rev=1102418&view=rev Log: HBASE-3878 Hbase client throws NoSuchElementException Modified: hbase/branches/0.90/CHANGES.txt hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java Modified: hbase/branches/0.90/CHANGES.txt URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1102418&r1=1102417&r2=1102418&view=diff ============================================================================== --- hbase/branches/0.90/CHANGES.txt (original) +++ hbase/branches/0.90/CHANGES.txt Thu May 12 18:47:59 2011 @@ -3,6 +3,7 @@ Release 0.90.4 - Unreleased BUG FIXES HBASE-3617 NoRouteToHostException during balancing will cause Master abort (Ted Yu) + HBASE-3878 Hbase client throws NoSuchElementException (Ted Yu) Release 0.90.3 - Unreleased BUG FIXES Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1102418&r1=1102417&r2=1102418&view=diff ============================================================================== --- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original) +++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java Thu May 12 18:47:59 2011 @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.NoSuchElementException; import java.util.Map.Entry; import java.util.Set; import java.util.TreeSet; @@ -833,8 +834,12 @@ public class HConnectionManager { // we need to examine the cached location to verify that it is // a match by end key as well. if (!matchingRegions.isEmpty()) { - HRegionLocation possibleRegion = - matchingRegions.get(matchingRegions.lastKey()); + HRegionLocation possibleRegion = null; + try { + possibleRegion = matchingRegions.get(matchingRegions.lastKey()); + } catch (NoSuchElementException nsee) { + LOG.warn("checkReferences() might have removed the key", nsee); + } // there is a possibility that the reference was garbage collected // in the instant since we checked isEmpty().