You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2018/02/22 22:40:51 UTC

[accumulo] branch master updated: ACCUMULO-3331 Remove dead code in TabletServer

This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new ed337cc  ACCUMULO-3331 Remove dead code in TabletServer
ed337cc is described below

commit ed337ccac7fe61816d9a98b6c1c64a5a0c18d6c5
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Thu Feb 22 17:40:29 2018 -0500

    ACCUMULO-3331 Remove dead code in TabletServer
---
 .../main/java/org/apache/accumulo/tserver/TabletServer.java | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

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 0466c75..7b78390 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
@@ -39,6 +39,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Objects;
 import java.util.Random;
 import java.util.Set;
 import java.util.SortedMap;
@@ -2749,7 +2750,9 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
   }
 
   public static Pair<Text,KeyExtent> verifyTabletInformation(AccumuloServerContext context, KeyExtent extent, TServerInstance instance,
-      SortedMap<Key,Value> tabletsKeyValues, String clientAddress, ZooLock lock) throws AccumuloSecurityException, DistributedStoreException, AccumuloException {
+      final SortedMap<Key,Value> tabletsKeyValues, String clientAddress, ZooLock lock) throws AccumuloSecurityException, DistributedStoreException,
+      AccumuloException {
+    Objects.requireNonNull(tabletsKeyValues);
 
     log.debug("verifying extent {}", extent);
     if (extent.isRootTablet()) {
@@ -2771,12 +2774,8 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
     }
 
     // only populate map after success
-    if (tabletsKeyValues == null) {
-      tabletsKeyValues = tkv;
-    } else {
-      tabletsKeyValues.clear();
-      tabletsKeyValues.putAll(tkv);
-    }
+    tabletsKeyValues.clear();
+    tabletsKeyValues.putAll(tkv);
 
     Text metadataEntry = extent.getMetadataEntry();
 

-- 
To stop receiving notification emails like this one, please contact
ctubbsii@apache.org.