accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [2/3] git commit: ACCUMULO-1921 check for null
Date Fri, 22 Nov 2013 21:28:20 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/7dd3592c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7dd3592c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7dd3592c

Branch: refs/heads/master
Commit: 7dd3592cdcc333d221477d6b97584e1f1c514e3b
Parents: 40d4918
Author: Eric Newton <eric.newton@gmail.com>
Authored: Fri Nov 22 16:28:11 2013 -0500
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Fri Nov 22 16:28:11 2013 -0500

----------------------------------------------------------------------
 .../apache/accumulo/tserver/TabletServer.java   | 24 +++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7dd3592c/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index e7ac7fc..cb8c83e 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -2838,21 +2838,23 @@ 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
+            // split was rolled back... try again
           new AssignmentHandler(pair.getSecond()).run();
           return;
         }
+        }
       } catch (Exception e) {
         synchronized (openingTablets) {
           openingTablets.remove(extent);


Mime
View raw message