You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by dl...@apache.org on 2023/04/25 12:00:10 UTC

[accumulo] branch elasticity updated: Modified user initiated tablet hosting goal to use FATE (#3327)

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

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


The following commit(s) were added to refs/heads/elasticity by this push:
     new 1fd1284afc Modified user initiated tablet hosting goal to use FATE (#3327)
1fd1284afc is described below

commit 1fd1284afc270366d4dfadb79ee285fab5b060c9
Author: Dave Marion <dl...@apache.org>
AuthorDate: Tue Apr 25 08:00:03 2023 -0400

    Modified user initiated tablet hosting goal to use FATE (#3327)
    
    Closes #3303
---
 .../core/clientImpl/TableOperationsImpl.java       |   86 +-
 .../core/clientImpl/TabletHostingGoalUtil.java     |    2 +-
 .../thrift/THostingGoal.java                       |    2 +-
 .../core/clientImpl/thrift/TableOperation.java     |    5 +-
 .../core/manager/thrift/FateOperation.java         |    5 +-
 .../thrift/TabletManagementClientService.java      | 1514 +-------------------
 core/src/main/thrift/client.thrift                 |    7 +
 core/src/main/thrift/manager.thrift                |    1 +
 core/src/main/thrift/tabletmgmt.thrift             |   16 -
 .../accumulo/manager/FateServiceHandler.java       |   51 +-
 .../manager/tableOps/goal/SetHostingGoal.java      |  125 ++
 .../accumulo/tserver/TabletClientHandler.java      |   19 -
 .../test/functional/OnDemandTabletUnloadingIT.java |    6 +-
 .../accumulo/test/performance/NullTserver.java     |    5 -
 14 files changed, 253 insertions(+), 1591 deletions(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java
index 376c0adc41..13c3859231 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java
@@ -108,15 +108,12 @@ import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.ConfigurationCopy;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.ByteSequence;
-import org.apache.accumulo.core.data.Key;
-import org.apache.accumulo.core.data.PartialKey;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.TableId;
 import org.apache.accumulo.core.data.TabletId;
 import org.apache.accumulo.core.data.constraints.Constraint;
 import org.apache.accumulo.core.dataImpl.KeyExtent;
 import org.apache.accumulo.core.dataImpl.TabletIdImpl;
-import org.apache.accumulo.core.dataImpl.thrift.TKeyExtent;
 import org.apache.accumulo.core.dataImpl.thrift.TRowRange;
 import org.apache.accumulo.core.dataImpl.thrift.TSummaries;
 import org.apache.accumulo.core.dataImpl.thrift.TSummarizerConfiguration;
@@ -157,6 +154,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
 import org.apache.thrift.TApplicationException;
 import org.apache.thrift.TException;
+import org.apache.thrift.TSerializer;
 import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -2129,77 +2127,35 @@ public class TableOperationsImpl extends TableOperationsHelper {
     });
   }
 
-  public static List<TKeyExtent> findExtentsForRange(ClientContext context, TableId tableId,
-      Range range, Set<TabletHostingGoal> disallowedStates, boolean excludeHostedTablets)
-      throws AccumuloException {
-
-    // For all practical purposes the the start row is always inclusive, even if the key in the
-    // range is exclusive. For example the exclusive key row="a",family="b",qualifier="c" may
-    // exclude the column b:c but its still falls somewhere in the row "a". The only case where this
-    // would not be true is if the start key in a range is the last possible key in a row. The last
-    // possible key in a row would contain 2GB column fields of all 0xff, which is why we assume the
-    // row is always inclusive.
-    final Text scanRangeStart = (range.getStartKey() == null) ? null : range.getStartKey().getRow();
-
-    List<TKeyExtent> extents = new ArrayList<>();
-
-    TabletsMetadata m = context.getAmple().readTablets().forTable(tableId)
-        .overlapping(scanRangeStart, true, null).build();
-    for (TabletMetadata tm : m) {
-      if (disallowedStates.contains(tm.getHostingGoal())) {
-        throw new AccumuloException("Range: " + range + " includes tablet: " + tm.getExtent()
-            + " that is not in an allowable state for hosting");
-      }
-      final KeyExtent tabletExtent = tm.getExtent();
-      log.trace("Evaluating tablet {} against range {}", tabletExtent, range);
-      if (scanRangeStart != null && tm.getEndRow() != null
-          && tm.getEndRow().compareTo(scanRangeStart) < 0) {
-        // the end row of this tablet is before the start row, skip it
-        log.trace("tablet {} is before scan start range: {}", tabletExtent, scanRangeStart);
-        throw new RuntimeException("Bug in ample or this code.");
-      }
-
-      // Obtaining the end row from a range and knowing if the obtained row is inclusive or
-      // exclusive is really tricky depending on how the Range was created (using row or key
-      // constructors). So avoid trying to obtain an end row from the range and instead use
-      // range.afterKey below.
-      if (tm.getPrevEndRow() != null
-          && range.afterEndKey(new Key(tm.getPrevEndRow()).followingKey(PartialKey.ROW))) {
-        // the start row of this tablet is after the scan range, skip it
-        log.trace("tablet {} is after scan end range: {}", tabletExtent, range);
-        break;
-      }
-
-      // tablet must overlap the range
-      Location loc = tm.getLocation();
-      if (loc != null) {
-        log.debug("tablet {} has location of: {}:{}", tabletExtent, loc.getType(),
-            loc.getHostPort());
-      }
-      if (!(excludeHostedTablets && loc != null)) {
-        extents.add(tabletExtent.toThrift());
-      }
-
-    }
-    return extents;
-  }
-
   @Override
   public void setTabletHostingGoal(String tableName, Range range, TabletHostingGoal goal)
-      throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
+      throws AccumuloSecurityException, AccumuloException {
     EXISTING_TABLE_NAME.validate(tableName);
     NOT_BUILTIN_TABLE.validate(tableName);
     checkArgument(range != null, "range is null");
     checkArgument(goal != null, "goal is null");
 
-    TableId tableId = context.getTableId(tableName);
+    byte[] bRange;
+    try {
+      bRange = new TSerializer().serialize(range.toThrift());
+    } catch (TException e) {
+      throw new RuntimeException("Error serializing range object", e);
+    }
 
-    List<TKeyExtent> extents = findExtentsForRange(context, tableId, range, Set.of(), false);
+    List<ByteBuffer> args = new ArrayList<>();
+    args.add(ByteBuffer.wrap(tableName.getBytes(UTF_8)));
+    args.add(ByteBuffer.wrap(bRange));
+    args.add(ByteBuffer.wrap(goal.name().getBytes(UTF_8)));
 
-    log.debug("Setting tablet hosting goal to {} for extents: {}", goal, extents);
-    ThriftClientTypes.TABLET_MGMT.executeVoid(context,
-        client -> client.setTabletHostingGoal(TraceUtil.traceInfo(), context.rpcCreds(),
-            tableId.canonical(), extents, TabletHostingGoalUtil.toThrift(goal)));
+    Map<String,String> opts = Collections.emptyMap();
+
+    try {
+      doTableFateOperation(tableName, AccumuloException.class, FateOperation.TABLE_HOSTING_GOAL,
+          args, opts);
+    } catch (TableNotFoundException | TableExistsException e) {
+      // should not happen
+      throw new AssertionError(e);
+    }
   }
 
 }
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletHostingGoalUtil.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletHostingGoalUtil.java
index 90e8151b31..5cf500087e 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletHostingGoalUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletHostingGoalUtil.java
@@ -19,8 +19,8 @@
 package org.apache.accumulo.core.clientImpl;
 
 import org.apache.accumulo.core.client.admin.TabletHostingGoal;
+import org.apache.accumulo.core.clientImpl.thrift.THostingGoal;
 import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.tablet.thrift.THostingGoal;
 
 public class TabletHostingGoalUtil {
 
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/tablet/thrift/THostingGoal.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/clientImpl/thrift/THostingGoal.java
similarity index 97%
rename from core/src/main/thrift-gen-java/org/apache/accumulo/core/tablet/thrift/THostingGoal.java
rename to core/src/main/thrift-gen-java/org/apache/accumulo/core/clientImpl/thrift/THostingGoal.java
index 04080e41e0..0a4ee1a499 100644
--- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/tablet/thrift/THostingGoal.java
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/clientImpl/thrift/THostingGoal.java
@@ -22,7 +22,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.accumulo.core.tablet.thrift;
+package org.apache.accumulo.core.clientImpl.thrift;
 
 
 public enum THostingGoal implements org.apache.thrift.TEnum {
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/clientImpl/thrift/TableOperation.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/clientImpl/thrift/TableOperation.java
index 8f4553ced7..bc2deb978b 100644
--- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/clientImpl/thrift/TableOperation.java
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/clientImpl/thrift/TableOperation.java
@@ -42,7 +42,8 @@ public enum TableOperation implements org.apache.thrift.TEnum {
   COMPACT(13),
   IMPORT(14),
   EXPORT(15),
-  COMPACT_CANCEL(16);
+  COMPACT_CANCEL(16),
+  SET_HOSTING_GOAL(17);
 
   private final int value;
 
@@ -99,6 +100,8 @@ public enum TableOperation implements org.apache.thrift.TEnum {
         return EXPORT;
       case 16:
         return COMPACT_CANCEL;
+      case 17:
+        return SET_HOSTING_GOAL;
       default:
         return null;
     }
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateOperation.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateOperation.java
index a93eb3998d..d93a7eafaa 100644
--- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateOperation.java
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateOperation.java
@@ -42,7 +42,8 @@ public enum FateOperation implements org.apache.thrift.TEnum {
   NAMESPACE_CREATE(13),
   NAMESPACE_DELETE(14),
   NAMESPACE_RENAME(15),
-  TABLE_BULK_IMPORT2(16);
+  TABLE_BULK_IMPORT2(16),
+  TABLE_HOSTING_GOAL(17);
 
   private final int value;
 
@@ -99,6 +100,8 @@ public enum FateOperation implements org.apache.thrift.TEnum {
         return NAMESPACE_RENAME;
       case 16:
         return TABLE_BULK_IMPORT2;
+      case 17:
+        return TABLE_HOSTING_GOAL;
       default:
         return null;
     }
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/tablet/thrift/TabletManagementClientService.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/tablet/thrift/TabletManagementClientService.java
index d574229d58..a3b4bed589 100644
--- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/tablet/thrift/TabletManagementClientService.java
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/tablet/thrift/TabletManagementClientService.java
@@ -39,8 +39,6 @@ public class TabletManagementClientService {
 
     public void chop(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent) throws org.apache.thrift.TException;
 
-    public void setTabletHostingGoal(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents, THostingGoal goal) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException;
-
     public void requestTabletHosting(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException;
 
   }
@@ -57,8 +55,6 @@ public class TabletManagementClientService {
 
     public void chop(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
 
-    public void setTabletHostingGoal(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents, THostingGoal goal, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
-
     public void requestTabletHosting(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
 
   }
@@ -181,34 +177,6 @@ public class TabletManagementClientService {
       sendBaseOneway("chop", args);
     }
 
-    @Override
-    public void setTabletHostingGoal(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents, THostingGoal goal) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
-    {
-      send_setTabletHostingGoal(tinfo, credentials, tableId, extents, goal);
-      recv_setTabletHostingGoal();
-    }
-
-    public void send_setTabletHostingGoal(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents, THostingGoal goal) throws org.apache.thrift.TException
-    {
-      setTabletHostingGoal_args args = new setTabletHostingGoal_args();
-      args.setTinfo(tinfo);
-      args.setCredentials(credentials);
-      args.setTableId(tableId);
-      args.setExtents(extents);
-      args.setGoal(goal);
-      sendBase("setTabletHostingGoal", args);
-    }
-
-    public void recv_setTabletHostingGoal() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
-    {
-      setTabletHostingGoal_result result = new setTabletHostingGoal_result();
-      receiveBase(result, "setTabletHostingGoal");
-      if (result.sec != null) {
-        throw result.sec;
-      }
-      return;
-    }
-
     @Override
     public void requestTabletHosting(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
     {
@@ -482,54 +450,6 @@ public class TabletManagementClientService {
       }
     }
 
-    @Override
-    public void setTabletHostingGoal(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents, THostingGoal goal, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      setTabletHostingGoal_call method_call = new setTabletHostingGoal_call(tinfo, credentials, tableId, extents, goal, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class setTabletHostingGoal_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
-      private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo;
-      private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
-      private java.lang.String tableId;
-      private java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents;
-      private THostingGoal goal;
-      public setTabletHostingGoal_call(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents, THostingGoal goal, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonb [...]
-        super(client, protocolFactory, transport, resultHandler, false);
-        this.tinfo = tinfo;
-        this.credentials = credentials;
-        this.tableId = tableId;
-        this.extents = extents;
-        this.goal = goal;
-      }
-
-      @Override
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setTabletHostingGoal", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        setTabletHostingGoal_args args = new setTabletHostingGoal_args();
-        args.setTinfo(tinfo);
-        args.setCredentials(credentials);
-        args.setTableId(tableId);
-        args.setExtents(extents);
-        args.setGoal(goal);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      @Override
-      public Void getResult() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        (new Client(prot)).recv_setTabletHostingGoal();
-        return null;
-      }
-    }
-
     @Override
     public void requestTabletHosting(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableId, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
       checkReady();
@@ -593,7 +513,6 @@ public class TabletManagementClientService {
       processMap.put("splitTablet", new splitTablet());
       processMap.put("flushTablet", new flushTablet());
       processMap.put("chop", new chop());
-      processMap.put("setTabletHostingGoal", new setTabletHostingGoal());
       processMap.put("requestTabletHosting", new requestTabletHosting());
       return processMap;
     }
@@ -740,38 +659,6 @@ public class TabletManagementClientService {
       }
     }
 
-    public static class setTabletHostingGoal<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setTabletHostingGoal_args> {
-      public setTabletHostingGoal() {
-        super("setTabletHostingGoal");
-      }
-
-      @Override
-      public setTabletHostingGoal_args getEmptyArgsInstance() {
-        return new setTabletHostingGoal_args();
-      }
-
-      @Override
-      protected boolean isOneway() {
-        return false;
-      }
-
-      @Override
-      protected boolean rethrowUnhandledExceptions() {
-        return false;
-      }
-
-      @Override
-      public setTabletHostingGoal_result getResult(I iface, setTabletHostingGoal_args args) throws org.apache.thrift.TException {
-        setTabletHostingGoal_result result = new setTabletHostingGoal_result();
-        try {
-          iface.setTabletHostingGoal(args.tinfo, args.credentials, args.tableId, args.extents, args.goal);
-        } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
-          result.sec = sec;
-        }
-        return result;
-      }
-    }
-
     public static class requestTabletHosting<I extends Iface> extends org.apache.thrift.ProcessFunction<I, requestTabletHosting_args> {
       public requestTabletHosting() {
         super("requestTabletHosting");
@@ -822,7 +709,6 @@ public class TabletManagementClientService {
       processMap.put("splitTablet", new splitTablet());
       processMap.put("flushTablet", new flushTablet());
       processMap.put("chop", new chop());
-      processMap.put("setTabletHostingGoal", new setTabletHostingGoal());
       processMap.put("requestTabletHosting", new requestTabletHosting());
       return processMap;
     }
@@ -1061,76 +947,6 @@ public class TabletManagementClientService {
       }
     }
 
-    public static class setTabletHostingGoal<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setTabletHostingGoal_args, Void> {
-      public setTabletHostingGoal() {
-        super("setTabletHostingGoal");
-      }
-
-      @Override
-      public setTabletHostingGoal_args getEmptyArgsInstance() {
-        return new setTabletHostingGoal_args();
-      }
-
-      @Override
-      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
-          @Override
-          public void onComplete(Void o) {
-            setTabletHostingGoal_result result = new setTabletHostingGoal_result();
-            try {
-              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-            } catch (org.apache.thrift.transport.TTransportException e) {
-              _LOGGER.error("TTransportException writing to internal frame buffer", e);
-              fb.close();
-            } catch (java.lang.Exception e) {
-              _LOGGER.error("Exception writing to internal frame buffer", e);
-              onError(e);
-            }
-          }
-          @Override
-          public void onError(java.lang.Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TSerializable msg;
-            setTabletHostingGoal_result result = new setTabletHostingGoal_result();
-            if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) {
-              result.sec = (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) e;
-              result.setSecIsSet(true);
-              msg = result;
-            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
-              _LOGGER.error("TTransportException inside handler", e);
-              fb.close();
-              return;
-            } else if (e instanceof org.apache.thrift.TApplicationException) {
-              _LOGGER.error("TApplicationException inside handler", e);
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TApplicationException)e;
-            } else {
-              _LOGGER.error("Exception inside handler", e);
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
-              _LOGGER.error("Exception writing to internal frame buffer", ex);
-              fb.close();
-            }
-          }
-        };
-      }
-
-      @Override
-      protected boolean isOneway() {
-        return false;
-      }
-
-      @Override
-      public void start(I iface, setTabletHostingGoal_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
-        iface.setTabletHostingGoal(args.tinfo, args.credentials, args.tableId, args.extents, args.goal,resultHandler);
-      }
-    }
-
     public static class requestTabletHosting<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, requestTabletHosting_args, Void> {
       public requestTabletHosting() {
         super("requestTabletHosting");
@@ -5470,39 +5286,28 @@ public class TabletManagementClientService {
   }
 
   @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-  public static class setTabletHostingGoal_args implements org.apache.thrift.TBase<setTabletHostingGoal_args, setTabletHostingGoal_args._Fields>, java.io.Serializable, Cloneable, Comparable<setTabletHostingGoal_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setTabletHostingGoal_args");
+  public static class requestTabletHosting_args implements org.apache.thrift.TBase<requestTabletHosting_args, requestTabletHosting_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestTabletHosting_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestTabletHosting_args");
 
     private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)2);
     private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tableId", org.apache.thrift.protocol.TType.STRING, (short)3);
     private static final org.apache.thrift.protocol.TField EXTENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("extents", org.apache.thrift.protocol.TType.LIST, (short)4);
-    private static final org.apache.thrift.protocol.TField GOAL_FIELD_DESC = new org.apache.thrift.protocol.TField("goal", org.apache.thrift.protocol.TType.I32, (short)5);
 
-    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setTabletHostingGoal_argsStandardSchemeFactory();
-    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setTabletHostingGoal_argsTupleSchemeFactory();
+    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestTabletHosting_argsStandardSchemeFactory();
+    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestTabletHosting_argsTupleSchemeFactory();
 
     public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
     public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
     public @org.apache.thrift.annotation.Nullable java.lang.String tableId; // required
     public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents; // required
-    /**
-     * 
-     * @see THostingGoal
-     */
-    public @org.apache.thrift.annotation.Nullable THostingGoal goal; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       TINFO((short)1, "tinfo"),
       CREDENTIALS((short)2, "credentials"),
       TABLE_ID((short)3, "tableId"),
-      EXTENTS((short)4, "extents"),
-      /**
-       * 
-       * @see THostingGoal
-       */
-      GOAL((short)5, "goal");
+      EXTENTS((short)4, "extents");
 
       private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
 
@@ -5526,8 +5331,6 @@ public class TabletManagementClientService {
             return TABLE_ID;
           case 4: // EXTENTS
             return EXTENTS;
-          case 5: // GOAL
-            return GOAL;
           default:
             return null;
         }
@@ -5583,34 +5386,30 @@ public class TabletManagementClientService {
       tmpMap.put(_Fields.EXTENTS, new org.apache.thrift.meta_data.FieldMetaData("extents", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
               new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent.class))));
-      tmpMap.put(_Fields.GOAL, new org.apache.thrift.meta_data.FieldMetaData("goal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, THostingGoal.class)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setTabletHostingGoal_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestTabletHosting_args.class, metaDataMap);
     }
 
-    public setTabletHostingGoal_args() {
+    public requestTabletHosting_args() {
     }
 
-    public setTabletHostingGoal_args(
+    public requestTabletHosting_args(
       org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
       org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
       java.lang.String tableId,
-      java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents,
-      THostingGoal goal)
+      java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents)
     {
       this();
       this.tinfo = tinfo;
       this.credentials = credentials;
       this.tableId = tableId;
       this.extents = extents;
-      this.goal = goal;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public setTabletHostingGoal_args(setTabletHostingGoal_args other) {
+    public requestTabletHosting_args(requestTabletHosting_args other) {
       if (other.isSetTinfo()) {
         this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
       }
@@ -5627,14 +5426,11 @@ public class TabletManagementClientService {
         }
         this.extents = __this__extents;
       }
-      if (other.isSetGoal()) {
-        this.goal = other.goal;
-      }
     }
 
     @Override
-    public setTabletHostingGoal_args deepCopy() {
-      return new setTabletHostingGoal_args(this);
+    public requestTabletHosting_args deepCopy() {
+      return new requestTabletHosting_args(this);
     }
 
     @Override
@@ -5643,7 +5439,6 @@ public class TabletManagementClientService {
       this.credentials = null;
       this.tableId = null;
       this.extents = null;
-      this.goal = null;
     }
 
     @org.apache.thrift.annotation.Nullable
@@ -5651,7 +5446,7 @@ public class TabletManagementClientService {
       return this.tinfo;
     }
 
-    public setTabletHostingGoal_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) {
+    public requestTabletHosting_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) {
       this.tinfo = tinfo;
       return this;
     }
@@ -5676,7 +5471,7 @@ public class TabletManagementClientService {
       return this.credentials;
     }
 
-    public setTabletHostingGoal_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
+    public requestTabletHosting_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
       this.credentials = credentials;
       return this;
     }
@@ -5701,7 +5496,7 @@ public class TabletManagementClientService {
       return this.tableId;
     }
 
-    public setTabletHostingGoal_args setTableId(@org.apache.thrift.annotation.Nullable java.lang.String tableId) {
+    public requestTabletHosting_args setTableId(@org.apache.thrift.annotation.Nullable java.lang.String tableId) {
       this.tableId = tableId;
       return this;
     }
@@ -5742,7 +5537,7 @@ public class TabletManagementClientService {
       return this.extents;
     }
 
-    public setTabletHostingGoal_args setExtents(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents) {
+    public requestTabletHosting_args setExtents(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents) {
       this.extents = extents;
       return this;
     }
@@ -5762,39 +5557,6 @@ public class TabletManagementClientService {
       }
     }
 
-    /**
-     * 
-     * @see THostingGoal
-     */
-    @org.apache.thrift.annotation.Nullable
-    public THostingGoal getGoal() {
-      return this.goal;
-    }
-
-    /**
-     * 
-     * @see THostingGoal
-     */
-    public setTabletHostingGoal_args setGoal(@org.apache.thrift.annotation.Nullable THostingGoal goal) {
-      this.goal = goal;
-      return this;
-    }
-
-    public void unsetGoal() {
-      this.goal = null;
-    }
-
-    /** Returns true if field goal is set (has been assigned a value) and false otherwise */
-    public boolean isSetGoal() {
-      return this.goal != null;
-    }
-
-    public void setGoalIsSet(boolean value) {
-      if (!value) {
-        this.goal = null;
-      }
-    }
-
     @Override
     public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
@@ -5830,14 +5592,6 @@ public class TabletManagementClientService {
         }
         break;
 
-      case GOAL:
-        if (value == null) {
-          unsetGoal();
-        } else {
-          setGoal((THostingGoal)value);
-        }
-        break;
-
       }
     }
 
@@ -5857,9 +5611,6 @@ public class TabletManagementClientService {
       case EXTENTS:
         return getExtents();
 
-      case GOAL:
-        return getGoal();
-
       }
       throw new java.lang.IllegalStateException();
     }
@@ -5880,20 +5631,18 @@ public class TabletManagementClientService {
         return isSetTableId();
       case EXTENTS:
         return isSetExtents();
-      case GOAL:
-        return isSetGoal();
       }
       throw new java.lang.IllegalStateException();
     }
 
     @Override
     public boolean equals(java.lang.Object that) {
-      if (that instanceof setTabletHostingGoal_args)
-        return this.equals((setTabletHostingGoal_args)that);
+      if (that instanceof requestTabletHosting_args)
+        return this.equals((requestTabletHosting_args)that);
       return false;
     }
 
-    public boolean equals(setTabletHostingGoal_args that) {
+    public boolean equals(requestTabletHosting_args that) {
       if (that == null)
         return false;
       if (this == that)
@@ -5935,15 +5684,6 @@ public class TabletManagementClientService {
           return false;
       }
 
-      boolean this_present_goal = true && this.isSetGoal();
-      boolean that_present_goal = true && that.isSetGoal();
-      if (this_present_goal || that_present_goal) {
-        if (!(this_present_goal && that_present_goal))
-          return false;
-        if (!this.goal.equals(that.goal))
-          return false;
-      }
-
       return true;
     }
 
@@ -5967,15 +5707,11 @@ public class TabletManagementClientService {
       if (isSetExtents())
         hashCode = hashCode * 8191 + extents.hashCode();
 
-      hashCode = hashCode * 8191 + ((isSetGoal()) ? 131071 : 524287);
-      if (isSetGoal())
-        hashCode = hashCode * 8191 + goal.getValue();
-
       return hashCode;
     }
 
     @Override
-    public int compareTo(setTabletHostingGoal_args other) {
+    public int compareTo(requestTabletHosting_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -6022,16 +5758,6 @@ public class TabletManagementClientService {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.compare(isSetGoal(), other.isSetGoal());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetGoal()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.goal, other.goal);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
       return 0;
     }
 
@@ -6053,7 +5779,7 @@ public class TabletManagementClientService {
 
     @Override
     public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("setTabletHostingGoal_args(");
+      java.lang.StringBuilder sb = new java.lang.StringBuilder("requestTabletHosting_args(");
       boolean first = true;
 
       sb.append("tinfo:");
@@ -6087,14 +5813,6 @@ public class TabletManagementClientService {
         sb.append(this.extents);
       }
       first = false;
-      if (!first) sb.append(", ");
-      sb.append("goal:");
-      if (this.goal == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.goal);
-      }
-      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -6126,17 +5844,17 @@ public class TabletManagementClientService {
       }
     }
 
-    private static class setTabletHostingGoal_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+    private static class requestTabletHosting_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
       @Override
-      public setTabletHostingGoal_argsStandardScheme getScheme() {
-        return new setTabletHostingGoal_argsStandardScheme();
+      public requestTabletHosting_argsStandardScheme getScheme() {
+        return new requestTabletHosting_argsStandardScheme();
       }
     }
 
-    private static class setTabletHostingGoal_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setTabletHostingGoal_args> {
+    private static class requestTabletHosting_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<requestTabletHosting_args> {
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol iprot, setTabletHostingGoal_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, requestTabletHosting_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -6191,14 +5909,6 @@ public class TabletManagementClientService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 5: // GOAL
-              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-                struct.goal = org.apache.accumulo.core.tablet.thrift.THostingGoal.findByValue(iprot.readI32());
-                struct.setGoalIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -6211,7 +5921,7 @@ public class TabletManagementClientService {
       }
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol oprot, setTabletHostingGoal_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, requestTabletHosting_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -6242,28 +5952,23 @@ public class TabletManagementClientService {
           }
           oprot.writeFieldEnd();
         }
-        if (struct.goal != null) {
-          oprot.writeFieldBegin(GOAL_FIELD_DESC);
-          oprot.writeI32(struct.goal.getValue());
-          oprot.writeFieldEnd();
-        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
 
     }
 
-    private static class setTabletHostingGoal_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+    private static class requestTabletHosting_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
       @Override
-      public setTabletHostingGoal_argsTupleScheme getScheme() {
-        return new setTabletHostingGoal_argsTupleScheme();
+      public requestTabletHosting_argsTupleScheme getScheme() {
+        return new requestTabletHosting_argsTupleScheme();
       }
     }
 
-    private static class setTabletHostingGoal_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setTabletHostingGoal_args> {
+    private static class requestTabletHosting_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<requestTabletHosting_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, setTabletHostingGoal_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, requestTabletHosting_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
         java.util.BitSet optionals = new java.util.BitSet();
         if (struct.isSetTinfo()) {
@@ -6278,10 +5983,7 @@ public class TabletManagementClientService {
         if (struct.isSetExtents()) {
           optionals.set(3);
         }
-        if (struct.isSetGoal()) {
-          optionals.set(4);
-        }
-        oprot.writeBitSet(optionals, 5);
+        oprot.writeBitSet(optionals, 4);
         if (struct.isSetTinfo()) {
           struct.tinfo.write(oprot);
         }
@@ -6300,15 +6002,12 @@ public class TabletManagementClientService {
             }
           }
         }
-        if (struct.isSetGoal()) {
-          oprot.writeI32(struct.goal.getValue());
-        }
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, setTabletHostingGoal_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, requestTabletHosting_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        java.util.BitSet incoming = iprot.readBitSet(5);
+        java.util.BitSet incoming = iprot.readBitSet(4);
         if (incoming.get(0)) {
           struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
           struct.tinfo.read(iprot);
@@ -6337,1149 +6036,6 @@ public class TabletManagementClientService {
           }
           struct.setExtentsIsSet(true);
         }
-        if (incoming.get(4)) {
-          struct.goal = org.apache.accumulo.core.tablet.thrift.THostingGoal.findByValue(iprot.readI32());
-          struct.setGoalIsSet(true);
-        }
-      }
-    }
-
-    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
-      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
-    }
-  }
-
-  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-  public static class setTabletHostingGoal_result implements org.apache.thrift.TBase<setTabletHostingGoal_result, setTabletHostingGoal_result._Fields>, java.io.Serializable, Cloneable, Comparable<setTabletHostingGoal_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setTabletHostingGoal_result");
-
-    private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
-    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setTabletHostingGoal_resultStandardSchemeFactory();
-    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setTabletHostingGoal_resultTupleSchemeFactory();
-
-    public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SEC((short)1, "sec");
-
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
-
-      static {
-        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      @org.apache.thrift.annotation.Nullable
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // SEC
-            return SEC;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      @org.apache.thrift.annotation.Nullable
-      public static _Fields findByName(java.lang.String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final java.lang.String _fieldName;
-
-      _Fields(short thriftId, java.lang.String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      @Override
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      @Override
-      public java.lang.String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException.class)));
-      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setTabletHostingGoal_result.class, metaDataMap);
-    }
-
-    public setTabletHostingGoal_result() {
-    }
-
-    public setTabletHostingGoal_result(
-      org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec)
-    {
-      this();
-      this.sec = sec;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public setTabletHostingGoal_result(setTabletHostingGoal_result other) {
-      if (other.isSetSec()) {
-        this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
-      }
-    }
-
-    @Override
-    public setTabletHostingGoal_result deepCopy() {
-      return new setTabletHostingGoal_result(this);
-    }
-
-    @Override
-    public void clear() {
-      this.sec = null;
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() {
-      return this.sec;
-    }
-
-    public setTabletHostingGoal_result setSec(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
-      this.sec = sec;
-      return this;
-    }
-
-    public void unsetSec() {
-      this.sec = null;
-    }
-
-    /** Returns true if field sec is set (has been assigned a value) and false otherwise */
-    public boolean isSetSec() {
-      return this.sec != null;
-    }
-
-    public void setSecIsSet(boolean value) {
-      if (!value) {
-        this.sec = null;
-      }
-    }
-
-    @Override
-    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
-      switch (field) {
-      case SEC:
-        if (value == null) {
-          unsetSec();
-        } else {
-          setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
-        }
-        break;
-
-      }
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    @Override
-    public java.lang.Object getFieldValue(_Fields field) {
-      switch (field) {
-      case SEC:
-        return getSec();
-
-      }
-      throw new java.lang.IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    @Override
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new java.lang.IllegalArgumentException();
-      }
-
-      switch (field) {
-      case SEC:
-        return isSetSec();
-      }
-      throw new java.lang.IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(java.lang.Object that) {
-      if (that instanceof setTabletHostingGoal_result)
-        return this.equals((setTabletHostingGoal_result)that);
-      return false;
-    }
-
-    public boolean equals(setTabletHostingGoal_result that) {
-      if (that == null)
-        return false;
-      if (this == that)
-        return true;
-
-      boolean this_present_sec = true && this.isSetSec();
-      boolean that_present_sec = true && that.isSetSec();
-      if (this_present_sec || that_present_sec) {
-        if (!(this_present_sec && that_present_sec))
-          return false;
-        if (!this.sec.equals(that.sec))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      int hashCode = 1;
-
-      hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
-      if (isSetSec())
-        hashCode = hashCode * 8191 + sec.hashCode();
-
-      return hashCode;
-    }
-
-    @Override
-    public int compareTo(setTabletHostingGoal_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetSec()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, other.sec);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    @Override
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    @Override
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      scheme(iprot).read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      scheme(oprot).write(oprot, this);
-      }
-
-    @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("setTabletHostingGoal_result(");
-      boolean first = true;
-
-      sb.append("sec:");
-      if (this.sec == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.sec);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class setTabletHostingGoal_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
-      @Override
-      public setTabletHostingGoal_resultStandardScheme getScheme() {
-        return new setTabletHostingGoal_resultStandardScheme();
-      }
-    }
-
-    private static class setTabletHostingGoal_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setTabletHostingGoal_result> {
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol iprot, setTabletHostingGoal_result struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 1: // SEC
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
-                struct.sec.read(iprot);
-                struct.setSecIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol oprot, setTabletHostingGoal_result struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.sec != null) {
-          oprot.writeFieldBegin(SEC_FIELD_DESC);
-          struct.sec.write(oprot);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class setTabletHostingGoal_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
-      @Override
-      public setTabletHostingGoal_resultTupleScheme getScheme() {
-        return new setTabletHostingGoal_resultTupleScheme();
-      }
-    }
-
-    private static class setTabletHostingGoal_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setTabletHostingGoal_result> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, setTabletHostingGoal_result struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        java.util.BitSet optionals = new java.util.BitSet();
-        if (struct.isSetSec()) {
-          optionals.set(0);
-        }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetSec()) {
-          struct.sec.write(oprot);
-        }
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, setTabletHostingGoal_result struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        java.util.BitSet incoming = iprot.readBitSet(1);
-        if (incoming.get(0)) {
-          struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
-          struct.sec.read(iprot);
-          struct.setSecIsSet(true);
-        }
-      }
-    }
-
-    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
-      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
-    }
-  }
-
-  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-  public static class requestTabletHosting_args implements org.apache.thrift.TBase<requestTabletHosting_args, requestTabletHosting_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestTabletHosting_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestTabletHosting_args");
-
-    private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-    private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)2);
-    private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tableId", org.apache.thrift.protocol.TType.STRING, (short)3);
-    private static final org.apache.thrift.protocol.TField EXTENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("extents", org.apache.thrift.protocol.TType.LIST, (short)4);
-
-    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestTabletHosting_argsStandardSchemeFactory();
-    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestTabletHosting_argsTupleSchemeFactory();
-
-    public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
-    public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
-    public @org.apache.thrift.annotation.Nullable java.lang.String tableId; // required
-    public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      TINFO((short)1, "tinfo"),
-      CREDENTIALS((short)2, "credentials"),
-      TABLE_ID((short)3, "tableId"),
-      EXTENTS((short)4, "extents");
-
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
-
-      static {
-        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      @org.apache.thrift.annotation.Nullable
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // TINFO
-            return TINFO;
-          case 2: // CREDENTIALS
-            return CREDENTIALS;
-          case 3: // TABLE_ID
-            return TABLE_ID;
-          case 4: // EXTENTS
-            return EXTENTS;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      @org.apache.thrift.annotation.Nullable
-      public static _Fields findByName(java.lang.String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final java.lang.String _fieldName;
-
-      _Fields(short thriftId, java.lang.String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      @Override
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      @Override
-      public java.lang.String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.TInfo.class)));
-      tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.securityImpl.thrift.TCredentials.class)));
-      tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("tableId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.EXTENTS, new org.apache.thrift.meta_data.FieldMetaData("extents", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent.class))));
-      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestTabletHosting_args.class, metaDataMap);
-    }
-
-    public requestTabletHosting_args() {
-    }
-
-    public requestTabletHosting_args(
-      org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
-      org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
-      java.lang.String tableId,
-      java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents)
-    {
-      this();
-      this.tinfo = tinfo;
-      this.credentials = credentials;
-      this.tableId = tableId;
-      this.extents = extents;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public requestTabletHosting_args(requestTabletHosting_args other) {
-      if (other.isSetTinfo()) {
-        this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
-      }
-      if (other.isSetCredentials()) {
-        this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
-      }
-      if (other.isSetTableId()) {
-        this.tableId = other.tableId;
-      }
-      if (other.isSetExtents()) {
-        java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> __this__extents = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(other.extents.size());
-        for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent other_element : other.extents) {
-          __this__extents.add(new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent(other_element));
-        }
-        this.extents = __this__extents;
-      }
-    }
-
-    @Override
-    public requestTabletHosting_args deepCopy() {
-      return new requestTabletHosting_args(this);
-    }
-
-    @Override
-    public void clear() {
-      this.tinfo = null;
-      this.credentials = null;
-      this.tableId = null;
-      this.extents = null;
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() {
-      return this.tinfo;
-    }
-
-    public requestTabletHosting_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) {
-      this.tinfo = tinfo;
-      return this;
-    }
-
-    public void unsetTinfo() {
-      this.tinfo = null;
-    }
-
-    /** Returns true if field tinfo is set (has been assigned a value) and false otherwise */
-    public boolean isSetTinfo() {
-      return this.tinfo != null;
-    }
-
-    public void setTinfoIsSet(boolean value) {
-      if (!value) {
-        this.tinfo = null;
-      }
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
-      return this.credentials;
-    }
-
-    public requestTabletHosting_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
-      this.credentials = credentials;
-      return this;
-    }
-
-    public void unsetCredentials() {
-      this.credentials = null;
-    }
-
-    /** Returns true if field credentials is set (has been assigned a value) and false otherwise */
-    public boolean isSetCredentials() {
-      return this.credentials != null;
-    }
-
-    public void setCredentialsIsSet(boolean value) {
-      if (!value) {
-        this.credentials = null;
-      }
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    public java.lang.String getTableId() {
-      return this.tableId;
-    }
-
-    public requestTabletHosting_args setTableId(@org.apache.thrift.annotation.Nullable java.lang.String tableId) {
-      this.tableId = tableId;
-      return this;
-    }
-
-    public void unsetTableId() {
-      this.tableId = null;
-    }
-
-    /** Returns true if field tableId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTableId() {
-      return this.tableId != null;
-    }
-
-    public void setTableIdIsSet(boolean value) {
-      if (!value) {
-        this.tableId = null;
-      }
-    }
-
-    public int getExtentsSize() {
-      return (this.extents == null) ? 0 : this.extents.size();
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    public java.util.Iterator<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> getExtentsIterator() {
-      return (this.extents == null) ? null : this.extents.iterator();
-    }
-
-    public void addToExtents(org.apache.accumulo.core.dataImpl.thrift.TKeyExtent elem) {
-      if (this.extents == null) {
-        this.extents = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>();
-      }
-      this.extents.add(elem);
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    public java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> getExtents() {
-      return this.extents;
-    }
-
-    public requestTabletHosting_args setExtents(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> extents) {
-      this.extents = extents;
-      return this;
-    }
-
-    public void unsetExtents() {
-      this.extents = null;
-    }
-
-    /** Returns true if field extents is set (has been assigned a value) and false otherwise */
-    public boolean isSetExtents() {
-      return this.extents != null;
-    }
-
-    public void setExtentsIsSet(boolean value) {
-      if (!value) {
-        this.extents = null;
-      }
-    }
-
-    @Override
-    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
-      switch (field) {
-      case TINFO:
-        if (value == null) {
-          unsetTinfo();
-        } else {
-          setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value);
-        }
-        break;
-
-      case CREDENTIALS:
-        if (value == null) {
-          unsetCredentials();
-        } else {
-          setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
-        }
-        break;
-
-      case TABLE_ID:
-        if (value == null) {
-          unsetTableId();
-        } else {
-          setTableId((java.lang.String)value);
-        }
-        break;
-
-      case EXTENTS:
-        if (value == null) {
-          unsetExtents();
-        } else {
-          setExtents((java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>)value);
-        }
-        break;
-
-      }
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    @Override
-    public java.lang.Object getFieldValue(_Fields field) {
-      switch (field) {
-      case TINFO:
-        return getTinfo();
-
-      case CREDENTIALS:
-        return getCredentials();
-
-      case TABLE_ID:
-        return getTableId();
-
-      case EXTENTS:
-        return getExtents();
-
-      }
-      throw new java.lang.IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    @Override
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new java.lang.IllegalArgumentException();
-      }
-
-      switch (field) {
-      case TINFO:
-        return isSetTinfo();
-      case CREDENTIALS:
-        return isSetCredentials();
-      case TABLE_ID:
-        return isSetTableId();
-      case EXTENTS:
-        return isSetExtents();
-      }
-      throw new java.lang.IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(java.lang.Object that) {
-      if (that instanceof requestTabletHosting_args)
-        return this.equals((requestTabletHosting_args)that);
-      return false;
-    }
-
-    public boolean equals(requestTabletHosting_args that) {
-      if (that == null)
-        return false;
-      if (this == that)
-        return true;
-
-      boolean this_present_tinfo = true && this.isSetTinfo();
-      boolean that_present_tinfo = true && that.isSetTinfo();
-      if (this_present_tinfo || that_present_tinfo) {
-        if (!(this_present_tinfo && that_present_tinfo))
-          return false;
-        if (!this.tinfo.equals(that.tinfo))
-          return false;
-      }
-
-      boolean this_present_credentials = true && this.isSetCredentials();
-      boolean that_present_credentials = true && that.isSetCredentials();
-      if (this_present_credentials || that_present_credentials) {
-        if (!(this_present_credentials && that_present_credentials))
-          return false;
-        if (!this.credentials.equals(that.credentials))
-          return false;
-      }
-
-      boolean this_present_tableId = true && this.isSetTableId();
-      boolean that_present_tableId = true && that.isSetTableId();
-      if (this_present_tableId || that_present_tableId) {
-        if (!(this_present_tableId && that_present_tableId))
-          return false;
-        if (!this.tableId.equals(that.tableId))
-          return false;
-      }
-
-      boolean this_present_extents = true && this.isSetExtents();
-      boolean that_present_extents = true && that.isSetExtents();
-      if (this_present_extents || that_present_extents) {
-        if (!(this_present_extents && that_present_extents))
-          return false;
-        if (!this.extents.equals(that.extents))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      int hashCode = 1;
-
-      hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
-      if (isSetTinfo())
-        hashCode = hashCode * 8191 + tinfo.hashCode();
-
-      hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
-      if (isSetCredentials())
-        hashCode = hashCode * 8191 + credentials.hashCode();
-
-      hashCode = hashCode * 8191 + ((isSetTableId()) ? 131071 : 524287);
-      if (isSetTableId())
-        hashCode = hashCode * 8191 + tableId.hashCode();
-
-      hashCode = hashCode * 8191 + ((isSetExtents()) ? 131071 : 524287);
-      if (isSetExtents())
-        hashCode = hashCode * 8191 + extents.hashCode();
-
-      return hashCode;
-    }
-
-    @Override
-    public int compareTo(requestTabletHosting_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetTinfo()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetCredentials()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = java.lang.Boolean.compare(isSetTableId(), other.isSetTableId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetTableId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableId, other.tableId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = java.lang.Boolean.compare(isSetExtents(), other.isSetExtents());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetExtents()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extents, other.extents);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    @org.apache.thrift.annotation.Nullable
-    @Override
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    @Override
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      scheme(iprot).read(iprot, this);
-    }
-
-    @Override
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      scheme(oprot).write(oprot, this);
-    }
-
-    @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("requestTabletHosting_args(");
-      boolean first = true;
-
-      sb.append("tinfo:");
-      if (this.tinfo == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.tinfo);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("credentials:");
-      if (this.credentials == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.credentials);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("tableId:");
-      if (this.tableId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.tableId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("extents:");
-      if (this.extents == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.extents);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-      if (tinfo != null) {
-        tinfo.validate();
-      }
-      if (credentials != null) {
-        credentials.validate();
-      }
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class requestTabletHosting_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
-      @Override
-      public requestTabletHosting_argsStandardScheme getScheme() {
-        return new requestTabletHosting_argsStandardScheme();
-      }
-    }
-
-    private static class requestTabletHosting_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<requestTabletHosting_args> {
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol iprot, requestTabletHosting_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 1: // TINFO
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
-                struct.tinfo.read(iprot);
-                struct.setTinfoIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 2: // CREDENTIALS
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
-                struct.credentials.read(iprot);
-                struct.setCredentialsIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 3: // TABLE_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.tableId = iprot.readString();
-                struct.setTableIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 4: // EXTENTS
-              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
-                {
-                  org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
-                  struct.extents = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list8.size);
-                  @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem9;
-                  for (int _i10 = 0; _i10 < _list8.size; ++_i10)
-                  {
-                    _elem9 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
-                    _elem9.read(iprot);
-                    struct.extents.add(_elem9);
-                  }
-                  iprot.readListEnd();
-                }
-                struct.setExtentsIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol oprot, requestTabletHosting_args struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.tinfo != null) {
-          oprot.writeFieldBegin(TINFO_FIELD_DESC);
-          struct.tinfo.write(oprot);
-          oprot.writeFieldEnd();
-        }
-        if (struct.credentials != null) {
-          oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
-          struct.credentials.write(oprot);
-          oprot.writeFieldEnd();
-        }
-        if (struct.tableId != null) {
-          oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
-          oprot.writeString(struct.tableId);
-          oprot.writeFieldEnd();
-        }
-        if (struct.extents != null) {
-          oprot.writeFieldBegin(EXTENTS_FIELD_DESC);
-          {
-            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.extents.size()));
-            for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter11 : struct.extents)
-            {
-              _iter11.write(oprot);
-            }
-            oprot.writeListEnd();
-          }
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class requestTabletHosting_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
-      @Override
-      public requestTabletHosting_argsTupleScheme getScheme() {
-        return new requestTabletHosting_argsTupleScheme();
-      }
-    }
-
-    private static class requestTabletHosting_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<requestTabletHosting_args> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, requestTabletHosting_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        java.util.BitSet optionals = new java.util.BitSet();
-        if (struct.isSetTinfo()) {
-          optionals.set(0);
-        }
-        if (struct.isSetCredentials()) {
-          optionals.set(1);
-        }
-        if (struct.isSetTableId()) {
-          optionals.set(2);
-        }
-        if (struct.isSetExtents()) {
-          optionals.set(3);
-        }
-        oprot.writeBitSet(optionals, 4);
-        if (struct.isSetTinfo()) {
-          struct.tinfo.write(oprot);
-        }
-        if (struct.isSetCredentials()) {
-          struct.credentials.write(oprot);
-        }
-        if (struct.isSetTableId()) {
-          oprot.writeString(struct.tableId);
-        }
-        if (struct.isSetExtents()) {
-          {
-            oprot.writeI32(struct.extents.size());
-            for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter12 : struct.extents)
-            {
-              _iter12.write(oprot);
-            }
-          }
-        }
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, requestTabletHosting_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        java.util.BitSet incoming = iprot.readBitSet(4);
-        if (incoming.get(0)) {
-          struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
-          struct.tinfo.read(iprot);
-          struct.setTinfoIsSet(true);
-        }
-        if (incoming.get(1)) {
-          struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
-          struct.credentials.read(iprot);
-          struct.setCredentialsIsSet(true);
-        }
-        if (incoming.get(2)) {
-          struct.tableId = iprot.readString();
-          struct.setTableIdIsSet(true);
-        }
-        if (incoming.get(3)) {
-          {
-            org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
-            struct.extents = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list13.size);
-            @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem14;
-            for (int _i15 = 0; _i15 < _list13.size; ++_i15)
-            {
-              _elem14 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
-              _elem14.read(iprot);
-              struct.extents.add(_elem14);
-            }
-          }
-          struct.setExtentsIsSet(true);
-        }
       }
     }
 
diff --git a/core/src/main/thrift/client.thrift b/core/src/main/thrift/client.thrift
index 8891195293..9c430d4001 100644
--- a/core/src/main/thrift/client.thrift
+++ b/core/src/main/thrift/client.thrift
@@ -39,6 +39,7 @@ enum TableOperation {
   IMPORT
   EXPORT
   COMPACT_CANCEL
+  SET_HOSTING_GOAL
 }
 
 enum TableOperationExceptionType {
@@ -120,6 +121,12 @@ struct TInfo {
   1:map<string,string> headers
 }
 
+enum THostingGoal {
+  ALWAYS
+  NEVER
+  ONDEMAND
+}
+
 service ClientService {
 
   // system management methods
diff --git a/core/src/main/thrift/manager.thrift b/core/src/main/thrift/manager.thrift
index c6a788d02c..463e203027 100644
--- a/core/src/main/thrift/manager.thrift
+++ b/core/src/main/thrift/manager.thrift
@@ -72,6 +72,7 @@ enum FateOperation {
   NAMESPACE_DELETE
   NAMESPACE_RENAME
   TABLE_BULK_IMPORT2
+  TABLE_HOSTING_GOAL
 }
 
 enum ManagerState {
diff --git a/core/src/main/thrift/tabletmgmt.thrift b/core/src/main/thrift/tabletmgmt.thrift
index bfe407adea..46951066f7 100644
--- a/core/src/main/thrift/tabletmgmt.thrift
+++ b/core/src/main/thrift/tabletmgmt.thrift
@@ -31,12 +31,6 @@ enum TUnloadTabletGoal {
   DELETED
 }
 
-enum THostingGoal {
-  ALWAYS
-  NEVER
-  ONDEMAND
-}
-
 service TabletManagementClientService {
 
   oneway void loadTablet(
@@ -79,16 +73,6 @@ service TabletManagementClientService {
     4:data.TKeyExtent extent
   )
   
-  void setTabletHostingGoal(
-    1:client.TInfo tinfo
-    2:security.TCredentials credentials
-    3:string tableId
-    4:list<data.TKeyExtent> extents
-    5:THostingGoal goal
-  ) throws (
-    1:client.ThriftSecurityException sec
-  )
-  
   void requestTabletHosting(
     1:client.TInfo tinfo
     2:security.TCredentials credentials
diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/FateServiceHandler.java b/server/manager/src/main/java/org/apache/accumulo/manager/FateServiceHandler.java
index 271c5b0e55..2dcd024750 100644
--- a/server/manager/src/main/java/org/apache/accumulo/manager/FateServiceHandler.java
+++ b/server/manager/src/main/java/org/apache/accumulo/manager/FateServiceHandler.java
@@ -48,6 +48,7 @@ import org.apache.accumulo.core.client.NamespaceNotFoundException;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.admin.CompactionConfig;
 import org.apache.accumulo.core.client.admin.InitialTableState;
+import org.apache.accumulo.core.client.admin.TabletHostingGoal;
 import org.apache.accumulo.core.client.admin.TimeType;
 import org.apache.accumulo.core.clientImpl.Namespaces;
 import org.apache.accumulo.core.clientImpl.TableOperationsImpl;
@@ -62,6 +63,7 @@ import org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.NamespaceId;
 import org.apache.accumulo.core.data.TableId;
+import org.apache.accumulo.core.dataImpl.thrift.TRange;
 import org.apache.accumulo.core.fate.ReadOnlyTStore.TStatus;
 import org.apache.accumulo.core.manager.thrift.FateOperation;
 import org.apache.accumulo.core.manager.thrift.FateService;
@@ -81,6 +83,7 @@ import org.apache.accumulo.manager.tableOps.compact.CompactRange;
 import org.apache.accumulo.manager.tableOps.compact.cancel.CancelCompactions;
 import org.apache.accumulo.manager.tableOps.create.CreateTable;
 import org.apache.accumulo.manager.tableOps.delete.PreDeleteTable;
+import org.apache.accumulo.manager.tableOps.goal.SetHostingGoal;
 import org.apache.accumulo.manager.tableOps.merge.TableRangeOp;
 import org.apache.accumulo.manager.tableOps.namespace.create.CreateNamespace;
 import org.apache.accumulo.manager.tableOps.namespace.delete.DeleteNamespace;
@@ -95,6 +98,8 @@ import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
+import org.apache.thrift.TDeserializer;
+import org.apache.thrift.TException;
 import org.slf4j.Logger;
 
 class FateServiceHandler implements FateService.Iface {
@@ -607,7 +612,7 @@ class FateServiceHandler implements FateService.Iface {
             autoCleanup, goalMessage);
         break;
       }
-      case TABLE_BULK_IMPORT2:
+      case TABLE_BULK_IMPORT2: {
         TableOperation tableOp = TableOperation.BULK_IMPORT;
         validateArgumentCount(arguments, tableOp, 3);
         final var tableId = validateTableIdArgument(arguments.get(0), tableOp, NOT_ROOT_TABLE_ID);
@@ -642,6 +647,50 @@ class FateServiceHandler implements FateService.Iface {
         manager.fate().seedTransaction(op.toString(), opid,
             new TraceRepo<>(new PrepBulkImport(tableId, dir, setTime)), autoCleanup, goalMessage);
         break;
+      }
+      case TABLE_HOSTING_GOAL: {
+        TableOperation tableOp = TableOperation.SET_HOSTING_GOAL;
+        validateArgumentCount(arguments, tableOp, 3);
+        String tableName = validateName(arguments.get(0), tableOp, NOT_METADATA_TABLE);
+        TableId tableId = null;
+        try {
+          tableId = manager.getContext().getTableId(tableName);
+        } catch (TableNotFoundException e) {
+          throw new ThriftTableOperationException(null, tableName, TableOperation.SET_HOSTING_GOAL,
+              TableOperationExceptionType.NOTFOUND, "Table no longer exists");
+        }
+        final NamespaceId namespaceId = getNamespaceIdFromTableId(tableOp, tableId);
+
+        final boolean canSetHostingGoal;
+        try {
+          canSetHostingGoal = manager.security.canAlterTable(c, tableId, namespaceId);
+        } catch (ThriftSecurityException e) {
+          throwIfTableMissingSecurityException(e, tableId, tableName,
+              TableOperation.SET_HOSTING_GOAL);
+          throw e;
+        }
+        if (!canSetHostingGoal) {
+          throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
+        }
+
+        TRange tRange = new TRange();
+        try {
+          new TDeserializer().deserialize(tRange, ByteBufferUtil.toBytes(arguments.get(1)));
+        } catch (TException e) {
+          throw new ThriftTableOperationException(tableId.canonical(), tableName,
+              TableOperation.SET_HOSTING_GOAL, TableOperationExceptionType.BAD_RANGE,
+              e.getMessage());
+        }
+        TabletHostingGoal goal =
+            TabletHostingGoal.valueOf(ByteBufferUtil.toString(arguments.get(2)));
+
+        goalMessage += "Set Hosting Goal for table: " + tableName + "(" + tableId + ") range: "
+            + tRange + " to: " + goal.name();
+        manager.fate().seedTransaction(op.toString(), opid,
+            new TraceRepo<>(new SetHostingGoal(tableId, namespaceId, tRange, goal)), autoCleanup,
+            goalMessage);
+        break;
+      }
       default:
         throw new UnsupportedOperationException();
     }
diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/goal/SetHostingGoal.java b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/goal/SetHostingGoal.java
new file mode 100644
index 0000000000..b878f8b8b6
--- /dev/null
+++ b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/goal/SetHostingGoal.java
@@ -0,0 +1,125 @@
+/*
+ * 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
+ *
+ *   https://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.manager.tableOps.goal;
+
+import org.apache.accumulo.core.client.admin.TabletHostingGoal;
+import org.apache.accumulo.core.clientImpl.thrift.TableOperation;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.NamespaceId;
+import org.apache.accumulo.core.data.PartialKey;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.TableId;
+import org.apache.accumulo.core.dataImpl.KeyExtent;
+import org.apache.accumulo.core.dataImpl.thrift.TRange;
+import org.apache.accumulo.core.fate.Repo;
+import org.apache.accumulo.core.metadata.schema.Ample.TabletsMutator;
+import org.apache.accumulo.core.metadata.schema.TabletMetadata;
+import org.apache.accumulo.core.metadata.schema.TabletsMetadata;
+import org.apache.accumulo.manager.Manager;
+import org.apache.accumulo.manager.tableOps.ManagerRepo;
+import org.apache.accumulo.manager.tableOps.Utils;
+import org.apache.hadoop.io.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SetHostingGoal extends ManagerRepo {
+
+  private static final long serialVersionUID = 1L;
+  private static final Logger LOG = LoggerFactory.getLogger(SetHostingGoal.class);
+
+  private final TableId tableId;
+  private final NamespaceId namespaceId;
+  private final TRange tRange;
+  private final TabletHostingGoal goal;
+
+  public SetHostingGoal(TableId tableId, NamespaceId namespaceId, TRange range,
+      TabletHostingGoal goal) {
+    this.tableId = tableId;
+    this.namespaceId = namespaceId;
+    this.tRange = range;
+    this.goal = goal;
+  }
+
+  @Override
+  public long isReady(long tid, Manager manager) throws Exception {
+    return Utils.reserveNamespace(manager, namespaceId, tid, false, true,
+        TableOperation.SET_HOSTING_GOAL)
+        + Utils.reserveTable(manager, tableId, tid, true, true, TableOperation.SET_HOSTING_GOAL);
+  }
+
+  @Override
+  public Repo<Manager> call(long tid, Manager manager) throws Exception {
+
+    final Range range = new Range(tRange);
+    LOG.debug("Finding tablets in Range: {} for table:{}", range, tableId);
+
+    // For all practical purposes the the start row is always inclusive, even if the key in the
+    // range is exclusive. For example the exclusive key row="a",family="b",qualifier="c" may
+    // exclude the column b:c but its still falls somewhere in the row "a". The only case where this
+    // would not be true is if the start key in a range is the last possible key in a row. The last
+    // possible key in a row would contain 2GB column fields of all 0xff, which is why we assume the
+    // row is always inclusive.
+    final Text scanRangeStart = (range.getStartKey() == null) ? null : range.getStartKey().getRow();
+
+    TabletsMetadata m = manager.getContext().getAmple().readTablets().forTable(tableId)
+        .overlapping(scanRangeStart, true, null).build();
+
+    try (TabletsMutator mutator = manager.getContext().getAmple().mutateTablets()) {
+      for (TabletMetadata tm : m) {
+        final KeyExtent tabletExtent = tm.getExtent();
+        LOG.trace("Evaluating tablet {} against range {}", tabletExtent, range);
+        if (scanRangeStart != null && tm.getEndRow() != null
+            && tm.getEndRow().compareTo(scanRangeStart) < 0) {
+          // the end row of this tablet is before the start row, skip it
+          LOG.trace("tablet {} is before scan start range: {}", tabletExtent, scanRangeStart);
+          throw new RuntimeException("Bug in ample or this code.");
+        }
+
+        // Obtaining the end row from a range and knowing if the obtained row is inclusive or
+        // exclusive is really tricky depending on how the Range was created (using row or key
+        // constructors). So avoid trying to obtain an end row from the range and instead use
+        // range.afterKey below.
+        if (tm.getPrevEndRow() != null
+            && range.afterEndKey(new Key(tm.getPrevEndRow()).followingKey(PartialKey.ROW))) {
+          // the start row of this tablet is after the scan range, skip it
+          LOG.trace("tablet {} is after scan end range: {}", tabletExtent, range);
+          break;
+        }
+
+        if (tm.getHostingGoal() == goal) {
+          LOG.trace("Skipping tablet: {}, goal is already in required state");
+          continue;
+        }
+
+        LOG.debug("Setting tablet hosting goal to {} requested for: {} ", goal, tabletExtent);
+        mutator.mutateTablet(tabletExtent).setHostingGoal(goal).mutate();
+      }
+    }
+    Utils.unreserveNamespace(manager, namespaceId, tid, false);
+    Utils.unreserveTable(manager, tableId, tid, true);
+    return null;
+  }
+
+  @Override
+  public void undo(long tid, Manager manager) throws Exception {
+    Utils.unreserveNamespace(manager, namespaceId, tid, false);
+    Utils.unreserveTable(manager, tableId, tid, true);
+  }
+
+}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
index 160316e9fc..f37eb70519 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
@@ -49,7 +49,6 @@ import org.apache.accumulo.core.client.admin.CompactionConfig;
 import org.apache.accumulo.core.client.admin.TabletHostingGoal;
 import org.apache.accumulo.core.clientImpl.CompressedIterators;
 import org.apache.accumulo.core.clientImpl.DurabilityImpl;
-import org.apache.accumulo.core.clientImpl.TabletHostingGoalUtil;
 import org.apache.accumulo.core.clientImpl.TabletType;
 import org.apache.accumulo.core.clientImpl.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.clientImpl.thrift.TInfo;
@@ -93,7 +92,6 @@ import org.apache.accumulo.core.spi.cache.BlockCache;
 import org.apache.accumulo.core.summary.Gatherer;
 import org.apache.accumulo.core.summary.Gatherer.FileSystemResolver;
 import org.apache.accumulo.core.summary.SummaryCollection;
-import org.apache.accumulo.core.tablet.thrift.THostingGoal;
 import org.apache.accumulo.core.tablet.thrift.TUnloadTabletGoal;
 import org.apache.accumulo.core.tablet.thrift.TabletManagementClientService;
 import org.apache.accumulo.core.tabletingest.thrift.ConstraintViolationException;
@@ -1517,23 +1515,6 @@ public class TabletClientHandler implements TabletServerClientService.Iface,
     }
   }
 
-  @Override
-  public void setTabletHostingGoal(TInfo tinfo, TCredentials credentials, String tableId,
-      List<TKeyExtent> extents, THostingGoal goal) throws ThriftSecurityException, TException {
-    final TableId tid = TableId.of(tableId);
-    NamespaceId namespaceId = getNamespaceId(credentials, tid);
-    if (!security.canAlterTable(credentials, tid, namespaceId)) {
-      throw new ThriftSecurityException(credentials.getPrincipal(),
-          SecurityErrorCode.PERMISSION_DENIED);
-    }
-    final TabletHostingGoal g = TabletHostingGoalUtil.fromThrift(goal);
-    log.info("Tablet hosting goal {} requested for: {} ", g, extents);
-    try (TabletsMutator mutator = this.context.getAmple().mutateTablets()) {
-      extents
-          .forEach(e -> mutator.mutateTablet(KeyExtent.fromThrift(e)).setHostingGoal(g).mutate());
-    }
-  }
-
   @Override
   public void requestTabletHosting(TInfo tinfo, TCredentials credentials, String tableId,
       List<TKeyExtent> extents) throws ThriftSecurityException, TException {
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/OnDemandTabletUnloadingIT.java b/test/src/main/java/org/apache/accumulo/test/functional/OnDemandTabletUnloadingIT.java
index b9db6731a5..1d591289c8 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/OnDemandTabletUnloadingIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/OnDemandTabletUnloadingIT.java
@@ -84,6 +84,7 @@ public class OnDemandTabletUnloadingIT extends SharedMiniClusterBase {
             TestStatsDSink.Metric metric = TestStatsDSink.parseStatsDMetric(line);
             if (MetricsProducer.METRICS_TSERVER_TABLETS_ONLINE_ONDEMAND.equals(metric.getName())) {
               Long val = Long.parseLong(metric.getValue());
+              System.out.println(val);
               ONDEMAND_ONLINE_COUNT = val;
             }
           }
@@ -122,8 +123,9 @@ public class OnDemandTabletUnloadingIT extends SharedMiniClusterBase {
   }
 
   @BeforeEach
-  public void before() {
-    ONDEMAND_ONLINE_COUNT = 0L;
+  public void before() throws Exception {
+    // wait for tablets from previous test to be unloaded
+    Wait.waitFor(() -> ONDEMAND_ONLINE_COUNT == 0);
   }
 
   @Test
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 099120fb9f..e4aa89c835 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
@@ -61,7 +61,6 @@ import org.apache.accumulo.core.metadata.TabletLocationState;
 import org.apache.accumulo.core.metadata.schema.Ample.DataLevel;
 import org.apache.accumulo.core.rpc.clients.ThriftClientTypes;
 import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
-import org.apache.accumulo.core.tablet.thrift.THostingGoal;
 import org.apache.accumulo.core.tablet.thrift.TUnloadTabletGoal;
 import org.apache.accumulo.core.tablet.thrift.TabletManagementClientService;
 import org.apache.accumulo.core.tabletingest.thrift.TDurability;
@@ -297,10 +296,6 @@ public class NullTserver {
     public void compactionJobFailed(TInfo tinfo, TCredentials credentials,
         String externalCompactionId, TKeyExtent extent) throws TException {}
 
-    @Override
-    public void setTabletHostingGoal(TInfo tinfo, TCredentials credentials, String tableId,
-        List<TKeyExtent> extents, THostingGoal goal) throws ThriftSecurityException, TException {}
-
     @Override
     public void requestTabletHosting(TInfo tinfo, TCredentials credentials, String tableId,
         List<TKeyExtent> extents) throws ThriftSecurityException, TException {}