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 1917013  Revert "Update Last Location. Solution for #1169 (#1453)"
1917013 is described below

commit 191701386e56e701f0562ea01de594a593093e9a
Author: Christopher Tubbs <ctubb...@apache.org>
AuthorDate: Mon Apr 6 22:48:53 2020 -0400

    Revert "Update Last Location. Solution for #1169 (#1453)"
    
    This reverts commit d12ff6c700e003202fd2e9842499324561246b15.
    
    The reverted commit was not ready for merging, as it caused dozens of
    test failures (around 60), and appeared to fundamentally break parsing
    of many stored locations by causing locations to be parsed with
    HostAndPort.fromString(location) that were not created with
    HostAndPort.toString(). This may be a more fundamental problem with some
    of the code in Ample; further investigation and testing is needed before
    merging.
---
 .../accumulo/core/metadata/schema/Ample.java       |   4 -
 .../master/state/DistributedStoreException.java    |  33 +++++
 .../master/state/LoggingTabletStateStore.java      |  21 ++--
 .../server/master/state/MetaDataStateStore.java    | 134 ++++++++++++++-------
 .../server/master/state/SuspendingTServer.java     |  11 ++
 .../server/master/state/TServerInstance.java       |  34 ++++++
 .../server/master/state/TabletStateStore.java      |  23 ++--
 .../server/master/state/ZooTabletStateStore.java   |  26 ++--
 .../server/metadata/TabletMutatorBase.java         |  17 ---
 .../accumulo/server/util/MasterMetadataUtil.java   |  37 +++++-
 .../master/state/RootTabletStateStoreTest.java     |  13 +-
 .../apache/accumulo/master/TabletGroupWatcher.java |   7 +-
 .../org/apache/accumulo/tserver/TabletServer.java  |   5 +-
 .../accumulo/tserver/tablet/DatafileManager.java   |   8 +-
 .../org/apache/accumulo/tserver/tablet/Tablet.java |   3 +-
 .../test/MasterRepairsDualAssignmentIT.java        |  24 ++--
 .../accumulo/test/functional/SplitRecoveryIT.java  |  12 +-
 .../apache/accumulo/test/master/MergeStateIT.java  |   6 +-
 .../accumulo/test/performance/NullTserver.java     |   9 +-
 19 files changed, 293 insertions(+), 134 deletions(-)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/metadata/schema/Ample.java 
b/core/src/main/java/org/apache/accumulo/core/metadata/schema/Ample.java
index bd3eb09..a7039d4 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/schema/Ample.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/schema/Ample.java
@@ -222,10 +222,6 @@ public interface Ample {
 
     public TabletMutator putChopped();
 
-    public TabletMutator putSuspension(TServer tserver, long suspensionTime);
-
-    public TabletMutator deleteSuspension();
-
     /**
      * This method persist (or queues for persisting) previous put and deletes 
against this object.
      * Unless this method is called, previous calls will never be persisted. 
The purpose of this
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/DistributedStoreException.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/DistributedStoreException.java
new file mode 100644
index 0000000..a099bbf
--- /dev/null
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/DistributedStoreException.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.server.master.state;
+
+public class DistributedStoreException extends Exception {
+
+  private static final long serialVersionUID = 1L;
+
+  public DistributedStoreException(String why) {
+    super(why);
+  }
+
+  public DistributedStoreException(Exception cause) {
+    super(cause);
+  }
+
+}
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/LoggingTabletStateStore.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/LoggingTabletStateStore.java
index 4249fc2..8b5fe1a 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/LoggingTabletStateStore.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/LoggingTabletStateStore.java
@@ -48,21 +48,21 @@ class LoggingTabletStateStore implements TabletStateStore {
   }
 
   @Override
-  public void setFutureLocation(Assignment assignment) {
-    wrapped.setFutureLocation(assignment);
-    TabletLogger.assigned(assignment.tablet, assignment.server);
-
+  public void setFutureLocations(Collection<Assignment> assignments)
+      throws DistributedStoreException {
+    wrapped.setFutureLocations(assignments);
+    assignments.forEach(assignment -> TabletLogger.assigned(assignment.tablet, 
assignment.server));
   }
 
   @Override
-  public void setLocation(Assignment assignment, TServerInstance prevLastLoc) {
-    wrapped.setLocation(assignment, prevLastLoc);
-    TabletLogger.loaded(assignment.tablet, assignment.server);
+  public void setLocations(Collection<Assignment> assignments) throws 
DistributedStoreException {
+    wrapped.setLocations(assignments);
+    assignments.forEach(assignment -> TabletLogger.loaded(assignment.tablet, 
assignment.server));
   }
 
   @Override
   public void unassign(Collection<TabletLocationState> tablets,
-      Map<TServerInstance,List<Path>> logsForDeadServers) {
+      Map<TServerInstance,List<Path>> logsForDeadServers) throws 
DistributedStoreException {
     wrapped.unassign(tablets, logsForDeadServers);
 
     if (logsForDeadServers == null)
@@ -75,7 +75,8 @@ class LoggingTabletStateStore implements TabletStateStore {
 
   @Override
   public void suspend(Collection<TabletLocationState> tablets,
-      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp) {
+      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp)
+      throws DistributedStoreException {
     wrapped.suspend(tablets, logsForDeadServers, suspensionTimestamp);
 
     if (logsForDeadServers == null)
@@ -88,7 +89,7 @@ class LoggingTabletStateStore implements TabletStateStore {
   }
 
   @Override
-  public void unsuspend(Collection<TabletLocationState> tablets) {
+  public void unsuspend(Collection<TabletLocationState> tablets) throws 
DistributedStoreException {
     wrapped.unsuspend(tablets);
     for (TabletLocationState tls : tablets) {
       TabletLogger.unsuspended(tls.extent);
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java
index a92b69d..6adef3d 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java
@@ -21,27 +21,31 @@ package org.apache.accumulo.server.master.state;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
+import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
+import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.clientImpl.ClientContext;
+import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.metadata.MetadataTable;
-import org.apache.accumulo.core.metadata.schema.Ample;
-import org.apache.accumulo.core.metadata.schema.Ample.TabletMutator;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema;
-import org.apache.accumulo.core.metadata.schema.TabletMetadata.LocationType;
 import org.apache.accumulo.core.tabletserver.log.LogEntry;
 import org.apache.hadoop.fs.Path;
 
 class MetaDataStateStore implements TabletStateStore {
 
+  private static final int THREADS = 4;
+  private static final int LATENCY = 1000;
+  private static final int MAX_MEMORY = 200 * 1024 * 1024;
+
   protected final ClientContext context;
   protected final CurrentState state;
   private final String targetTableName;
-  private final Ample ample;
 
   protected MetaDataStateStore(ClientContext context, CurrentState state, 
String targetTableName) {
     this.context = context;
     this.state = state;
-    this.ample = context.getAmple();
     this.targetTableName = targetTableName;
   }
 
@@ -56,87 +60,135 @@ class MetaDataStateStore implements TabletStateStore {
   }
 
   @Override
-  public void setLocation(Assignment assignment, TServerInstance prevLastLoc) {
-
-    TabletMutator tabletMutator = ample.mutateTablet(assignment.tablet);
-    tabletMutator.putLocation(assignment.server, LocationType.CURRENT);
-    tabletMutator.putLocation(assignment.server, LocationType.LAST);
-    tabletMutator.deleteLocation(assignment.server, LocationType.FUTURE);
-
-    // remove the old location
-    if (prevLastLoc != null && !prevLastLoc.equals(assignment.server)) {
-      tabletMutator.deleteLocation(prevLastLoc, LocationType.LAST);
+  public void setLocations(Collection<Assignment> assignments) throws 
DistributedStoreException {
+    BatchWriter writer = createBatchWriter();
+    try {
+      for (Assignment assignment : assignments) {
+        Mutation m = new Mutation(assignment.tablet.getMetadataEntry());
+        assignment.server.putLocation(m);
+        assignment.server.clearFutureLocation(m);
+        SuspendingTServer.clearSuspension(m);
+        writer.addMutation(m);
+      }
+    } catch (Exception ex) {
+      throw new DistributedStoreException(ex);
+    } finally {
+      try {
+        writer.close();
+      } catch (MutationsRejectedException e) {
+        throw new DistributedStoreException(e);
+      }
     }
+  }
 
-    tabletMutator.mutate();
-
+  BatchWriter createBatchWriter() {
+    try {
+      return context.createBatchWriter(targetTableName,
+          new BatchWriterConfig().setMaxMemory(MAX_MEMORY)
+              .setMaxLatency(LATENCY, 
TimeUnit.MILLISECONDS).setMaxWriteThreads(THREADS));
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
   }
 
   @Override
-  public void setFutureLocation(Assignment assignment) {
-
-    TabletMutator tabletMutator = ample.mutateTablet(assignment.tablet);
-    tabletMutator.deleteSuspension();
-    tabletMutator.putLocation(assignment.server, LocationType.FUTURE);
-    tabletMutator.mutate();
-
+  public void setFutureLocations(Collection<Assignment> assignments)
+      throws DistributedStoreException {
+    BatchWriter writer = createBatchWriter();
+    try {
+      for (Assignment assignment : assignments) {
+        Mutation m = new Mutation(assignment.tablet.getMetadataEntry());
+        SuspendingTServer.clearSuspension(m);
+        assignment.server.putFutureLocation(m);
+        writer.addMutation(m);
+      }
+    } catch (Exception ex) {
+      throw new DistributedStoreException(ex);
+    } finally {
+      try {
+        writer.close();
+      } catch (MutationsRejectedException e) {
+        throw new DistributedStoreException(e);
+      }
+    }
   }
 
   @Override
   public void unassign(Collection<TabletLocationState> tablets,
-      Map<TServerInstance,List<Path>> logsForDeadServers) {
+      Map<TServerInstance,List<Path>> logsForDeadServers) throws 
DistributedStoreException {
     unassign(tablets, logsForDeadServers, -1);
   }
 
   @Override
   public void suspend(Collection<TabletLocationState> tablets,
-      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp) {
+      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp)
+      throws DistributedStoreException {
     unassign(tablets, logsForDeadServers, suspensionTimestamp);
   }
 
   private void unassign(Collection<TabletLocationState> tablets,
-      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp) {
-    try (var tabletsMutator = ample.mutateTablets()) {
+      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp)
+      throws DistributedStoreException {
+    BatchWriter writer = createBatchWriter();
+    try {
       for (TabletLocationState tls : tablets) {
-        TabletMutator tabletMutator = tabletsMutator.mutateTablet(tls.extent);
+        Mutation m = new Mutation(tls.extent.getMetadataEntry());
         if (tls.current != null) {
-          tabletMutator.deleteLocation(tls.current, LocationType.CURRENT);
+          tls.current.clearLocation(m);
           if (logsForDeadServers != null) {
             List<Path> logs = logsForDeadServers.get(tls.current);
             if (logs != null) {
               for (Path log : logs) {
                 LogEntry entry =
                     new LogEntry(tls.extent, 0, tls.current.hostPort(), 
log.toString());
-                tabletMutator.putWal(entry);
+                m.put(entry.getColumnFamily(), entry.getColumnQualifier(), 
entry.getValue());
               }
             }
           }
           if (suspensionTimestamp >= 0) {
-            tabletMutator.putSuspension(tls.current, suspensionTimestamp);
+            SuspendingTServer suspender =
+                new SuspendingTServer(tls.current.getLocation(), 
suspensionTimestamp);
+            suspender.setSuspension(m);
           }
         }
         if (tls.suspend != null && suspensionTimestamp < 0) {
-          tabletMutator.deleteSuspension();
+          SuspendingTServer.clearSuspension(m);
         }
         if (tls.future != null) {
-          tabletMutator.deleteLocation(tls.future, LocationType.FUTURE);
+          tls.future.clearFutureLocation(m);
         }
-        tabletMutator.mutate();
+        writer.addMutation(m);
+      }
+    } catch (Exception ex) {
+      throw new DistributedStoreException(ex);
+    } finally {
+      try {
+        writer.close();
+      } catch (MutationsRejectedException e) {
+        throw new DistributedStoreException(e);
       }
     }
   }
 
   @Override
-  public void unsuspend(Collection<TabletLocationState> tablets) {
-
-    try (var tabletsMutator = ample.mutateTablets()) {
+  public void unsuspend(Collection<TabletLocationState> tablets) throws 
DistributedStoreException {
+    BatchWriter writer = createBatchWriter();
+    try {
       for (TabletLocationState tls : tablets) {
         if (tls.suspend != null) {
           continue;
         }
-        TabletMutator tabletMutator = tabletsMutator.mutateTablet(tls.extent);
-        tabletMutator.deleteSuspension();
-        tabletMutator.mutate();
+        Mutation m = new Mutation(tls.extent.getMetadataEntry());
+        SuspendingTServer.clearSuspension(m);
+        writer.addMutation(m);
+      }
+    } catch (Exception ex) {
+      throw new DistributedStoreException(ex);
+    } finally {
+      try {
+        writer.close();
+      } catch (MutationsRejectedException e) {
+        throw new DistributedStoreException(e);
       }
     }
   }
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/SuspendingTServer.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/SuspendingTServer.java
index 52de28f..c6bb343 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/SuspendingTServer.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/SuspendingTServer.java
@@ -18,8 +18,11 @@
  */
 package org.apache.accumulo.server.master.state;
 
+import static 
org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.SuspendLocationColumn.SUSPEND_COLUMN;
+
 import java.util.Objects;
 
+import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.util.HostAndPort;
 
@@ -54,6 +57,14 @@ public class SuspendingTServer {
     return server.equals(rhs.server) && suspensionTime == rhs.suspensionTime;
   }
 
+  public void setSuspension(Mutation m) {
+    m.put(SUSPEND_COLUMN.getColumnFamily(), 
SUSPEND_COLUMN.getColumnQualifier(), toValue());
+  }
+
+  public static void clearSuspension(Mutation m) {
+    m.putDelete(SUSPEND_COLUMN.getColumnFamily(), 
SUSPEND_COLUMN.getColumnQualifier());
+  }
+
   @Override
   public int hashCode() {
     return Objects.hash(server, suspensionTime);
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
index d5e40c5..a539643 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
@@ -25,8 +25,10 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 
+import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.metadata.schema.Ample;
+import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import org.apache.accumulo.core.metadata.schema.TabletMetadata.Location;
 import org.apache.accumulo.core.util.AddressUtil;
 import org.apache.accumulo.core.util.HostAndPort;
@@ -79,6 +81,30 @@ public class TServerInstance implements Ample.TServer, 
Comparable<TServerInstanc
     this(location.getHostAndPort(), location.getSession());
   }
 
+  public void putLocation(Mutation m) {
+    m.put(TabletsSection.CurrentLocationColumnFamily.NAME, 
asColumnQualifier(), asMutationValue());
+  }
+
+  public void putFutureLocation(Mutation m) {
+    m.put(TabletsSection.FutureLocationColumnFamily.NAME, asColumnQualifier(), 
asMutationValue());
+  }
+
+  public void putLastLocation(Mutation m) {
+    m.put(TabletsSection.LastLocationColumnFamily.NAME, asColumnQualifier(), 
asMutationValue());
+  }
+
+  public void clearLastLocation(Mutation m) {
+    m.putDelete(TabletsSection.LastLocationColumnFamily.NAME, 
asColumnQualifier());
+  }
+
+  public void clearFutureLocation(Mutation m) {
+    m.putDelete(TabletsSection.FutureLocationColumnFamily.NAME, 
asColumnQualifier());
+  }
+
+  public void clearLocation(Mutation m) {
+    m.putDelete(TabletsSection.CurrentLocationColumnFamily.NAME, 
asColumnQualifier());
+  }
+
   @Override
   public int compareTo(TServerInstance other) {
     if (this == other)
@@ -112,6 +138,14 @@ public class TServerInstance implements Ample.TServer, 
Comparable<TServerInstanc
     return getLocation().toString();
   }
 
+  private Text asColumnQualifier() {
+    return new Text(this.getSession());
+  }
+
+  private Value asMutationValue() {
+    return new Value(getLocation().toString());
+  }
+
   @Override
   public HostAndPort getLocation() {
     return location;
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateStore.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateStore.java
index 5182677..e74c9ec 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateStore.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateStore.java
@@ -48,12 +48,12 @@ public interface TabletStateStore extends 
Iterable<TabletLocationState> {
   /**
    * Store the assigned locations in the data store.
    */
-  void setFutureLocation(Assignment assignment);
+  void setFutureLocations(Collection<Assignment> assignments) throws 
DistributedStoreException;
 
   /**
    * Tablet servers will update the data store with the location when they 
bring the tablet online
    */
-  void setLocation(Assignment assignment, TServerInstance prevLastLoc);
+  void setLocations(Collection<Assignment> assignments) throws 
DistributedStoreException;
 
   /**
    * Mark the tablets as having no known or future location.
@@ -64,35 +64,38 @@ public interface TabletStateStore extends 
Iterable<TabletLocationState> {
    *          a cache of logs in use by servers when they died
    */
   void unassign(Collection<TabletLocationState> tablets,
-      Map<TServerInstance,List<Path>> logsForDeadServers);
+      Map<TServerInstance,List<Path>> logsForDeadServers) throws 
DistributedStoreException;
 
   /**
    * Mark tablets as having no known or future location, but desiring to be 
returned to their
    * previous tserver.
    */
   void suspend(Collection<TabletLocationState> tablets,
-      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp);
+      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp)
+      throws DistributedStoreException;
 
   /**
    * Remove a suspension marker for a collection of tablets, moving them to 
being simply unassigned.
    */
-  void unsuspend(Collection<TabletLocationState> tablets);
+  void unsuspend(Collection<TabletLocationState> tablets) throws 
DistributedStoreException;
 
   public static void unassign(ServerContext context, TabletLocationState tls,
-      Map<TServerInstance,List<Path>> logsForDeadServers) {
+      Map<TServerInstance,List<Path>> logsForDeadServers) throws 
DistributedStoreException {
     getStoreForTablet(tls.extent, 
context).unassign(Collections.singletonList(tls),
         logsForDeadServers);
   }
 
   public static void suspend(ServerContext context, TabletLocationState tls,
-      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp) {
+      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp)
+      throws DistributedStoreException {
     getStoreForTablet(tls.extent, 
context).suspend(Collections.singletonList(tls),
         logsForDeadServers, suspensionTimestamp);
   }
 
-  public static void setLocation(ServerContext context, Assignment assignment,
-      TServerInstance prevLastLoc) {
-    getStoreForTablet(assignment.tablet, context).setLocation(assignment, 
prevLastLoc);
+  public static void setLocation(ServerContext context, Assignment assignment)
+      throws DistributedStoreException {
+    getStoreForTablet(assignment.tablet, context)
+        .setLocations(Collections.singletonList(assignment));
   }
 
   static TabletStateStore getStoreForTablet(KeyExtent extent, ServerContext 
context) {
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
index bd5cdf0..e34911a 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
@@ -103,7 +103,13 @@ class ZooTabletStateStore implements TabletStateStore {
   }
 
   @Override
-  public void setFutureLocation(Assignment assignment) {
+  public void setFutureLocations(Collection<Assignment> assignments)
+      throws DistributedStoreException {
+    if (assignments.size() != 1)
+      throw new IllegalArgumentException("There is only one root tablet");
+    Assignment assignment = assignments.iterator().next();
+    if (assignment.tablet.compareTo(RootTable.EXTENT) != 0)
+      throw new IllegalArgumentException("You can only store the root tablet 
location");
 
     TabletMutator tabletMutator = ample.mutateTablet(assignment.tablet);
     tabletMutator.putLocation(assignment.server, LocationType.FUTURE);
@@ -111,22 +117,23 @@ class ZooTabletStateStore implements TabletStateStore {
   }
 
   @Override
-  public void setLocation(Assignment assignment, TServerInstance prevLastLoc) {
+  public void setLocations(Collection<Assignment> assignments) throws 
DistributedStoreException {
+    if (assignments.size() != 1)
+      throw new IllegalArgumentException("There is only one root tablet");
+    Assignment assignment = assignments.iterator().next();
+    if (assignment.tablet.compareTo(RootTable.EXTENT) != 0)
+      throw new IllegalArgumentException("You can only store the root tablet 
location");
+
     TabletMutator tabletMutator = ample.mutateTablet(assignment.tablet);
     tabletMutator.putLocation(assignment.server, LocationType.CURRENT);
-    tabletMutator.putLocation(assignment.server, LocationType.LAST);
     tabletMutator.deleteLocation(assignment.server, LocationType.FUTURE);
 
-    if (prevLastLoc != null && !prevLastLoc.equals(assignment.server)) {
-      tabletMutator.deleteLocation(prevLastLoc, LocationType.LAST);
-    }
-
     tabletMutator.mutate();
   }
 
   @Override
   public void unassign(Collection<TabletLocationState> tablets,
-      Map<TServerInstance,List<Path>> logsForDeadServers) {
+      Map<TServerInstance,List<Path>> logsForDeadServers) throws 
DistributedStoreException {
     if (tablets.size() != 1)
       throw new IllegalArgumentException("There is only one root tablet");
     TabletLocationState tls = tablets.iterator().next();
@@ -155,7 +162,8 @@ class ZooTabletStateStore implements TabletStateStore {
 
   @Override
   public void suspend(Collection<TabletLocationState> tablets,
-      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp) {
+      Map<TServerInstance,List<Path>> logsForDeadServers, long 
suspensionTimestamp)
+      throws DistributedStoreException {
     // No support for suspending root tablet.
     unassign(tablets, logsForDeadServers);
   }
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/metadata/TabletMutatorBase.java
 
b/server/base/src/main/java/org/apache/accumulo/server/metadata/TabletMutatorBase.java
index bce340d..6dd9a75 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/metadata/TabletMutatorBase.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/metadata/TabletMutatorBase.java
@@ -198,23 +198,6 @@ public abstract class TabletMutatorBase implements 
Ample.TabletMutator {
     return this;
   }
 
-  @Override
-  public Ample.TabletMutator putSuspension(Ample.TServer tServer, long 
suspensionTime) {
-    Preconditions.checkState(updatesEnabled, "Cannot make updates after 
calling mutate.");
-    
mutation.put(TabletsSection.SuspendLocationColumn.SUSPEND_COLUMN.getColumnFamily(),
-        
TabletsSection.SuspendLocationColumn.SUSPEND_COLUMN.getColumnQualifier(),
-        new Value(tServer + "|" + suspensionTime));
-    return this;
-  }
-
-  @Override
-  public Ample.TabletMutator deleteSuspension() {
-    Preconditions.checkState(updatesEnabled, "Cannot make updates after 
calling mutate.");
-    
mutation.putDelete(TabletsSection.SuspendLocationColumn.SUSPEND_COLUMN.getColumnFamily(),
-        
TabletsSection.SuspendLocationColumn.SUSPEND_COLUMN.getColumnQualifier());
-    return this;
-  }
-
   protected Mutation getMutation() {
     updatesEnabled = false;
     return mutation;
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
 
b/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
index 293252e..366e941 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
@@ -18,6 +18,8 @@
  */
 package org.apache.accumulo.server.util;
 
+import static 
org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -27,6 +29,7 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.Scanner;
@@ -52,6 +55,7 @@ import org.apache.accumulo.fate.zookeeper.ZooLock;
 import org.apache.accumulo.server.ServerContext;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.hadoop.io.Text;
+import org.apache.zookeeper.KeeperException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -164,9 +168,21 @@ public class MasterMetadataUtil {
     }
   }
 
+  private static TServerInstance getTServerInstance(String address, ZooLock 
zooLock) {
+    while (true) {
+      try {
+        return new TServerInstance(address, zooLock.getSessionId());
+      } catch (KeeperException | InterruptedException e) {
+        log.error("{}", e.getMessage(), e);
+      }
+      sleepUninterruptibly(1, TimeUnit.SECONDS);
+    }
+  }
+
   public static void replaceDatafiles(ServerContext context, KeyExtent extent,
       Set<StoredTabletFile> datafilesToDelete, Set<StoredTabletFile> 
scanFiles, TabletFile path,
-      Long compactionId, DataFileValue size, ZooLock zooLock) {
+      Long compactionId, DataFileValue size, String address, TServerInstance 
lastLocation,
+      ZooLock zooLock) {
 
     context.getAmple().putGcCandidates(extent.getTableId(), datafilesToDelete);
 
@@ -181,6 +197,13 @@ public class MasterMetadataUtil {
     if (compactionId != null)
       tablet.putCompactionId(compactionId);
 
+    TServerInstance self = getTServerInstance(address, zooLock);
+    tablet.putLocation(self, LocationType.LAST);
+
+    // remove the old location
+    if (lastLocation != null && !lastLocation.equals(self))
+      tablet.deleteLocation(lastLocation, LocationType.LAST);
+
     tablet.putZooLock(zooLock);
 
     tablet.mutate();
@@ -195,8 +218,8 @@ public class MasterMetadataUtil {
    */
   public static StoredTabletFile updateTabletDataFile(ServerContext context, 
KeyExtent extent,
       TabletFile path, StoredTabletFile mergeFile, DataFileValue dfv, 
MetadataTime time,
-      Set<StoredTabletFile> filesInUseByScans, ZooLock zooLock, Set<String> 
unusedWalLogs,
-      long flushId) {
+      Set<StoredTabletFile> filesInUseByScans, String address, ZooLock zooLock,
+      Set<String> unusedWalLogs, TServerInstance lastLocation, long flushId) {
 
     TabletMutator tablet = context.getAmple().mutateTablet(extent);
     StoredTabletFile newFile = null;
@@ -205,6 +228,14 @@ public class MasterMetadataUtil {
       tablet.putFile(path, dfv);
       tablet.putTime(time);
       newFile = path.insert();
+
+      TServerInstance self = getTServerInstance(address, zooLock);
+      tablet.putLocation(self, LocationType.LAST);
+
+      // remove the old location
+      if (lastLocation != null && !lastLocation.equals(self)) {
+        tablet.deleteLocation(lastLocation, LocationType.LAST);
+      }
     }
     tablet.putFlushId(flushId);
 
diff --git 
a/server/base/src/test/java/org/apache/accumulo/server/master/state/RootTabletStateStoreTest.java
 
b/server/base/src/test/java/org/apache/accumulo/server/master/state/RootTabletStateStoreTest.java
index 26a8876..88959f0 100644
--- 
a/server/base/src/test/java/org/apache/accumulo/server/master/state/RootTabletStateStoreTest.java
+++ 
b/server/base/src/test/java/org/apache/accumulo/server/master/state/RootTabletStateStoreTest.java
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.fail;
 
 import java.util.Collections;
+import java.util.List;
 
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.TableId;
@@ -74,14 +75,14 @@ public class RootTabletStateStoreTest {
   }
 
   @Test
-  public void testRootTabletStateStore() {
+  public void testRootTabletStateStore() throws DistributedStoreException {
     ZooTabletStateStore tstore = new ZooTabletStateStore(new TestAmple());
     KeyExtent root = RootTable.EXTENT;
     String sessionId = "this is my unique session data";
     TServerInstance server =
         new TServerInstance(HostAndPort.fromParts("127.0.0.1", 10000), 
sessionId);
-    Assignment assignment = new Assignment(root, server);
-    tstore.setFutureLocation(assignment);
+    List<Assignment> assignments = Collections.singletonList(new 
Assignment(root, server));
+    tstore.setFutureLocations(assignments);
     int count = 0;
     for (TabletLocationState location : tstore) {
       assertEquals(location.extent, root);
@@ -90,7 +91,7 @@ public class RootTabletStateStoreTest {
       count++;
     }
     assertEquals(count, 1);
-    tstore.setLocation(assignment, server);
+    tstore.setLocations(assignments);
     count = 0;
     for (TabletLocationState location : tstore) {
       assertEquals(location.extent, root);
@@ -117,12 +118,12 @@ public class RootTabletStateStoreTest {
 
     KeyExtent notRoot = new KeyExtent(TableId.of("0"), null, null);
     try {
-      tstore.setLocation(new Assignment(notRoot, server), assigned.last);
+      tstore.setLocations(Collections.singletonList(new Assignment(notRoot, 
server)));
       fail("should not get here");
     } catch (IllegalArgumentException ex) {}
 
     try {
-      tstore.setFutureLocation(new Assignment(notRoot, server));
+      tstore.setFutureLocations(Collections.singletonList(new 
Assignment(notRoot, server)));
       fail("should not get here");
     } catch (IllegalArgumentException ex) {}
 
diff --git 
a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
 
b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
index 49115bf..5f29286 100644
--- 
a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
+++ 
b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
@@ -80,6 +80,7 @@ import 
org.apache.accumulo.server.log.WalStateManager.WalMarkerException;
 import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
 import org.apache.accumulo.server.master.state.Assignment;
 import org.apache.accumulo.server.master.state.ClosableIterator;
+import org.apache.accumulo.server.master.state.DistributedStoreException;
 import org.apache.accumulo.server.master.state.MergeInfo;
 import org.apache.accumulo.server.master.state.MergeState;
 import org.apache.accumulo.server.master.state.TServerInstance;
@@ -818,7 +819,7 @@ abstract class TabletGroupWatcher extends Daemon {
       List<TabletLocationState> assignedToDeadServers,
       Map<TServerInstance,List<Path>> logsForDeadServers,
       List<TabletLocationState> suspendedToGoneServers, 
Map<KeyExtent,TServerInstance> unassigned)
-      throws TException, WalMarkerException {
+      throws DistributedStoreException, TException, WalMarkerException {
     boolean tabletsSuspendable = canSuspendTablets();
     if (!assignedToDeadServers.isEmpty()) {
       int maxServersToShow = min(assignedToDeadServers.size(), 100);
@@ -871,9 +872,7 @@ abstract class TabletGroupWatcher extends Daemon {
 
     if (assignments.size() > 0) {
       Master.log.info(String.format("Assigning %d tablets", 
assignments.size()));
-
-      for (Assignment assignment : assignments)
-        store.setFutureLocation(assignment);
+      store.setFutureLocations(assignments);
     }
     assignments.addAll(assigned);
     for (Assignment a : assignments) {
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 17a0519..d1ef5ef 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
@@ -192,6 +192,7 @@ import org.apache.accumulo.server.log.WalStateManager;
 import org.apache.accumulo.server.log.WalStateManager.WalMarkerException;
 import org.apache.accumulo.server.master.recovery.RecoveryPath;
 import org.apache.accumulo.server.master.state.Assignment;
+import org.apache.accumulo.server.master.state.DistributedStoreException;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletLocationState;
 import 
org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException;
@@ -2363,6 +2364,8 @@ public class TabletServer extends AbstractServer {
           TabletStateStore.suspend(getContext(), tls, null,
               requestTimeSkew + MILLISECONDS.convert(System.nanoTime(), 
NANOSECONDS));
         }
+      } catch (DistributedStoreException ex) {
+        log.warn("Unable to update storage", ex);
       } catch (KeeperException e) {
         log.warn("Unable determine our zookeeper session information", e);
       } catch (InterruptedException e) {
@@ -2505,7 +2508,7 @@ public class TabletServer extends AbstractServer {
           throw new RuntimeException("Minor compaction after recovery fails 
for " + extent);
         }
         Assignment assignment = new Assignment(extent, getTabletSession());
-        TabletStateStore.setLocation(getContext(), assignment, 
data.getLastLocation());
+        TabletStateStore.setLocation(getContext(), assignment);
 
         synchronized (openingTablets) {
           synchronized (onlineTablets) {
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
index 856079a..776b99a 100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
@@ -45,6 +45,7 @@ import org.apache.accumulo.core.util.MapCounter;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.fs.VolumeManager;
+import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.replication.StatusUtil;
 import org.apache.accumulo.server.util.MasterMetadataUtil;
 import org.apache.accumulo.server.util.MetadataTableUtil;
@@ -508,6 +509,7 @@ class DatafileManager {
           newDatafile.getPath());
     }
 
+    TServerInstance lastLocation = null;
     // calling insert to get the new file before inserting into the metadata
     StoredTabletFile newFile = newDatafile.insert();
     synchronized (tablet) {
@@ -535,7 +537,7 @@ class DatafileManager {
 
       tablet.computeNumEntries();
 
-      tablet.resetLastLocation();
+      lastLocation = tablet.resetLastLocation();
 
       tablet.setLastCompactionID(compactionId);
       t2 = System.currentTimeMillis();
@@ -546,7 +548,9 @@ class DatafileManager {
     if (filesInUseByScans.size() > 0)
       log.debug("Adding scan refs to metadata {} {}", extent, 
filesInUseByScans);
     MasterMetadataUtil.replaceDatafiles(tablet.getContext(), extent, 
oldDatafiles,
-        filesInUseByScans, newFile, compactionId, dfv, 
tablet.getTabletServer().getLock());
+        filesInUseByScans, newFile, compactionId, dfv,
+        tablet.getTabletServer().getClientAddressString(), lastLocation,
+        tablet.getTabletServer().getLock());
     removeFilesAfterScan(filesInUseByScans);
 
     if (log.isTraceEnabled()) {
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
index effa25a..50dd5d5 100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
@@ -2686,7 +2686,8 @@ public class Tablet {
 
       return 
MasterMetadataUtil.updateTabletDataFile(getTabletServer().getContext(), extent,
           newDatafile, absMergeFile, dfv, 
tabletTime.getMetadataTime(persistedTime),
-          filesInUseByScans, tabletServer.getLock(), unusedWalLogs, flushId);
+          filesInUseByScans, tabletServer.getClientAddressString(), 
tabletServer.getLock(),
+          unusedWalLogs, lastLocation, flushId);
     }
 
   }
diff --git 
a/test/src/main/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java
 
b/test/src/main/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java
index 26b7a97..b0537a1 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java
@@ -28,20 +28,20 @@ import java.util.TreeSet;
 
 import org.apache.accumulo.core.client.Accumulo;
 import org.apache.accumulo.core.client.AccumuloClient;
+import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.clientImpl.ClientContext;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.dataImpl.KeyExtent;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.metadata.schema.Ample.DataLevel;
-import org.apache.accumulo.core.metadata.schema.Ample.TabletMutator;
-import org.apache.accumulo.core.metadata.schema.TabletMetadata.LocationType;
 import org.apache.accumulo.core.replication.ReplicationTable;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.fate.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
-import org.apache.accumulo.server.ServerContext;
 import org.apache.accumulo.server.master.state.ClosableIterator;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletLocationState;
@@ -74,7 +74,6 @@ public class MasterRepairsDualAssignmentIT extends 
ConfigurableMacBase {
     // make some tablets, spread 'em around
     try (AccumuloClient c = 
Accumulo.newClient().from(getClientProperties()).build()) {
       ClientContext context = (ClientContext) c;
-      ServerContext serverContext = cluster.getServerContext();
       String table = this.getUniqueNames(1)[0];
       c.securityOperations().grantTablePermission("root", MetadataTable.NAME,
           TablePermission.WRITE);
@@ -135,16 +134,19 @@ public class MasterRepairsDualAssignmentIT extends 
ConfigurableMacBase {
       }
       assertNotEquals(null, moved);
       // throw a mutation in as if we were the dying tablet
-      TabletMutator tabletMutator = 
serverContext.getAmple().mutateTablet(moved.extent);
-      tabletMutator.putLocation(moved.current, LocationType.CURRENT);
-      tabletMutator.mutate();
+      BatchWriter bw = c.createBatchWriter(MetadataTable.NAME, new 
BatchWriterConfig());
+      Mutation assignment = new Mutation(moved.extent.getMetadataEntry());
+      moved.current.putLocation(assignment);
+      bw.addMutation(assignment);
+      bw.close();
       // wait for the master to fix the problem
       waitForCleanStore(store);
       // now jam up the metadata table
-      tabletMutator =
-          serverContext.getAmple().mutateTablet(new 
KeyExtent(MetadataTable.ID, null, null));
-      tabletMutator.putLocation(moved.current, LocationType.CURRENT);
-      tabletMutator.mutate();
+      bw = c.createBatchWriter(MetadataTable.NAME, new BatchWriterConfig());
+      assignment = new Mutation(new KeyExtent(MetadataTable.ID, null, 
null).getMetadataEntry());
+      moved.current.putLocation(assignment);
+      bw.addMutation(assignment);
+      bw.close();
       waitForCleanStore(TabletStateStore.getStoreForLevel(DataLevel.METADATA, 
context));
     }
   }
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java 
b/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java
index 6337ef9..c0760fa 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java
@@ -37,8 +37,10 @@ import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.admin.TimeType;
 import org.apache.accumulo.core.clientImpl.ScannerImpl;
+import org.apache.accumulo.core.clientImpl.Writer;
 import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.TableId;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.dataImpl.KeyExtent;
@@ -46,13 +48,11 @@ import org.apache.accumulo.core.file.rfile.RFile;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.StoredTabletFile;
 import org.apache.accumulo.core.metadata.TabletFile;
-import org.apache.accumulo.core.metadata.schema.Ample.TabletMutator;
 import org.apache.accumulo.core.metadata.schema.DataFileValue;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import 
org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily;
 import org.apache.accumulo.core.metadata.schema.MetadataTime;
 import org.apache.accumulo.core.metadata.schema.TabletMetadata;
-import org.apache.accumulo.core.metadata.schema.TabletMetadata.LocationType;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.fate.zookeeper.ZooLock;
@@ -201,11 +201,11 @@ public class SplitRecoveryIT extends ConfigurableMacBase {
 
     MetadataTableUtil.splitTablet(high, extent.getPrevEndRow(), splitRatio, 
context, zl);
     TServerInstance instance = new TServerInstance(location, 
zl.getSessionId());
+    Writer writer = MetadataTableUtil.getMetadataTable(context);
     Assignment assignment = new Assignment(high, instance);
-
-    TabletMutator tabletMutator = context.getAmple().mutateTablet(extent);
-    tabletMutator.putLocation(assignment.server, LocationType.FUTURE);
-    tabletMutator.mutate();
+    Mutation m = new Mutation(assignment.tablet.getMetadataEntry());
+    assignment.server.putFutureLocation(m);
+    writer.update(m);
 
     if (steps >= 1) {
       Map<Long,List<TabletFile>> bulkFiles = getBulkFilesLoaded(context, 
extent);
diff --git 
a/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java 
b/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java
index 3a081ab..e2b846f 100644
--- a/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java
@@ -41,7 +41,6 @@ import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.schema.Ample.DataLevel;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import 
org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ChoppedColumnFamily;
-import org.apache.accumulo.core.metadata.schema.TabletMetadata;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.HostAndPort;
@@ -181,10 +180,9 @@ public class MergeStateIT extends ConfigurableMacBase {
       KeyExtent tablet = new KeyExtent(tableId, new Text("p"), new Text("o"));
       m = tablet.getPrevRowUpdateMutation();
       TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new 
Value("0.5"));
-      TabletMetadata tabletMetadata = context.getAmple().readTablet(tablet);
       update(accumuloClient, m);
-      TServerInstance tServerInstance = new 
TServerInstance(tabletMetadata.getLast());
-      metaDataStateStore.setLocation(new Assignment(tablet, 
state.someTServer), tServerInstance);
+      metaDataStateStore
+          .setLocations(Collections.singletonList(new Assignment(tablet, 
state.someTServer)));
 
       // onos... there's a new tablet online
       stats = scan(state, metaDataStateStore);
diff --git 
a/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java 
b/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java
index b2ec934..9ce7525 100644
--- a/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java
+++ b/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java
@@ -321,12 +321,11 @@ public class NullTserver {
         TabletLocationState next = s.next();
         assignments.add(new Assignment(next.extent, instance));
       }
-
-      // point them to this server
-      TabletStateStore store = 
TabletStateStore.getStoreForLevel(DataLevel.USER, context);
-      for (Assignment assignment : assignments)
-        store.setLocation(assignment, instance);
     }
+    // point them to this server
+    TabletStateStore store = TabletStateStore.getStoreForLevel(DataLevel.USER, 
context);
+    store.setLocations(assignments);
+
     while (true) {
       sleepUninterruptibly(10, TimeUnit.SECONDS);
     }

Reply via email to