accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/6] git commit: ACCUMULO-1921 check for null
Date Fri, 24 Jan 2014 16:39:08 GMT
ACCUMULO-1921 check for null


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4cac84ec
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4cac84ec
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4cac84ec

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 4cac84ecd70bce51f12791194d1ab721f29b2d57
Parents: da2b79b
Author: Eric Newton <eric.newton@gmail.com>
Authored: Fri Nov 22 16:28:11 2013 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Fri Jan 24 11:38:00 2014 -0500

----------------------------------------------------------------------
 .../server/tabletserver/TabletServer.java       | 26 +++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4cac84ec/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
index c5695bc..8f2bbed 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
@@ -2449,20 +2449,22 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
       SortedMap<Key,Value> tabletsKeyValues = new TreeMap<Key,Value>();
       try {
         Pair<Text,KeyExtent> pair = verifyTabletInformation(extent, TabletServer.this.getTabletSession(),
tabletsKeyValues, getClientAddressString(), getLock());
-        locationToOpen = pair.getFirst();
-        if (pair.getSecond() != null) {
-          synchronized (openingTablets) {
-            openingTablets.remove(extent);
-            openingTablets.notifyAll();
-            // it expected that the new extent will overlap the old one... if it does not,
it should not be added to unopenedTablets
-            if (!KeyExtent.findOverlapping(extent, new TreeSet<KeyExtent>(Arrays.asList(pair.getSecond()))).contains(pair.getSecond()))
{
-              throw new IllegalStateException("Fixed split does not overlap " + extent +
" " + pair.getSecond());
+        if (pair != null) {
+          locationToOpen = pair.getFirst();
+          if (pair.getSecond() != null) {
+            synchronized (openingTablets) {
+              openingTablets.remove(extent);
+              openingTablets.notifyAll();
+              // it expected that the new extent will overlap the old one... if it does not,
it should not be added to unopenedTablets
+              if (!KeyExtent.findOverlapping(extent, new TreeSet<KeyExtent>(Arrays.asList(pair.getSecond()))).contains(pair.getSecond()))
{
+                throw new IllegalStateException("Fixed split does not overlap " + extent
+ " " + pair.getSecond());
+              }
+              unopenedTablets.add(pair.getSecond());
             }
-            unopenedTablets.add(pair.getSecond());
+            // split was rolled back... try again
+            new AssignmentHandler(pair.getSecond()).run();
+            return;
           }
-          // split was rolled back... try again
-          new AssignmentHandler(pair.getSecond()).run();
-          return;
         }
       } catch (Exception e) {
         synchronized (openingTablets) {


Mime
View raw message