accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [12/14] accumulo git commit: ACCUMULO-3920 Deprecate mock components
Date Thu, 30 Jul 2015 21:51:46 GMT
ACCUMULO-3920 Deprecate mock components

* Deprecate Accumulo Mock classes
* Add javadoc to mock package to add additional details
* Create DeprecationUtil to help migrate code which must continue to use mock
* Minimize mock usage throughout the tests wherever possible
  * Use EasyMock in a few cases where it was possible to satisfy the test
  * Apply @Rule, @Before, etc. to reduce number of calls to MockInstance
* Create replacement IteratorAdapter for use outside of mock


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

Branch: refs/heads/master
Commit: 2556df3af159e80d0a0d7f06eff9360047ff135d
Parents: 6503223
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Wed Jul 8 22:02:03 2015 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu Jul 30 16:33:03 2015 -0400

----------------------------------------------------------------------
 core/src/main/findbugs/exclude-filter.xml       |   1 +
 .../apache/accumulo/core/cli/ClientOpts.java    |   4 +-
 .../core/client/ClientSideIteratorScanner.java  |   2 +-
 .../core/client/mapred/AbstractInputFormat.java |  12 +-
 .../core/client/mapred/AccumuloInputFormat.java |   2 +-
 .../mapred/AccumuloMultiTableInputFormat.java   |   2 +-
 .../client/mapred/AccumuloOutputFormat.java     |   8 +-
 .../client/mapred/AccumuloRowInputFormat.java   |   2 +-
 .../client/mapreduce/AbstractInputFormat.java   |  12 +-
 .../client/mapreduce/AccumuloInputFormat.java   |   2 +-
 .../AccumuloMultiTableInputFormat.java          |   2 +-
 .../client/mapreduce/AccumuloOutputFormat.java  |   7 +-
 .../mapreduce/AccumuloRowInputFormat.java       |   2 +-
 .../core/client/mapreduce/RangeInputSplit.java  |  16 +-
 .../core/client/mapreduce/impl/SplitUtils.java  |   4 +-
 .../mapreduce/lib/impl/ConfiguratorBase.java    |  11 +-
 .../mapreduce/lib/impl/InputConfigurator.java   |   4 +-
 .../mapreduce/lib/util/ConfiguratorBase.java    |   6 +-
 .../core/client/mock/IteratorAdapter.java       |  36 +----
 .../accumulo/core/client/mock/MockAccumulo.java |  10 +-
 .../core/client/mock/MockBatchDeleter.java      |   3 +
 .../core/client/mock/MockBatchScanner.java      |   4 +
 .../core/client/mock/MockBatchWriter.java       |   4 +
 .../core/client/mock/MockConfiguration.java     |   4 +
 .../core/client/mock/MockConnector.java         |   4 +
 .../accumulo/core/client/mock/MockInstance.java |   3 +-
 .../client/mock/MockInstanceOperations.java     |   4 +
 .../client/mock/MockMultiTableBatchWriter.java  |   4 +
 .../core/client/mock/MockNamespace.java         |   4 +
 .../client/mock/MockNamespaceOperations.java    |   4 +
 .../accumulo/core/client/mock/MockScanner.java  |   4 +
 .../core/client/mock/MockScannerBase.java       |   4 +
 .../client/mock/MockSecurityOperations.java     |   4 +
 .../accumulo/core/client/mock/MockTable.java    |   4 +
 .../core/client/mock/MockTableOperations.java   |   4 +
 .../accumulo/core/client/mock/MockUser.java     |   4 +
 .../client/mock/impl/MockTabletLocator.java     |   4 +
 .../accumulo/core/client/mock/package-info.java |  25 ++++
 .../core/iterators/IteratorAdapter.java         |  56 +++++++
 .../core/replication/ReplicationTable.java      |   4 +-
 .../accumulo/core/util/DeprecationUtil.java     |  61 ++++++++
 .../core/client/ClientSideIteratorTest.java     |  21 ++-
 .../accumulo/core/client/admin/FindMaxTest.java |  18 ++-
 .../core/client/impl/ScannerImplTest.java       |  10 +-
 .../impl/TabletServerBatchReaderTest.java       |  14 +-
 .../mapred/AccumuloFileOutputFormatTest.java    |   4 +-
 .../client/mapred/AccumuloInputFormatTest.java  |  33 ++--
 .../AccumuloMultiTableInputFormatTest.java      |   4 +-
 .../client/mapred/AccumuloOutputFormatTest.java |   4 +-
 .../mapred/AccumuloRowInputFormatTest.java      |  21 ++-
 .../core/client/mapred/RangeInputSplitTest.java |   5 +-
 .../core/client/mapred/TokenFileTest.java       |  25 ++--
 .../mapreduce/AccumuloFileOutputFormatTest.java |   4 +-
 .../mapreduce/AccumuloInputFormatTest.java      |  44 +++---
 .../AccumuloMultiTableInputFormatTest.java      |   4 +-
 .../mapreduce/AccumuloOutputFormatTest.java     |   4 +-
 .../mapreduce/AccumuloRowInputFormatTest.java   |   4 +-
 .../client/mapreduce/RangeInputSplitTest.java   |   5 +-
 .../core/client/mapreduce/TokenFileTest.java    |   4 +-
 .../mapreduce/impl/BatchInputSplitTest.java     |   6 +-
 .../lib/impl/ConfiguratorBaseTest.java          |   7 +-
 .../core/client/mock/MockConnectorTest.java     |   1 +
 .../core/client/mock/MockNamespacesTest.java    | 150 +++++++++----------
 .../client/mock/MockTableOperationsTest.java    |  57 ++++---
 .../core/client/mock/TestBatchScanner821.java   |  12 ++
 .../core/client/mock/TransformIterator.java     |  30 ----
 .../user/IntersectingIteratorTest.java          |  38 ++---
 .../core/iterators/user/RegExFilterTest.java    |  25 +++-
 .../core/iterators/user/RowFilterTest.java      |  29 ++--
 .../user/TransformingIteratorTest.java          |  13 +-
 .../core/metadata/MetadataServicerTest.java     |  54 +++++--
 .../accumulo/core/security/CredentialsTest.java |  29 +++-
 .../examples/simple/dirlist/CountTest.java      |  65 ++++----
 .../simple/filedata/ChunkInputFormatTest.java   |  28 ++--
 .../simple/filedata/ChunkInputStreamTest.java   |  24 ++-
 .../minicluster/MiniAccumuloCluster.java        |   2 +-
 .../impl/MiniAccumuloClusterImpl.java           |   5 +-
 .../org/apache/accumulo/proxy/ProxyServer.java  |   4 +-
 .../accumulo/server/AccumuloServerContext.java  |   4 +-
 .../server/cli/ClientOnDefaultTable.java        |   4 +-
 .../server/cli/ClientOnRequiredTable.java       |   4 +-
 .../apache/accumulo/server/cli/ClientOpts.java  |   4 +-
 .../server/AccumuloServerContextTest.java       |   4 +-
 .../server/client/BulkImporterTest.java         |  10 +-
 .../master/balancer/TableLoadBalancerTest.java  |   4 +-
 .../problems/ProblemReportingIteratorTest.java  |  16 +-
 .../server/security/SystemCredentialsTest.java  |  19 ++-
 .../apache/accumulo/server/util/CloneTest.java  |  53 +++----
 .../server/util/ReplicationTableUtilTest.java   |   6 +-
 .../server/util/TabletIteratorTest.java         |  29 ++--
 .../CloseWriteAheadLogReferencesTest.java       |  30 ++--
 .../master/ReplicationOperationsImplTest.java   |   5 +-
 .../apache/accumulo/master/TestMergeState.java  |  11 +-
 .../replication/FinishedWorkUpdaterTest.java    |   4 +-
 .../RemoveCompleteReplicationRecordsTest.java   |   6 +-
 .../replication/SequentialWorkAssignerTest.java |  60 ++------
 .../master/replication/StatusMakerTest.java     |  28 ++--
 .../replication/UnorderedWorkAssignerTest.java  |  38 ++---
 .../master/replication/WorkMakerTest.java       |   6 +-
 .../tserver/LargestFirstMemoryManagerTest.java  |  14 +-
 .../java/org/apache/accumulo/shell/Shell.java   |   6 +-
 .../apache/accumulo/shell/mock/MockShell.java   |   6 +-
 .../accumulo/shell/ShellSetInstanceTest.java    |   9 +-
 .../shell/commands/FormatterCommandTest.java    |   7 +-
 .../accumulo/test/iterator/RegExTest.java       |  31 ++--
 105 files changed, 917 insertions(+), 665 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/findbugs/exclude-filter.xml
----------------------------------------------------------------------
diff --git a/core/src/main/findbugs/exclude-filter.xml b/core/src/main/findbugs/exclude-filter.xml
index aa854f0..cd211a6 100644
--- a/core/src/main/findbugs/exclude-filter.xml
+++ b/core/src/main/findbugs/exclude-filter.xml
@@ -53,6 +53,7 @@
       <Class name="org.apache.accumulo.core.util.AddressUtil" />
       <Class name="org.apache.accumulo.core.zookeeper.ZooUtil" />
       <Class name="org.apache.accumulo.core.security.VisibilityConstraint" />
+      <Class name="org.apache.accumulo.core.client.mock.IteratorAdapter" />
     </Or>
     <Or>
       <Bug code="NM" pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java b/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
index 54e8b53..71ee6d1 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
@@ -34,7 +34,6 @@ import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Properties;
 import org.apache.accumulo.core.client.security.tokens.KerberosToken;
@@ -45,6 +44,7 @@ import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.core.trace.Trace;
+import org.apache.accumulo.core.util.DeprecationUtil;
 import org.apache.accumulo.core.volume.VolumeConfiguration;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.hadoop.conf.Configuration;
@@ -260,7 +260,7 @@ public class ClientOpts extends Help {
     if (cachedInstance != null)
       return cachedInstance;
     if (mock)
-      return cachedInstance = new MockInstance(instance);
+      return cachedInstance = DeprecationUtil.makeMockInstance(instance);
     return cachedInstance = new ZooKeeperInstance(this.getClientConfiguration());
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java b/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
index 10931f5..eb3c923 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
@@ -28,7 +28,6 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.impl.ScannerOptions;
-import org.apache.accumulo.core.client.mock.IteratorAdapter;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.data.ArrayByteSequence;
 import org.apache.accumulo.core.data.ByteSequence;
@@ -37,6 +36,7 @@ import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.data.thrift.IterInfo;
+import org.apache.accumulo.core.iterators.IteratorAdapter;
 import org.apache.accumulo.core.iterators.IteratorEnvironment;
 import org.apache.accumulo.core.iterators.IteratorUtil;
 import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
index 2a25dd5..d11639e 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
@@ -57,7 +57,6 @@ import org.apache.accumulo.core.client.mapreduce.InputTableConfig;
 import org.apache.accumulo.core.client.mapreduce.impl.SplitUtils;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.DelegationToken;
 import org.apache.accumulo.core.client.security.tokens.KerberosToken;
@@ -68,6 +67,7 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.util.DeprecationUtil;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapred.InputFormat;
@@ -229,7 +229,9 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
    * @param instanceName
    *          the Accumulo instance name
    * @since 1.5.0
+   * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework
    */
+  @Deprecated
   public static void setMockInstance(JobConf job, String instanceName) {
     InputConfigurator.setMockInstance(CLASS, job, instanceName);
   }
@@ -242,7 +244,6 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
    * @return an Accumulo instance
    * @since 1.5.0
    * @see #setZooKeeperInstance(JobConf, ClientConfiguration)
-   * @see #setMockInstance(JobConf, String)
    */
   protected static Instance getInstance(JobConf job) {
     return InputConfigurator.getInstance(CLASS, job);
@@ -531,7 +532,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
         try {
           if (isOffline) {
             scanner = new OfflineScanner(instance, new Credentials(principal, token), baseSplit.getTableId(), authorizations);
-          } else if (instance instanceof MockInstance) {
+          } else if (DeprecationUtil.isMockInstance(instance)) {
             scanner = instance.getConnector(principal, token).createScanner(baseSplit.getTableName(), authorizations);
           } else {
             ClientConfiguration clientConf = getClientConfiguration(job);
@@ -632,7 +633,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
       Instance instance = getInstance(job);
       String tableId;
       // resolve table name to id once, and use id from this point forward
-      if (instance instanceof MockInstance) {
+      if (DeprecationUtil.isMockInstance(instance)) {
         tableId = "";
       } else {
         try {
@@ -681,7 +682,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
           ClientContext context = new ClientContext(getInstance(job), new Credentials(getPrincipal(job), getAuthenticationToken(job)),
               getClientConfiguration(job));
           while (!tl.binRanges(context, ranges, binnedRanges).isEmpty()) {
-            if (!(instance instanceof MockInstance)) {
+            if (!DeprecationUtil.isMockInstance(instance)) {
               if (!Tables.exists(instance, tableId))
                 throw new TableDeletedException(tableId);
               if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
@@ -763,4 +764,5 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
 
     return splits.toArray(new InputSplit[splits.size()]);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java
index 856a11a..5f00ec3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java
@@ -42,7 +42,7 @@ import org.apache.log4j.Level;
  * <li>{@link AccumuloInputFormat#setConnectorInfo(JobConf, String, AuthenticationToken)}
  * <li>{@link AccumuloInputFormat#setConnectorInfo(JobConf, String, String)}
  * <li>{@link AccumuloInputFormat#setScanAuthorizations(JobConf, Authorizations)}
- * <li>{@link AccumuloInputFormat#setZooKeeperInstance(JobConf, ClientConfiguration)} OR {@link AccumuloInputFormat#setMockInstance(JobConf, String)}
+ * <li>{@link AccumuloInputFormat#setZooKeeperInstance(JobConf, ClientConfiguration)}
  * </ul>
  *
  * Other static methods are optional.

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloMultiTableInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloMultiTableInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloMultiTableInputFormat.java
index 00a79f2..3a2e3fa 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloMultiTableInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloMultiTableInputFormat.java
@@ -40,7 +40,7 @@ import org.apache.hadoop.mapred.Reporter;
  * <li>{@link AccumuloInputFormat#setConnectorInfo(JobConf, String, org.apache.accumulo.core.client.security.tokens.AuthenticationToken)}
  * <li>{@link AccumuloInputFormat#setConnectorInfo(JobConf, String, String)}
  * <li>{@link AccumuloInputFormat#setScanAuthorizations(JobConf, org.apache.accumulo.core.security.Authorizations)}
- * <li>{@link AccumuloInputFormat#setZooKeeperInstance(JobConf, ClientConfiguration)} OR {@link AccumuloInputFormat#setMockInstance(JobConf, String)}
+ * <li>{@link AccumuloInputFormat#setZooKeeperInstance(JobConf, ClientConfiguration)}
  * <li>{@link AccumuloMultiTableInputFormat#setInputTableConfigs(org.apache.hadoop.mapred.JobConf, java.util.Map)}
  * </ul>
  *

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
index c194cf6..c24557a 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
@@ -40,7 +40,6 @@ import org.apache.accumulo.core.client.impl.AuthenticationTokenIdentifier;
 import org.apache.accumulo.core.client.impl.DelegationTokenImpl;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.OutputConfigurator;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.SecurityErrorCode;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
@@ -71,7 +70,7 @@ import org.apache.log4j.Logger;
  * <ul>
  * <li>{@link AccumuloOutputFormat#setConnectorInfo(JobConf, String, AuthenticationToken)}
  * <li>{@link AccumuloOutputFormat#setConnectorInfo(JobConf, String, String)}
- * <li>{@link AccumuloOutputFormat#setZooKeeperInstance(JobConf, ClientConfiguration)} OR {@link AccumuloOutputFormat#setMockInstance(JobConf, String)}
+ * <li>{@link AccumuloOutputFormat#setZooKeeperInstance(JobConf, ClientConfiguration)}
  * </ul>
  *
  * Other static methods are optional.
@@ -239,14 +238,16 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation> {
   }
 
   /**
-   * Configures a {@link MockInstance} for this job.
+   * Configures a {@link org.apache.accumulo.core.client.mock.MockInstance} for this job.
    *
    * @param job
    *          the Hadoop job instance to be configured
    * @param instanceName
    *          the Accumulo instance name
    * @since 1.5.0
+   * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework
    */
+  @Deprecated
   public static void setMockInstance(JobConf job, String instanceName) {
     OutputConfigurator.setMockInstance(CLASS, job, instanceName);
   }
@@ -259,7 +260,6 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation> {
    * @return an Accumulo instance
    * @since 1.5.0
    * @see #setZooKeeperInstance(JobConf, ClientConfiguration)
-   * @see #setMockInstance(JobConf, String)
    */
   protected static Instance getInstance(JobConf job) {
     return OutputConfigurator.getInstance(CLASS, job);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java
index 6f257ff..067fde8 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java
@@ -43,7 +43,7 @@ import org.apache.hadoop.mapred.Reporter;
  * <li>{@link AccumuloRowInputFormat#setConnectorInfo(JobConf, String, AuthenticationToken)}
  * <li>{@link AccumuloRowInputFormat#setInputTableName(JobConf, String)}
  * <li>{@link AccumuloRowInputFormat#setScanAuthorizations(JobConf, Authorizations)}
- * <li>{@link AccumuloRowInputFormat#setZooKeeperInstance(JobConf, ClientConfiguration)} OR {@link AccumuloRowInputFormat#setMockInstance(JobConf, String)}
+ * <li>{@link AccumuloRowInputFormat#setZooKeeperInstance(JobConf, ClientConfiguration)}
  * </ul>
  *
  * Other static methods are optional.

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
index 76f3f20..7db67c7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
@@ -56,7 +56,6 @@ import org.apache.accumulo.core.client.mapreduce.impl.BatchInputSplit;
 import org.apache.accumulo.core.client.mapreduce.impl.SplitUtils;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.DelegationToken;
 import org.apache.accumulo.core.client.security.tokens.KerberosToken;
@@ -67,6 +66,7 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.util.DeprecationUtil;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Text;
@@ -255,7 +255,9 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
    * @param instanceName
    *          the Accumulo instance name
    * @since 1.5.0
+   * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework
    */
+  @Deprecated
   public static void setMockInstance(Job job, String instanceName) {
     InputConfigurator.setMockInstance(CLASS, job.getConfiguration(), instanceName);
   }
@@ -268,7 +270,6 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
    * @return an Accumulo instance
    * @since 1.5.0
    * @see #setZooKeeperInstance(Job, ClientConfiguration)
-   * @see #setMockInstance(Job, String)
    */
   protected static Instance getInstance(JobContext context) {
     return InputConfigurator.getInstance(CLASS, context.getConfiguration());
@@ -561,7 +562,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
         try {
           if (isOffline) {
             scanner = new OfflineScanner(instance, new Credentials(principal, token), split.getTableId(), authorizations);
-          } else if (instance instanceof MockInstance) {
+          } else if (DeprecationUtil.isMockInstance(instance)) {
             scanner = instance.getConnector(principal, token).createScanner(split.getTableName(), authorizations);
           } else {
             ClientConfiguration clientConf = getClientConfiguration(attempt);
@@ -679,7 +680,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
       Instance instance = getInstance(context);
       String tableId;
       // resolve table name to id once, and use id from this point forward
-      if (instance instanceof MockInstance) {
+      if (DeprecationUtil.isMockInstance(instance)) {
         tableId = "";
       } else {
         try {
@@ -729,7 +730,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
           ClientContext clientContext = new ClientContext(getInstance(context), new Credentials(getPrincipal(context), getAuthenticationToken(context)),
               getClientConfiguration(context));
           while (!tl.binRanges(clientContext, ranges, binnedRanges).isEmpty()) {
-            if (!(instance instanceof MockInstance)) {
+            if (!DeprecationUtil.isMockInstance(instance)) {
               if (!Tables.exists(instance, tableId))
                 throw new TableDeletedException(tableId);
               if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
@@ -811,4 +812,5 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
     }
     return splits;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
index 33eccc1..837b3fe 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
@@ -41,7 +41,7 @@ import org.apache.log4j.Level;
  * <ul>
  * <li>{@link AccumuloInputFormat#setConnectorInfo(Job, String, AuthenticationToken)}
  * <li>{@link AccumuloInputFormat#setScanAuthorizations(Job, Authorizations)}
- * <li>{@link AccumuloInputFormat#setZooKeeperInstance(Job, ClientConfiguration)} OR {@link AccumuloInputFormat#setMockInstance(Job, String)}
+ * <li>{@link AccumuloInputFormat#setZooKeeperInstance(Job, ClientConfiguration)}
  * </ul>
  *
  * Other static methods are optional.

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java
index 679256b..c7ea1f7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java
@@ -44,7 +44,7 @@ import org.apache.hadoop.mapreduce.TaskAttemptContext;
  * <ul>
  * <li>{@link AccumuloMultiTableInputFormat#setConnectorInfo(Job, String, AuthenticationToken)}
  * <li>{@link AccumuloMultiTableInputFormat#setScanAuthorizations(Job, Authorizations)}
- * <li>{@link AccumuloMultiTableInputFormat#setZooKeeperInstance(Job, ClientConfiguration)} OR {@link AccumuloInputFormat#setMockInstance(Job, String)}
+ * <li>{@link AccumuloMultiTableInputFormat#setZooKeeperInstance(Job, ClientConfiguration)}
  * <li>{@link AccumuloMultiTableInputFormat#setInputTableConfigs(Job, Map)}
  * </ul>
  *

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
index 4cb46a3..42bd243 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
@@ -40,7 +40,6 @@ import org.apache.accumulo.core.client.impl.AuthenticationTokenIdentifier;
 import org.apache.accumulo.core.client.impl.DelegationTokenImpl;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.OutputConfigurator;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.SecurityErrorCode;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
@@ -72,7 +71,7 @@ import org.apache.log4j.Logger;
  * <ul>
  * <li>{@link AccumuloOutputFormat#setConnectorInfo(Job, String, AuthenticationToken)}
  * <li>{@link AccumuloOutputFormat#setConnectorInfo(Job, String, String)}
- * <li>{@link AccumuloOutputFormat#setZooKeeperInstance(Job, ClientConfiguration)} OR {@link AccumuloOutputFormat#setMockInstance(Job, String)}
+ * <li>{@link AccumuloOutputFormat#setZooKeeperInstance(Job, ClientConfiguration)}
  * </ul>
  *
  * Other static methods are optional.
@@ -239,7 +238,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation> {
   }
 
   /**
-   * Configures a {@link MockInstance} for this job.
+   * Configures a {@link org.apache.accumulo.core.client.mock.MockInstance} for this job.
    *
    * @param job
    *          the Hadoop job instance to be configured
@@ -247,6 +246,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation> {
    *          the Accumulo instance name
    * @since 1.5.0
    */
+  @Deprecated
   public static void setMockInstance(Job job, String instanceName) {
     OutputConfigurator.setMockInstance(CLASS, job.getConfiguration(), instanceName);
   }
@@ -259,7 +259,6 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation> {
    * @return an Accumulo instance
    * @since 1.5.0
    * @see #setZooKeeperInstance(Job, ClientConfiguration)
-   * @see #setMockInstance(Job, String)
    */
   protected static Instance getInstance(JobContext context) {
     return OutputConfigurator.getInstance(CLASS, context.getConfiguration());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java
index 77081bf..7dcb35b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java
@@ -43,7 +43,7 @@ import org.apache.hadoop.mapreduce.TaskAttemptContext;
  * <li>{@link AccumuloRowInputFormat#setConnectorInfo(Job, String, AuthenticationToken)}
  * <li>{@link AccumuloRowInputFormat#setInputTableName(Job, String)}
  * <li>{@link AccumuloRowInputFormat#setScanAuthorizations(Job, Authorizations)}
- * <li>{@link AccumuloRowInputFormat#setZooKeeperInstance(Job, ClientConfiguration)} OR {@link AccumuloRowInputFormat#setMockInstance(Job, String)}
+ * <li>{@link AccumuloRowInputFormat#setZooKeeperInstance(Job, ClientConfiguration)}
  * </ul>
  *
  * Other static methods are optional.

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
index e337977..f3e17c6 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.core.client.mapreduce;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -33,7 +35,6 @@ import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.mapreduce.impl.SplitUtils;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase.TokenSource;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
 import org.apache.accumulo.core.data.ByteSequence;
@@ -42,14 +43,13 @@ import org.apache.accumulo.core.data.PartialKey;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.Base64;
+import org.apache.accumulo.core.util.DeprecationUtil;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.mapreduce.InputSplit;
 import org.apache.log4j.Level;
 
-import static java.nio.charset.StandardCharsets.UTF_8;
-
 /**
  * The Class RangeInputSplit. Encapsulates an Accumulo range for use in Map Reduce jobs.
  */
@@ -354,7 +354,7 @@ public class RangeInputSplit extends InputSplit implements Writable {
     }
 
     if (isMockInstance()) {
-      return new MockInstance(getInstanceName());
+      return DeprecationUtil.makeMockInstance(getInstanceName());
     }
 
     if (null == zooKeepers) {
@@ -414,10 +414,18 @@ public class RangeInputSplit extends InputSplit implements Writable {
     this.locations = Arrays.copyOf(locations, locations.length);
   }
 
+  /**
+   * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework
+   */
+  @Deprecated
   public Boolean isMockInstance() {
     return mockInstance;
   }
 
+  /**
+   * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework
+   */
+  @Deprecated
   public void setMockInstance(Boolean mockInstance) {
     this.mockInstance = mockInstance;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/SplitUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/SplitUtils.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/SplitUtils.java
index d19b499..68268fc 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/SplitUtils.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/SplitUtils.java
@@ -23,11 +23,11 @@ import java.math.BigInteger;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.mapreduce.InputTableConfig;
 import org.apache.accumulo.core.client.mapreduce.RangeInputSplit;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.data.ByteSequence;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.util.DeprecationUtil;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Level;
 
@@ -41,7 +41,7 @@ public class SplitUtils {
       Authorizations auths, Level logLevel) {
     split.setInstanceName(instance.getInstanceName());
     split.setZooKeepers(instance.getZooKeepers());
-    split.setMockInstance(instance instanceof MockInstance);
+    DeprecationUtil.setMockInstance(split, DeprecationUtil.isMockInstance(instance));
 
     split.setPrincipal(principal);
     split.setToken(token);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
index 5364e4a..f2a0c06 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
@@ -35,10 +35,10 @@ import org.apache.accumulo.core.client.impl.AuthenticationTokenIdentifier;
 import org.apache.accumulo.core.client.impl.Credentials;
 import org.apache.accumulo.core.client.impl.DelegationTokenImpl;
 import org.apache.accumulo.core.client.mapreduce.impl.DelegationTokenStub;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
 import org.apache.accumulo.core.util.Base64;
+import org.apache.accumulo.core.util.DeprecationUtil;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileSystem;
@@ -81,7 +81,7 @@ public class ConfiguratorBase {
   }
 
   /**
-   * Configuration keys for {@link Instance}, {@link ZooKeeperInstance}, and {@link MockInstance}.
+   * Configuration keys for available {@link Instance} types.
    *
    * @since 1.6.0
    */
@@ -321,7 +321,7 @@ public class ConfiguratorBase {
   }
 
   /**
-   * Configures a {@link MockInstance} for this job.
+   * Configures a {@link org.apache.accumulo.core.client.mock.MockInstance} for this job.
    *
    * @param implementingClass
    *          the class whose name will be used as a prefix for the property configuration key
@@ -330,7 +330,9 @@ public class ConfiguratorBase {
    * @param instanceName
    *          the Accumulo instance name
    * @since 1.6.0
+   * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework
    */
+  @Deprecated
   public static void setMockInstance(Class<?> implementingClass, Configuration conf, String instanceName) {
     String key = enumToConfKey(implementingClass, InstanceOpts.TYPE);
     if (!conf.get(key, "").isEmpty())
@@ -351,12 +353,11 @@ public class ConfiguratorBase {
    * @return an Accumulo instance
    * @since 1.6.0
    * @see #setZooKeeperInstance(Class, Configuration, ClientConfiguration)
-   * @see #setMockInstance(Class, Configuration, String)
    */
   public static Instance getInstance(Class<?> implementingClass, Configuration conf) {
     String instanceType = conf.get(enumToConfKey(implementingClass, InstanceOpts.TYPE), "");
     if ("MockInstance".equals(instanceType))
-      return new MockInstance(conf.get(enumToConfKey(implementingClass, InstanceOpts.NAME)));
+      return DeprecationUtil.makeMockInstance(conf.get(enumToConfKey(implementingClass, InstanceOpts.NAME)));
     else if ("ZooKeeperInstance".equals(instanceType)) {
       return new ZooKeeperInstance(getClientConfiguration(implementingClass, conf));
     } else if (instanceType.isEmpty())

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
index 0e640b4..efda7d9 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
@@ -52,7 +52,6 @@ import org.apache.accumulo.core.client.impl.DelegationTokenImpl;
 import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.client.impl.TabletLocator;
 import org.apache.accumulo.core.client.mapreduce.InputTableConfig;
-import org.apache.accumulo.core.client.mock.impl.MockTabletLocator;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.PartialKey;
@@ -66,6 +65,7 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.Base64;
+import org.apache.accumulo.core.util.DeprecationUtil;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.TextUtil;
 import org.apache.hadoop.conf.Configuration;
@@ -645,7 +645,7 @@ public class InputConfigurator extends ConfiguratorBase {
   public static TabletLocator getTabletLocator(Class<?> implementingClass, Configuration conf, String tableId) throws TableNotFoundException {
     String instanceType = conf.get(enumToConfKey(implementingClass, InstanceOpts.TYPE));
     if ("MockInstance".equals(instanceType))
-      return new MockTabletLocator();
+      return DeprecationUtil.makeMockLocator();
     Instance instance = getInstance(implementingClass, conf);
     ClientConfiguration clientConf = getClientConfiguration(implementingClass, conf);
     ClientContext context = new ClientContext(instance,

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBase.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBase.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBase.java
index 20fbbea..6914071 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBase.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBase.java
@@ -20,7 +20,6 @@ import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.ClientConfiguration;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.ZooKeeperInstance;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
 import org.apache.hadoop.conf.Configuration;
@@ -46,7 +45,7 @@ public class ConfiguratorBase {
   }
 
   /**
-   * Configuration keys for {@link Instance}, {@link ZooKeeperInstance}, and {@link MockInstance}.
+   * Configuration keys for {@link Instance}, {@link ZooKeeperInstance}, and {@link org.apache.accumulo.core.client.mock.MockInstance}.
    *
    * @deprecated since 1.6.0; Configure your job with the appropriate InputFormat or OutputFormat.
    * @since 1.5.0
@@ -206,7 +205,7 @@ public class ConfiguratorBase {
   }
 
   /**
-   * Configures a {@link MockInstance} for this job.
+   * Configures a {@link org.apache.accumulo.core.client.mock.MockInstance} for this job.
    *
    * @param implementingClass
    *          the class whose name will be used as a prefix for the property configuration key
@@ -233,7 +232,6 @@ public class ConfiguratorBase {
    * @deprecated since 1.6.0; Configure your job with the appropriate InputFormat or OutputFormat.
    * @since 1.5.0
    * @see #setZooKeeperInstance(Class, Configuration, String, String)
-   * @see #setMockInstance(Class, Configuration, String)
    */
   @Deprecated
   public static Instance getInstance(Class<?> implementingClass, Configuration conf) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/IteratorAdapter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/IteratorAdapter.java b/core/src/main/java/org/apache/accumulo/core/client/mock/IteratorAdapter.java
index d4d4004..d88dac9 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/IteratorAdapter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/IteratorAdapter.java
@@ -16,42 +16,18 @@
  */
 package org.apache.accumulo.core.client.mock;
 
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map.Entry;
-import java.util.NoSuchElementException;
-
 import org.apache.accumulo.core.data.Key;
-import org.apache.accumulo.core.data.KeyValue;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 
-public class IteratorAdapter implements Iterator<Entry<Key,Value>> {
-
-  SortedKeyValueIterator<Key,Value> inner;
+/**
+ * @deprecated since 1.8.0; use {@link org.apache.accumulo.core.iterators.IteratorAdapter} instead.
+ */
+@Deprecated
+public class IteratorAdapter extends org.apache.accumulo.core.iterators.IteratorAdapter {
 
   public IteratorAdapter(SortedKeyValueIterator<Key,Value> inner) {
-    this.inner = inner;
-  }
-
-  @Override
-  public boolean hasNext() {
-    return inner.hasTop();
-  }
-
-  @Override
-  public Entry<Key,Value> next() {
-    try {
-      Entry<Key,Value> result = new KeyValue(new Key(inner.getTopKey()), new Value(inner.getTopValue()).get());
-      inner.next();
-      return result;
-    } catch (IOException ex) {
-      throw new NoSuchElementException();
-    }
+    super(inner);
   }
 
-  @Override
-  public void remove() {
-    throw new UnsupportedOperationException();
-  }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
index e1ca768..18dac55 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
@@ -40,6 +40,10 @@ import org.apache.accumulo.core.security.TablePermission;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.io.Text;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockAccumulo {
   final Map<String,MockTable> tables = new HashMap<String,MockTable>();
   final Map<String,MockNamespace> namespaces = new HashMap<String,MockNamespace>();
@@ -48,11 +52,8 @@ public class MockAccumulo {
   final FileSystem fs;
   final AtomicInteger tableIdCounter = new AtomicInteger(0);
 
+  @Deprecated
   MockAccumulo(FileSystem fs) {
-    this.fs = fs;
-  }
-
-  {
     MockUser root = new MockUser("root", new PasswordToken(new byte[0]), Authorizations.EMPTY);
     root.permissions.add(SystemPermission.SYSTEM);
     users.put(root.name, root);
@@ -61,6 +62,7 @@ public class MockAccumulo {
     createTable("root", RootTable.NAME, true, TimeType.LOGICAL);
     createTable("root", MetadataTable.NAME, true, TimeType.LOGICAL);
     createTable("root", ReplicationTable.NAME, true, TimeType.LOGICAL);
+    this.fs = fs;
   }
 
   public FileSystem getFileSystem() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchDeleter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchDeleter.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchDeleter.java
index bb9f2c8..bacd844 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchDeleter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchDeleter.java
@@ -37,7 +37,10 @@ import org.apache.accumulo.core.security.ColumnVisibility;
  * </ol>
  *
  * Otherwise, it behaves as expected.
+ *
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
  */
+@Deprecated
 public class MockBatchDeleter extends MockBatchScanner implements BatchDeleter {
 
   private final MockAccumulo acc;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
index 4034271..0622f33 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
@@ -32,6 +32,10 @@ import org.apache.accumulo.core.iterators.SortedMapIterator;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.commons.collections.iterators.IteratorChain;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockBatchScanner extends MockScannerBase implements BatchScanner {
 
   List<Range> ranges = null;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchWriter.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchWriter.java
index 163587f..53a0ddc 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchWriter.java
@@ -22,6 +22,10 @@ import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.data.Mutation;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockBatchWriter implements BatchWriter {
 
   final String tablename;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockConfiguration.java
index 410105b..244d6f8 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockConfiguration.java
@@ -24,6 +24,10 @@ import org.apache.accumulo.core.conf.Property;
 
 import com.google.common.base.Predicate;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 class MockConfiguration extends AccumuloConfiguration {
   Map<String,String> map;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
index d348400..9b5601b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
@@ -40,6 +40,10 @@ import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.client.security.tokens.NullToken;
 import org.apache.accumulo.core.security.Authorizations;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockConnector extends Connector {
 
   String username;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
index 57cd5ee..a37706a 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
@@ -49,8 +49,9 @@ import org.apache.hadoop.io.Text;
  * An alternative to Mock Accumulo called MiniAccumuloCluster was introduced in Accumulo 1.5. MiniAccumuloCluster spins up actual Accumulo server processes, can
  * be used for unit testing, and its behavior should match Accumulo. The drawback of MiniAccumuloCluster is that it starts more slowly than Mock Accumulo.
  *
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
  */
-
+@Deprecated
 public class MockInstance implements Instance {
 
   static final String genericAddress = "localhost:1234";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstanceOperations.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstanceOperations.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstanceOperations.java
index c1acc04..b7e8e68 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstanceOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstanceOperations.java
@@ -29,6 +29,10 @@ import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 class MockInstanceOperations implements InstanceOperations {
   private static final Logger log = LoggerFactory.getLogger(MockInstanceOperations.class);
   MockAccumulo acu;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockMultiTableBatchWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockMultiTableBatchWriter.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockMultiTableBatchWriter.java
index 9cc3dfb..cfacccb 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockMultiTableBatchWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockMultiTableBatchWriter.java
@@ -26,6 +26,10 @@ import org.apache.accumulo.core.client.MultiTableBatchWriter;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.TableNotFoundException;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockMultiTableBatchWriter implements MultiTableBatchWriter {
   MockAccumulo acu = null;
   Map<String,MockBatchWriter> bws = null;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespace.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespace.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespace.java
index 955564f..da118c3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespace.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespace.java
@@ -27,6 +27,10 @@ import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.security.NamespacePermission;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockNamespace {
 
   final HashMap<String,String> settings;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespaceOperations.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespaceOperations.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespaceOperations.java
index 004124d..0c657a9 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespaceOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockNamespaceOperations.java
@@ -34,6 +34,10 @@ import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 class MockNamespaceOperations extends NamespaceOperationsHelper {
 
   private static final Logger log = LoggerFactory.getLogger(MockNamespaceOperations.class);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
index a9b6fd5..1e36964 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
@@ -30,6 +30,10 @@ import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.SortedMapIterator;
 import org.apache.accumulo.core.security.Authorizations;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockScanner extends MockScannerBase implements Scanner {
 
   int batchSize = 0;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java
index 3c746e1..f81e9dd 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java
@@ -43,6 +43,10 @@ import org.apache.accumulo.core.iterators.system.VisibilityFilter;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.commons.lang.NotImplementedException;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockScannerBase extends ScannerOptions implements ScannerBase {
 
   protected final MockTable table;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java
index cc51a47..bf4b46e 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java
@@ -32,6 +32,10 @@ import org.apache.accumulo.core.security.NamespacePermission;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 class MockSecurityOperations implements SecurityOperations {
 
   final private MockAccumulo acu;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
index 6f66c60..fa0fbcd 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
@@ -40,6 +40,10 @@ import org.apache.accumulo.core.iterators.IteratorUtil;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.hadoop.io.Text;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockTable {
 
   static class MockMemKey extends Key {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
index e998722..0712f22 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
@@ -66,6 +66,10 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Preconditions;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 class MockTableOperations extends TableOperationsHelper {
   private static final Logger log = LoggerFactory.getLogger(MockTableOperations.class);
   private static final byte[] ZERO = {0};

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/MockUser.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockUser.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockUser.java
index efc896e..e32edad 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockUser.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockUser.java
@@ -22,6 +22,10 @@ import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.SystemPermission;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockUser {
   final EnumSet<SystemPermission> permissions;
   final String name;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/impl/MockTabletLocator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/impl/MockTabletLocator.java b/core/src/main/java/org/apache/accumulo/core/client/mock/impl/MockTabletLocator.java
index 1c0c6a9..9936709 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/impl/MockTabletLocator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/impl/MockTabletLocator.java
@@ -32,6 +32,10 @@ import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.hadoop.io.Text;
 
+/**
+ * @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
 public class MockTabletLocator extends TabletLocator {
   public MockTabletLocator() {}
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/client/mock/package-info.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/package-info.java b/core/src/main/java/org/apache/accumulo/core/client/mock/package-info.java
new file mode 100644
index 0000000..cdd5593
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Mock framework for Accumulo
+ *
+ * <p>
+ * Deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework instead.
+ */
+@Deprecated
+package org.apache.accumulo.core.client.mock;
+

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorAdapter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorAdapter.java b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorAdapter.java
new file mode 100644
index 0000000..2d8af8f
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorAdapter.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.core.iterators;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map.Entry;
+import java.util.NoSuchElementException;
+
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.KeyValue;
+import org.apache.accumulo.core.data.Value;
+
+public class IteratorAdapter implements Iterator<Entry<Key,Value>> {
+
+  SortedKeyValueIterator<Key,Value> inner;
+
+  public IteratorAdapter(SortedKeyValueIterator<Key,Value> inner) {
+    this.inner = inner;
+  }
+
+  @Override
+  public boolean hasNext() {
+    return inner.hasTop();
+  }
+
+  @Override
+  public Entry<Key,Value> next() {
+    try {
+      Entry<Key,Value> result = new KeyValue(new Key(inner.getTopKey()), new Value(inner.getTopValue()).get());
+      inner.next();
+      return result;
+    } catch (IOException ex) {
+      throw new NoSuchElementException();
+    }
+  }
+
+  @Override
+  public void remove() {
+    throw new UnsupportedOperationException();
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
index 4b61b53..7076757 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
@@ -31,11 +31,11 @@ import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.TableOfflineException;
 import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.client.impl.Tables;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.replication.ReplicationSchema.StatusSection;
 import org.apache.accumulo.core.replication.ReplicationSchema.WorkSection;
 import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.util.DeprecationUtil;
 import org.apache.hadoop.io.Text;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -87,7 +87,7 @@ public class ReplicationTable {
   }
 
   public static boolean isOnline(Connector conn) {
-    return conn.getInstance() instanceof MockInstance || TableState.ONLINE == Tables.getTableState(conn.getInstance(), ID);
+    return DeprecationUtil.isMockInstance(conn.getInstance()) || TableState.ONLINE == Tables.getTableState(conn.getInstance(), ID);
   }
 
   public static void setOnline(Connector conn) throws AccumuloSecurityException, AccumuloException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/main/java/org/apache/accumulo/core/util/DeprecationUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/DeprecationUtil.java b/core/src/main/java/org/apache/accumulo/core/util/DeprecationUtil.java
new file mode 100644
index 0000000..cd798bb
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/util/DeprecationUtil.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.core.util;
+
+import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.client.impl.TabletLocator;
+import org.apache.accumulo.core.client.mapreduce.RangeInputSplit;
+
+/**
+ * A utility class for managing deprecated items. This avoids scattering private helper methods all over the code with warnings suppression.
+ *
+ * <p>
+ * This class will never be public API and methods will be removed as soon as they are no longer needed. No methods in this class will, themselves, be
+ * deprecated, because that would propagate the deprecation warning we are trying to avoid.
+ *
+ * <p>
+ * This class should not be used as a substitute for deprecated classes. It should <b>only</b> be used for implementation code which must remain to support the
+ * deprecated features, and <b>only</b> until that feature is removed.
+ */
+public class DeprecationUtil {
+
+  @SuppressWarnings("deprecation")
+  public static boolean isMockInstance(Instance instance) {
+    return instance instanceof org.apache.accumulo.core.client.mock.MockInstance;
+  }
+
+  @SuppressWarnings("deprecation")
+  public static Instance makeMockInstance(String instance) {
+    return new org.apache.accumulo.core.client.mock.MockInstance(instance);
+  }
+
+  @SuppressWarnings("deprecation")
+  public static void setMockInstance(RangeInputSplit split, boolean isMockInstance) {
+    split.setMockInstance(isMockInstance);
+  }
+
+  @SuppressWarnings("deprecation")
+  public static boolean isMockInstanceSet(RangeInputSplit split) {
+    return split.isMockInstance();
+  }
+
+  @SuppressWarnings("deprecation")
+  public static TabletLocator makeMockLocator() {
+    return new org.apache.accumulo.core.client.mock.impl.MockTabletLocator();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java
index 60f668b..e0ce90e 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map.Entry;
 
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -34,7 +33,10 @@ import org.apache.accumulo.core.iterators.user.IntersectingIterator;
 import org.apache.accumulo.core.iterators.user.VersioningIterator;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.hadoop.io.Text;
+import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TestName;
 
 public class ClientSideIteratorTest {
   List<Key> resultSet1;
@@ -54,7 +56,7 @@ public class ClientSideIteratorTest {
     resultSet3.add(new Key("part2", "", "DOC2"));
   }
 
-  public void checkResults(final Iterable<Entry<Key,Value>> scanner, final List<Key> results, final PartialKey pk) {
+  private void checkResults(final Iterable<Entry<Key,Value>> scanner, final List<Key> results, final PartialKey pk) {
     int i = 0;
     for (Entry<Key,Value> entry : scanner) {
       assertTrue(entry.getKey().equals(results.get(i++), pk));
@@ -62,10 +64,19 @@ public class ClientSideIteratorTest {
     assertEquals(i, results.size());
   }
 
+  @Rule
+  public TestName test = new TestName();
+
+  private Connector conn;
+
+  @Before
+  public void setupInstance() throws Exception {
+    Instance inst = new org.apache.accumulo.core.client.mock.MockInstance(test.getMethodName());
+    conn = inst.getConnector("root", new PasswordToken(""));
+  }
+
   @Test
   public void testIntersect() throws Exception {
-    Instance instance = new MockInstance("local");
-    Connector conn = instance.getConnector("root", new PasswordToken(""));
     conn.tableOperations().create("intersect");
     BatchWriter bw = conn.createBatchWriter("intersect", new BatchWriterConfig());
     Mutation m = new Mutation("part1");
@@ -94,8 +105,6 @@ public class ClientSideIteratorTest {
 
   @Test
   public void testVersioning() throws Exception {
-    final Instance instance = new MockInstance("local");
-    final Connector conn = instance.getConnector("root", new PasswordToken(""));
     conn.tableOperations().create("table");
     conn.tableOperations().removeProperty("table", "table.iterator.scan.vers");
     conn.tableOperations().removeProperty("table", "table.iterator.majc.vers");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/test/java/org/apache/accumulo/core/client/admin/FindMaxTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/admin/FindMaxTest.java b/core/src/test/java/org/apache/accumulo/core/client/admin/FindMaxTest.java
index 2dc6ba5..78f7e75 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/admin/FindMaxTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/admin/FindMaxTest.java
@@ -16,24 +16,28 @@
  */
 package org.apache.accumulo.core.client.admin;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
 import java.util.ArrayList;
 import java.util.Map.Entry;
 
-import junit.framework.TestCase;
-
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.Scanner;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.hadoop.io.Text;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestName;
 
-public class FindMaxTest extends TestCase {
+public class FindMaxTest {
 
   private static Mutation nm(byte[] row) {
     Mutation m = new Mutation(new Text(row));
@@ -47,8 +51,12 @@ public class FindMaxTest extends TestCase {
     return m;
   }
 
+  @Rule
+  public TestName test = new TestName();
+
+  @Test
   public void test1() throws Exception {
-    MockInstance mi = new MockInstance();
+    Instance mi = new org.apache.accumulo.core.client.mock.MockInstance(test.getMethodName());
 
     Connector conn = mi.getConnector("root", new PasswordToken(""));
     conn.tableOperations().create("foo");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/test/java/org/apache/accumulo/core/client/impl/ScannerImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/impl/ScannerImplTest.java b/core/src/test/java/org/apache/accumulo/core/client/impl/ScannerImplTest.java
index 95b0903..eedc61d 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/impl/ScannerImplTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/impl/ScannerImplTest.java
@@ -18,11 +18,9 @@ package org.apache.accumulo.core.client.impl;
 
 import static org.junit.Assert.assertEquals;
 
-import org.apache.accumulo.core.client.ClientConfiguration;
 import org.apache.accumulo.core.client.Scanner;
-import org.apache.accumulo.core.client.mock.MockInstance;
-import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.security.Authorizations;
+import org.easymock.EasyMock;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -32,13 +30,11 @@ import org.junit.Test;
  */
 public class ScannerImplTest {
 
-  MockInstance instance;
-  ClientContext context;
+  private ClientContext context;
 
   @Before
   public void setup() {
-    instance = new MockInstance();
-    context = new ClientContext(instance, new Credentials("root", new PasswordToken("")), new ClientConfiguration());
+    context = EasyMock.createMock(ClientContext.class);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/test/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderTest.java b/core/src/test/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderTest.java
index 23c223e..b31050a 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderTest.java
@@ -16,25 +16,21 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static org.junit.Assert.assertEquals;
+
 import org.apache.accumulo.core.client.BatchScanner;
-import org.apache.accumulo.core.client.ClientConfiguration;
-import org.apache.accumulo.core.client.mock.MockInstance;
-import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.security.Authorizations;
+import org.easymock.EasyMock;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-
 public class TabletServerBatchReaderTest {
 
-  MockInstance instance;
-  ClientContext context;
+  private ClientContext context;
 
   @Before
   public void setup() {
-    instance = new MockInstance();
-    context = new ClientContext(instance, new Credentials("root", new PasswordToken("")), new ClientConfiguration());
+    context = EasyMock.createMock(ClientContext.class);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2556df3a/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormatTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormatTest.java b/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormatTest.java
index c4a4a29..9bb85f4 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormatTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormatTest.java
@@ -29,9 +29,9 @@ import java.io.IOException;
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.FileOutputConfigurator;
-import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
@@ -73,7 +73,7 @@ public class AccumuloFileOutputFormatTest {
 
   @BeforeClass
   public static void setup() throws Exception {
-    MockInstance mockInstance = new MockInstance(INSTANCE_NAME);
+    Instance mockInstance = new org.apache.accumulo.core.client.mock.MockInstance(INSTANCE_NAME);
     Connector c = mockInstance.getConnector("root", new PasswordToken(""));
     c.tableOperations().create(EMPTY_TABLE);
     c.tableOperations().create(TEST_TABLE);


Mime
View raw message