HBASE-3878 Hbase client throws NoSuchElementException
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1102416 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1bf409f052
commit
e218325a61
|
@ -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
|
||||
|
|
|
@ -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().
|
||||
|
|
Loading…
Reference in New Issue