You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2011/05/12 20:47:07 UTC
svn commit: r1102416 - in /hbase/trunk: CHANGES.txt
src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Author: stack
Date: Thu May 12 18:47:06 2011
New Revision: 1102416
URL: http://svn.apache.org/viewvc?rev=1102416&view=rev
Log:
HBASE-3878 Hbase client throws NoSuchElementException
Modified:
hbase/trunk/CHANGES.txt
hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1102416&r1=1102415&r2=1102416&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Thu May 12 18:47:06 2011
@@ -251,6 +251,11 @@ Release 0.91.0 - Unreleased
HBASE-3839 Add monitoring of currently running tasks to the master and
RS web UIs
+Release 0.90.4 - Unreleased
+
+ BUG FIXES
+ HBASE-3878 Hbase client throws NoSuchElementException (Ted Yu)
+
Release 0.90.3 - Unreleased
BUG FIXES
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1102416&r1=1102415&r2=1102416&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java Thu May 12 18:47:06 2011
@@ -30,6 +30,7 @@ import java.util.HashSet;
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.TreeMap;
@@ -1059,8 +1060,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().