accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [16/16] accumulo git commit: Merge branch '1.7'
Date Wed, 03 Feb 2016 17:54:09 GMT
Merge branch '1.7'

Conflicts:
	core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
	examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStreamTest.java
	server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
	server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
	shell/src/main/java/org/apache/accumulo/shell/Shell.java
	test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
	test/src/test/java/org/apache/accumulo/test/AccumuloOutputFormatIT.java


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

Branch: refs/heads/master
Commit: dc087b12f2d0696aa0d3fad563de5ebd3ba6db84
Parents: 2c8088e b639709
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Wed Feb 3 12:29:05 2016 -0500
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Wed Feb 3 12:29:05 2016 -0500

----------------------------------------------------------------------
 .../core/client/ClientSideIteratorScanner.java  |  6 ++--
 .../core/client/ConditionalWriterConfig.java    |  5 ++-
 .../core/client/admin/CompactionConfig.java     |  6 ++--
 .../client/admin/CompactionStrategyConfig.java  |  8 ++---
 .../client/admin/DelegationTokenConfig.java     |  6 ++--
 .../client/admin/NewTableConfiguration.java     |  5 ++-
 .../core/client/admin/SamplerConfiguration.java |  7 ++--
 .../impl/AuthenticationTokenIdentifier.java     | 26 +++++++--------
 .../core/client/impl/ClientContext.java         | 10 +++---
 .../core/client/impl/DelegationTokenImpl.java   | 18 +++++-----
 .../core/client/impl/ReplicationClient.java     |  8 ++---
 .../client/impl/ReplicationOperationsImpl.java  | 16 ++++-----
 .../core/client/impl/ScannerOptions.java        |  7 ++--
 .../core/client/impl/TableOperationsImpl.java   |  6 ++--
 .../core/client/impl/ThriftTransportKey.java    |  6 ++--
 .../core/client/lexicoder/AbstractEncoder.java  | 15 +++++----
 .../AccumuloMultiTableInputFormat.java          |  4 +--
 .../mapreduce/impl/DelegationTokenStub.java     |  4 +--
 .../mapreduce/lib/impl/ConfiguratorBase.java    | 10 +++---
 .../mapreduce/lib/impl/InputConfigurator.java   |  4 +--
 .../core/client/mock/MockTableOperations.java   |  8 ++---
 .../tokens/CredentialProviderToken.java         |  8 ++---
 .../client/security/tokens/KerberosToken.java   | 17 +++++-----
 .../accumulo/core/compaction/NullType.java      |  4 +--
 .../accumulo/core/compaction/SizeType.java      |  6 ++--
 .../accumulo/core/compaction/UIntType.java      |  4 +--
 .../conf/CredentialProviderFactoryShim.java     | 28 ++++++++--------
 .../core/conf/ObservableConfiguration.java      |  6 ++--
 .../apache/accumulo/core/conf/PropertyType.java | 11 +++---
 .../core/constraints/VisibilityConstraint.java  |  4 +--
 .../org/apache/accumulo/core/data/Mutation.java |  6 ++--
 .../org/apache/accumulo/core/data/Value.java    | 11 +++---
 .../apache/accumulo/core/file/rfile/RFile.java  |  5 +--
 .../accumulo/core/iterators/IteratorUtil.java   |  6 ++--
 .../core/iterators/user/RegExFilter.java        | 35 ++++++--------------
 .../core/metadata/schema/MetadataSchema.java    | 15 +++++----
 .../core/replication/ReplicationSchema.java     | 30 ++++++++---------
 .../accumulo/core/rpc/FilterTransport.java      |  6 ++--
 .../rpc/ProtocolOverridingSSLSocketFactory.java |  9 ++---
 .../rpc/SaslClientDigestCallbackHandler.java    |  8 ++---
 .../accumulo/core/rpc/SaslConnectionParams.java |  6 ++--
 .../core/rpc/UGIAssumingTransportFactory.java   |  8 ++---
 .../core/sample/AbstractHashSampler.java        | 10 +++---
 .../security/crypto/DefaultCryptoModule.java    | 10 +++---
 .../accumulo/core/util/ThriftMessageUtil.java   |  6 ++--
 .../core/util/format/FormatterConfig.java       |  5 +--
 .../core/volume/VolumeConfiguration.java        |  6 ++--
 .../apache/accumulo/core/volume/VolumeImpl.java | 12 +++----
 .../core/client/IteratorSettingTest.java        |  9 +++--
 .../accumulo/core/trace/PerformanceTest.java    |  3 +-
 .../simple/constraints/MaxMutationSize.java     |  2 +-
 .../shard/CutoffIntersectingIterator.java       | 18 +++++-----
 .../simple/filedata/ChunkInputStreamTest.java   |  8 ++---
 .../org/apache/accumulo/fate/ReadOnlyStore.java |  8 ++---
 .../apache/accumulo/fate/zookeeper/ZooUtil.java |  7 ++--
 .../iteratortest/IteratorTestInput.java         | 11 +++---
 .../iteratortest/IteratorTestOutput.java        | 13 ++++----
 .../iteratortest/IteratorTestReport.java        | 10 +++---
 .../accumulo/iteratortest/IteratorTestUtil.java |  6 ++--
 .../apache/accumulo/cluster/ClusterUser.java    | 10 +++---
 .../apache/accumulo/cluster/RemoteShell.java    |  6 ++--
 .../standalone/StandaloneClusterControl.java    |  4 +--
 .../impl/MiniAccumuloClusterControl.java        |  7 ++--
 pom.xml                                         | 33 ++++++++++++++++++
 .../accumulo/server/AccumuloServerContext.java  |  9 +++--
 .../accumulo/server/fs/VolumeManagerImpl.java   | 10 +++---
 .../server/master/balancer/GroupBalancer.java   | 30 +++++++++--------
 .../accumulo/server/problems/ProblemReport.java | 14 ++++----
 .../DistributedWorkQueueWorkAssignerHelper.java |  5 +--
 .../replication/ReplicaSystemFactory.java       |  5 +--
 .../server/replication/ReplicaSystemHelper.java |  6 ++--
 .../server/replication/ReplicationUtil.java     |  3 +-
 .../server/replication/StatusCombiner.java      |  5 +--
 .../accumulo/server/rpc/TServerUtils.java       |  6 ++--
 .../security/delegation/AuthenticationKey.java  | 14 ++++----
 .../AuthenticationTokenSecretManager.java       | 12 +++----
 .../ZooAuthenticationKeyDistributor.java        | 10 +++---
 .../org/apache/accumulo/server/util/Admin.java  |  5 +--
 .../server/watcher/Log4jConfiguration.java      |  6 ++--
 .../accumulo/server/util/DefaultMapTest.java    |  4 +--
 .../master/metrics/MasterMetricsFactory.java    |  6 ++--
 .../MasterReplicationCoordinator.java           |  5 ++-
 .../accumulo/master/tableOps/CompactRange.java  |  9 +++--
 .../accumulo/master/tableOps/LoadFiles.java     |  2 +-
 .../monitor/servlets/TablesServlet.java         |  2 +-
 .../tserver/ActiveAssignmentRunnable.java       | 10 +++---
 .../tserver/ConditionCheckerContext.java        |  6 ++--
 .../tserver/TabletServerResourceManager.java    |  6 ++--
 .../tserver/compaction/WriteParameters.java     | 10 +++---
 .../metrics/TabletServerMetricsFactory.java     |  6 ++--
 .../replication/AccumuloReplicaSystem.java      | 25 +++++++-------
 .../tserver/session/SessionManager.java         |  2 +-
 .../apache/accumulo/tserver/tablet/Tablet.java  |  4 +--
 .../constraints/ConstraintCheckerTest.java      |  4 +--
 .../org/apache/accumulo/shell/ShellUtil.java    |  5 ++-
 .../accumulo/shell/commands/TraceCommand.java   |  6 ++--
 .../harness/AccumuloClusterHarness.java         | 17 +++++-----
 .../accumulo/harness/MiniClusterHarness.java    |  8 ++---
 .../org/apache/accumulo/harness/TestingKdc.java |  6 ++--
 .../AccumuloClusterPropertyConfiguration.java   |  6 ++--
 .../conf/AccumuloMiniClusterConfiguration.java  |  6 ++--
 .../accumulo/test/ConditionalWriterIT.java      |  2 +-
 .../apache/accumulo/test/TableOperationsIT.java |  3 +-
 .../test/TracerRecoversAfterOfflineTableIT.java |  2 +-
 .../apache/accumulo/test/WaitForBalanceIT.java  |  4 +--
 .../test/functional/FunctionalTestUtils.java    |  2 +-
 .../test/mrit/IntegrationTestMapReduce.java     |  2 +-
 .../accumulo/test/randomwalk/Environment.java   |  4 +--
 .../test/replication/ReplicationIT.java         |  4 +--
 .../test/stress/random/IntArgValidator.java     |  8 +++--
 .../test/stress/random/RandomWithinRange.java   |  8 ++---
 .../test/iterator/SummingCombinerTest.java      |  4 +--
 112 files changed, 492 insertions(+), 468 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
index 5dc6d59,f077573..6783148
--- a/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
@@@ -16,6 -16,6 +16,8 @@@
   */
  package org.apache.accumulo.core.client;
  
++import static java.util.Objects.requireNonNull;
++
  import java.io.IOException;
  import java.util.Collection;
  import java.util.Iterator;
@@@ -344,50 -295,4 +344,50 @@@ public class ClientSideIteratorScanner 
      }
      this.readaheadThreshold = batches;
    }
 +
 +  private SamplerConfiguration getIteratorSamplerConfigurationInternal() {
 +    SamplerConfiguration scannerSamplerConfig = getSamplerConfiguration();
 +    if (scannerSamplerConfig != null) {
 +      if (iteratorSamplerConfig != null && !iteratorSamplerConfig.equals(scannerSamplerConfig)) {
 +        throw new IllegalStateException("Scanner and iterator sampler configuration differ");
 +      }
 +
 +      return scannerSamplerConfig;
 +    }
 +
 +    return iteratorSamplerConfig;
 +  }
 +
 +  /**
 +   * This is provided for the case where no sampler configuration is set on the scanner, but there is a need to create iterator deep copies that have sampling
 +   * enabled. If sampler configuration is set on the scanner, then this method does not need to be called inorder to create deep copies with sampling.
 +   *
 +   * <p>
 +   * Setting this differently than the scanners sampler configuration may cause exceptions.
 +   *
 +   * @since 1.8.0
 +   */
 +  public void setIteratorSamplerConfiguration(SamplerConfiguration sc) {
-     Preconditions.checkNotNull(sc);
++    requireNonNull(sc);
 +    this.iteratorSamplerConfig = sc;
 +  }
 +
 +  /**
 +   * Clear any iterator sampler configuration.
 +   *
 +   * @since 1.8.0
 +   */
 +  public void clearIteratorSamplerConfiguration() {
 +    this.iteratorSamplerConfig = null;
 +  }
 +
 +  /**
 +   * @return currently set iterator sampler configuration.
 +   *
 +   * @since 1.8.0
 +   */
 +
 +  public SamplerConfiguration getIteratorSamplerConfiguration() {
 +    return iteratorSamplerConfig;
 +  }
  }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
index 2a3aaec,77e0134..ae4577d
--- a/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
@@@ -17,6 -17,6 +17,7 @@@
  package org.apache.accumulo.core.client;
  
  import static com.google.common.base.Preconditions.checkArgument;
++import static java.util.Objects.requireNonNull;
  
  import java.util.concurrent.TimeUnit;
  
@@@ -137,39 -133,4 +136,39 @@@ public class ConditionalWriterConfig 
    public Durability getDurability() {
      return durability;
    }
 +
 +  /**
 +   * Sets the name of the classloader context on this scanner. See the administration chapter of the user manual for details on how to configure and use
 +   * classloader contexts.
 +   *
 +   * @param classLoaderContext
 +   *          name of the classloader context
 +   * @throws NullPointerException
 +   *           if context is null
 +   * @since 1.8.0
 +   */
 +  public void setClassLoaderContext(String classLoaderContext) {
-     Preconditions.checkNotNull(classLoaderContext, "context name cannot be null");
++    requireNonNull(classLoaderContext, "context name cannot be null");
 +    this.classLoaderContext = classLoaderContext;
 +  }
 +
 +  /**
 +   * Clears the current classloader context set on this scanner
 +   *
 +   * @since 1.8.0
 +   */
 +  public void clearClassLoaderContext() {
 +    this.classLoaderContext = null;
 +  }
 +
 +  /**
 +   * Returns the name of the current classloader context set on this scanner
 +   *
 +   * @return name of the current context
 +   * @since 1.8.0
 +   */
 +  public String getClassLoaderContext() {
 +    return this.classLoaderContext;
 +  }
 +
  }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java
index 2107dc8,4db1d89..d2d400e
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java
@@@ -17,6 -17,6 +17,7 @@@
  package org.apache.accumulo.core.client.admin;
  
  import static com.google.common.base.Preconditions.checkArgument;
++import static java.util.Objects.requireNonNull;
  
  import java.util.Collections;
  import java.util.HashMap;
@@@ -24,10 -24,7 +25,8 @@@ import java.util.Map
  
  import org.apache.accumulo.core.iterators.IteratorUtil;
  import org.apache.accumulo.core.iterators.user.VersioningIterator;
 +import org.apache.accumulo.core.sample.impl.SamplerConfigurationImpl;
  
- import com.google.common.base.Preconditions;
- 
  /**
   * This object stores table creation parameters. Currently includes: {@link TimeType}, whether to include default iterators, and user-specified initial
   * properties
@@@ -113,26 -104,4 +112,26 @@@ public class NewTableConfiguration 
      propertyMap.putAll(properties);
      return Collections.unmodifiableMap(propertyMap);
    }
 +
 +  private void checkDisjoint(Map<String,String> props, SamplerConfiguration samplerConfiguration) {
 +    if (props.isEmpty() || samplerConfiguration == null) {
 +      return;
 +    }
 +
 +    Map<String,String> sampleProps = new SamplerConfigurationImpl(samplerConfiguration).toTablePropertiesMap();
 +
 +    checkArgument(Collections.disjoint(props.keySet(), sampleProps.keySet()), "Properties and derived sampler properties are not disjoint");
 +  }
 +
 +  /**
 +   * Enable building a sample data set on the new table using the given sampler configuration.
 +   *
 +   * @since 1.8.0
 +   */
 +  public NewTableConfiguration enableSampling(SamplerConfiguration samplerConfiguration) {
-     Preconditions.checkNotNull(samplerConfiguration);
++    requireNonNull(samplerConfiguration);
 +    checkDisjoint(properties, samplerConfiguration);
 +    this.samplerConfiguration = samplerConfiguration;
 +    return this;
 +  }
  }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/admin/SamplerConfiguration.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/admin/SamplerConfiguration.java
index 079d324,0000000..a2bd5cc
mode 100644,000000..100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/SamplerConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/SamplerConfiguration.java
@@@ -1,91 -1,0 +1,90 @@@
 +/*
 + * 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.client.admin;
 +
 +import static com.google.common.base.Preconditions.checkArgument;
++import static java.util.Objects.requireNonNull;
 +
 +import java.util.Collections;
 +import java.util.HashMap;
 +import java.util.Map;
 +import java.util.Map.Entry;
 +
- import com.google.common.base.Preconditions;
- 
 +/**
 + * This class encapsultes configuration and options needed to setup and use sampling.
 + *
 + * @since 1.8.0
 + */
 +
 +public class SamplerConfiguration {
 +
 +  private String className;
 +  private Map<String,String> options = new HashMap<>();
 +
 +  public SamplerConfiguration(String samplerClassName) {
-     Preconditions.checkNotNull(samplerClassName);
++    requireNonNull(samplerClassName);
 +    this.className = samplerClassName;
 +  }
 +
 +  public SamplerConfiguration setOptions(Map<String,String> options) {
-     Preconditions.checkNotNull(options);
++    requireNonNull(options);
 +    this.options = new HashMap<>(options.size());
 +
 +    for (Entry<String,String> entry : options.entrySet()) {
 +      addOption(entry.getKey(), entry.getValue());
 +    }
 +
 +    return this;
 +  }
 +
 +  public SamplerConfiguration addOption(String option, String value) {
 +    checkArgument(option != null, "option is null");
 +    checkArgument(value != null, "value is null");
 +    this.options.put(option, value);
 +    return this;
 +  }
 +
 +  public Map<String,String> getOptions() {
 +    return Collections.unmodifiableMap(options);
 +  }
 +
 +  public String getSamplerClassName() {
 +    return className;
 +  }
 +
 +  @Override
 +  public boolean equals(Object o) {
 +    if (o instanceof SamplerConfiguration) {
 +      SamplerConfiguration osc = (SamplerConfiguration) o;
 +
 +      return className.equals(osc.className) && options.equals(osc.options);
 +    }
 +
 +    return false;
 +  }
 +
 +  @Override
 +  public int hashCode() {
 +    return className.hashCode() + 31 * options.hashCode();
 +  }
 +
 +  @Override
 +  public String toString() {
 +    return className + " " + options;
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
index 0782a7f,e455d5a..54fed15
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
@@@ -17,6 -17,6 +17,7 @@@
  package org.apache.accumulo.core.client.impl;
  
  import static com.google.common.base.Preconditions.checkArgument;
++import static java.util.Objects.requireNonNull;
  
  import java.util.ArrayList;
  import java.util.Collections;
@@@ -211,57 -198,7 +210,57 @@@ public class ScannerOptions implements 
    }
  
    @Override
 -  public Authorizations getAuthorizations() {
 +  public synchronized Authorizations getAuthorizations() {
      throw new UnsupportedOperationException("No authorizations to return");
    }
 +
 +  @Override
 +  public synchronized void setSamplerConfiguration(SamplerConfiguration samplerConfig) {
-     Preconditions.checkNotNull(samplerConfig);
++    requireNonNull(samplerConfig);
 +    this.samplerConfig = samplerConfig;
 +  }
 +
 +  @Override
 +  public synchronized SamplerConfiguration getSamplerConfiguration() {
 +    return samplerConfig;
 +  }
 +
 +  @Override
 +  public synchronized void clearSamplerConfiguration() {
 +    this.samplerConfig = null;
 +  }
 +
 +  @Override
 +  public void setBatchTimeout(long timeout, TimeUnit timeUnit) {
 +    if (timeOut < 0) {
 +      throw new IllegalArgumentException("Batch timeout must be positive : " + timeOut);
 +    }
 +    if (timeout == 0) {
 +      this.batchTimeOut = Long.MAX_VALUE;
 +    } else {
 +      this.batchTimeOut = timeUnit.toMillis(timeout);
 +    }
 +  }
 +
 +  @Override
 +  public long getBatchTimeout(TimeUnit timeUnit) {
 +    return timeUnit.convert(batchTimeOut, TimeUnit.MILLISECONDS);
 +  }
 +
 +  @Override
 +  public void setClassLoaderContext(String classLoaderContext) {
-     Preconditions.checkNotNull(classLoaderContext, "classloader context name cannot be null");
++    requireNonNull(classLoaderContext, "classloader context name cannot be null");
 +    this.classLoaderContext = classLoaderContext;
 +  }
 +
 +  @Override
 +  public void clearClassLoaderContext() {
 +    this.classLoaderContext = null;
 +  }
 +
 +  @Override
 +  public String getClassLoaderContext() {
 +    return this.classLoaderContext;
 +  }
 +
  }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
index b8ca626,6f9ea29..d3d38bf
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
@@@ -17,11 -17,9 +17,12 @@@
  package org.apache.accumulo.core.client.impl;
  
  import static com.google.common.base.Preconditions.checkArgument;
 +import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
  import static java.nio.charset.StandardCharsets.UTF_8;
++import static java.util.Objects.requireNonNull;
  
  import java.io.BufferedReader;
 +import java.io.FileNotFoundException;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.nio.ByteBuffer;
@@@ -120,11 -113,10 +121,10 @@@ import org.apache.hadoop.io.Text
  import org.apache.thrift.TApplicationException;
  import org.apache.thrift.TException;
  import org.apache.thrift.transport.TTransportException;
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
  
  import com.google.common.base.Joiner;
- import com.google.common.base.Preconditions;
  import com.google.common.net.HostAndPort;
  
  public class TableOperationsImpl extends TableOperationsHelper {
@@@ -1481,148 -1443,4 +1481,148 @@@
      }
    }
  
 +  private void clearSamplerOptions(String tableName) throws AccumuloException, TableNotFoundException, AccumuloSecurityException {
 +    String prefix = Property.TABLE_SAMPLER_OPTS.getKey();
 +    for (Entry<String,String> entry : getProperties(tableName)) {
 +      String property = entry.getKey();
 +      if (property.startsWith(prefix)) {
 +        removeProperty(tableName, property);
 +      }
 +    }
 +  }
 +
 +  @Override
 +  public void setSamplerConfiguration(String tableName, SamplerConfiguration samplerConfiguration) throws AccumuloException, TableNotFoundException,
 +      AccumuloSecurityException {
 +    clearSamplerOptions(tableName);
 +
 +    List<Pair<String,String>> props = new SamplerConfigurationImpl(samplerConfiguration).toTableProperties();
 +    for (Pair<String,String> pair : props) {
 +      setProperty(tableName, pair.getFirst(), pair.getSecond());
 +    }
 +  }
 +
 +  @Override
 +  public void clearSamplerConfiguration(String tableName) throws AccumuloException, TableNotFoundException, AccumuloSecurityException {
 +    removeProperty(tableName, Property.TABLE_SAMPLER.getKey());
 +    clearSamplerOptions(tableName);
 +  }
 +
 +  @Override
 +  public SamplerConfiguration getSamplerConfiguration(String tableName) throws TableNotFoundException, AccumuloException {
 +    AccumuloConfiguration conf = new ConfigurationCopy(this.getProperties(tableName));
 +    SamplerConfigurationImpl sci = SamplerConfigurationImpl.newSamplerConfig(conf);
 +    if (sci == null) {
 +      return null;
 +    }
 +    return sci.toSamplerConfiguration();
 +  }
 +
 +  private static class LoctionsImpl implements Locations {
 +
 +    private Map<Range,List<TabletId>> groupedByRanges;
 +    private Map<TabletId,List<Range>> groupedByTablets;
 +    private Map<TabletId,String> tabletLocations;
 +
 +    public LoctionsImpl(Map<String,Map<KeyExtent,List<Range>>> binnedRanges) {
 +      groupedByTablets = new HashMap<>();
 +      groupedByRanges = null;
 +      tabletLocations = new HashMap<>();
 +
 +      for (Entry<String,Map<KeyExtent,List<Range>>> entry : binnedRanges.entrySet()) {
 +        String location = entry.getKey();
 +
 +        for (Entry<KeyExtent,List<Range>> entry2 : entry.getValue().entrySet()) {
 +          TabletIdImpl tabletId = new TabletIdImpl(entry2.getKey());
 +          tabletLocations.put(tabletId, location);
 +          List<Range> prev = groupedByTablets.put(tabletId, Collections.unmodifiableList(entry2.getValue()));
 +          if (prev != null) {
 +            throw new RuntimeException("Unexpected : tablet at multiple locations : " + location + " " + tabletId);
 +          }
 +        }
 +      }
 +
 +      groupedByTablets = Collections.unmodifiableMap(groupedByTablets);
 +    }
 +
 +    @Override
 +    public String getTabletLocation(TabletId tabletId) {
 +      return tabletLocations.get(tabletId);
 +    }
 +
 +    @Override
 +    public Map<Range,List<TabletId>> groupByRange() {
 +      if (groupedByRanges == null) {
 +        Map<Range,List<TabletId>> tmp = new HashMap<>();
 +
 +        for (Entry<TabletId,List<Range>> entry : groupedByTablets.entrySet()) {
 +          for (Range range : entry.getValue()) {
 +            List<TabletId> tablets = tmp.get(range);
 +            if (tablets == null) {
 +              tablets = new ArrayList<>();
 +              tmp.put(range, tablets);
 +            }
 +
 +            tablets.add(entry.getKey());
 +          }
 +        }
 +
 +        Map<Range,List<TabletId>> tmp2 = new HashMap<>();
 +        for (Entry<Range,List<TabletId>> entry : tmp.entrySet()) {
 +          tmp2.put(entry.getKey(), Collections.unmodifiableList(entry.getValue()));
 +        }
 +
 +        groupedByRanges = Collections.unmodifiableMap(tmp2);
 +      }
 +
 +      return groupedByRanges;
 +    }
 +
 +    @Override
 +    public Map<TabletId,List<Range>> groupByTablet() {
 +      return groupedByTablets;
 +    }
 +  }
 +
 +  @Override
 +  public Locations locate(String tableName, Collection<Range> ranges) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-     Preconditions.checkNotNull(tableName, "tableName must be non null");
-     Preconditions.checkNotNull(ranges, "ranges must be non null");
++    requireNonNull(tableName, "tableName must be non null");
++    requireNonNull(ranges, "ranges must be non null");
 +
 +    String tableId = Tables.getTableId(context.getInstance(), tableName);
 +    TabletLocator locator = TabletLocator.getLocator(context, new Text(tableId));
 +
 +    List<Range> rangeList = null;
 +    if (ranges instanceof List) {
 +      rangeList = (List<Range>) ranges;
 +    } else {
 +      rangeList = new ArrayList<>(ranges);
 +    }
 +
 +    Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<>();
 +
 +    locator.invalidateCache();
 +
 +    Retry retry = new Retry(Long.MAX_VALUE, 100, 100, 2000);
 +
 +    while (!locator.binRanges(context, rangeList, binnedRanges).isEmpty()) {
 +
 +      if (!Tables.exists(context.getInstance(), tableId))
 +        throw new TableNotFoundException(tableId, tableName, null);
 +      if (Tables.getTableState(context.getInstance(), tableId) == TableState.OFFLINE)
 +        throw new TableOfflineException(context.getInstance(), tableId);
 +
 +      binnedRanges.clear();
 +
 +      try {
 +        retry.waitForNextAttempt();
 +      } catch (InterruptedException e) {
 +        throw new RuntimeException(e);
 +      }
 +
 +      locator.invalidateCache();
 +    }
 +
 +    return new LoctionsImpl(binnedRanges);
 +  }
  }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
index 43a776a,0e640b4..175abbf
--- 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
@@@ -18,6 -18,6 +18,7 @@@ package org.apache.accumulo.core.client
  
  import static com.google.common.base.Preconditions.checkArgument;
  import static java.nio.charset.StandardCharsets.UTF_8;
++import static java.util.Objects.requireNonNull;
  
  import java.io.ByteArrayInputStream;
  import java.io.ByteArrayOutputStream;
@@@ -939,47 -901,4 +939,47 @@@ public class InputConfigurator extends 
      }
      return binnedRanges;
    }
 +
 +  private static String toBase64(Writable writable) {
 +    ByteArrayOutputStream baos = new ByteArrayOutputStream();
 +    DataOutputStream dos = new DataOutputStream(baos);
 +    try {
 +      writable.write(dos);
 +      dos.close();
 +    } catch (IOException e) {
 +      throw new RuntimeException(e);
 +    }
 +
 +    return Base64.encodeBase64String(baos.toByteArray());
 +  }
 +
 +  private static <T extends Writable> T fromBase64(T writable, String enc) {
 +    ByteArrayInputStream bais = new ByteArrayInputStream(Base64.decodeBase64(enc));
 +    DataInputStream dis = new DataInputStream(bais);
 +    try {
 +      writable.readFields(dis);
 +    } catch (IOException e) {
 +      throw new RuntimeException(e);
 +    }
 +    return writable;
 +  }
 +
 +  public static void setSamplerConfiguration(Class<?> implementingClass, Configuration conf, SamplerConfiguration samplerConfig) {
-     Preconditions.checkNotNull(samplerConfig);
++    requireNonNull(samplerConfig);
 +
 +    String key = enumToConfKey(implementingClass, ScanOpts.SAMPLER_CONFIG);
 +    String val = toBase64(new SamplerConfigurationImpl(samplerConfig));
 +
 +    conf.set(key, val);
 +  }
 +
 +  public static SamplerConfiguration getSamplerConfiguration(Class<?> implementingClass, Configuration conf) {
 +    String key = enumToConfKey(implementingClass, ScanOpts.SAMPLER_CONFIG);
 +
 +    String encodedSC = conf.get(key);
 +    if (encodedSC == null)
 +      return null;
 +
 +    return fromBase64(new SamplerConfigurationImpl(), encodedSC).toSamplerConfiguration();
 +  }
  }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
index 41b4603,0da8bd1..d465138
--- 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,12 -66,6 +68,10 @@@ import org.apache.hadoop.io.Text
  import org.slf4j.Logger;
  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/dc087b12/core/src/main/java/org/apache/accumulo/core/compaction/NullType.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/compaction/NullType.java
index fb4c452,0000000..fe148ae
mode 100644,000000..100644
--- a/core/src/main/java/org/apache/accumulo/core/compaction/NullType.java
+++ b/core/src/main/java/org/apache/accumulo/core/compaction/NullType.java
@@@ -1,29 -1,0 +1,29 @@@
 +/*
 + * 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.compaction;
 +
- import com.google.common.base.Preconditions;
++import static com.google.common.base.Preconditions.checkArgument;
 +
 +public class NullType implements Type {
 +  @Override
 +  public String convert(String str) {
-     Preconditions.checkArgument(str == null);
++    checkArgument(str == null);
 +    return "";
 +  }
 +
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
index baf592f,3814b6f..a0d0f68
--- a/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
@@@ -16,20 -16,11 +16,21 @@@
   */
  package org.apache.accumulo.core.conf;
  
++import static java.util.Objects.requireNonNull;
++
 +import java.util.Arrays;
 +import java.util.List;
 +import java.util.regex.Matcher;
  import java.util.regex.Pattern;
  
  import org.apache.accumulo.core.Constants;
  import org.apache.hadoop.fs.Path;
  
 +import com.google.common.base.Function;
- import com.google.common.base.Preconditions;
 +import com.google.common.base.Predicate;
 +import com.google.common.base.Predicates;
 +import com.google.common.collect.Collections2;
 +
  /**
   * Types of {@link Property} values. Each type has a short name, a description, and a regex which valid values match. All of these fields are optional.
   */
@@@ -120,145 -105,6 +121,145 @@@ public enum PropertyType 
     * @return true if value is valid or null, or if this type has no regex
     */
    public boolean isValidFormat(String value) {
 -    return (regex == null || value == null) ? true : regex.matcher(value).matches();
 +    return predicate.apply(value);
 +  }
 +
 +  private static Predicate<String> in(final boolean caseSensitive, final String... strings) {
 +    List<String> allowedSet = Arrays.asList(strings);
 +    if (caseSensitive) {
 +      return Predicates.in(allowedSet);
 +    } else {
 +      Function<String,String> toLower = new Function<String,String>() {
 +        @Override
 +        public String apply(final String input) {
 +          return input == null ? null : input.toLowerCase();
 +        }
 +      };
 +      return Predicates.compose(Predicates.in(Collections2.transform(allowedSet, toLower)), toLower);
 +    }
 +  }
 +
 +  private static Predicate<String> boundedUnits(final long lowerBound, final long upperBound, final boolean caseSensitive, final String... suffixes) {
 +    return Predicates.or(Predicates.isNull(),
 +        Predicates.and(new HasSuffix(caseSensitive, suffixes), Predicates.compose(new Bounds(lowerBound, upperBound), new StripUnits())));
 +  }
 +
 +  private static class StripUnits implements Function<String,String> {
 +    private static Pattern SUFFIX_REGEX = Pattern.compile("[^\\d]*$");
 +
 +    @Override
 +    public String apply(final String input) {
-       Preconditions.checkNotNull(input);
++      requireNonNull(input);
 +      return SUFFIX_REGEX.matcher(input.trim()).replaceAll("");
 +    }
    }
 +
 +  private static class HasSuffix implements Predicate<String> {
 +
 +    private final Predicate<String> p;
 +
 +    public HasSuffix(final boolean caseSensitive, final String... suffixes) {
 +      p = in(caseSensitive, suffixes);
 +    }
 +
 +    @Override
 +    public boolean apply(final String input) {
-       Preconditions.checkNotNull(input);
++      requireNonNull(input);
 +      Matcher m = StripUnits.SUFFIX_REGEX.matcher(input);
 +      if (m.find()) {
 +        if (m.groupCount() != 0) {
 +          throw new AssertionError(m.groupCount());
 +        }
 +        return p.apply(m.group());
 +      } else {
 +        return true;
 +      }
 +    }
 +  }
 +
 +  private static class FractionPredicate implements Predicate<String> {
 +    @Override
 +    public boolean apply(final String input) {
 +      if (input == null) {
 +        return true;
 +      }
 +      try {
 +        double d;
 +        if (input.length() > 0 && input.charAt(input.length() - 1) == '%') {
 +          d = Double.parseDouble(input.substring(0, input.length() - 1));
 +        } else {
 +          d = Double.parseDouble(input);
 +        }
 +        return d >= 0;
 +      } catch (NumberFormatException e) {
 +        return false;
 +      }
 +    }
 +  }
 +
 +  private static class Bounds implements Predicate<String> {
 +
 +    private final long lowerBound, upperBound;
 +    private final boolean lowerInclusive, upperInclusive;
 +
 +    public Bounds(final long lowerBound, final long upperBound) {
 +      this(lowerBound, true, upperBound, true);
 +    }
 +
 +    public Bounds(final long lowerBound, final boolean lowerInclusive, final long upperBound, final boolean upperInclusive) {
 +      this.lowerBound = lowerBound;
 +      this.lowerInclusive = lowerInclusive;
 +      this.upperBound = upperBound;
 +      this.upperInclusive = upperInclusive;
 +    }
 +
 +    @Override
 +    public boolean apply(final String input) {
 +      if (input == null) {
 +        return true;
 +      }
 +      long number;
 +      try {
 +        number = Long.parseLong(input);
 +      } catch (NumberFormatException e) {
 +        return false;
 +      }
 +      if (number < lowerBound || (!lowerInclusive && number == lowerBound)) {
 +        return false;
 +      }
 +      if (number > upperBound || (!upperInclusive && number == upperBound)) {
 +        return false;
 +      }
 +      return true;
 +    }
 +
 +  }
 +
 +  private static class Matches implements Predicate<String> {
 +
 +    private final Pattern pattern;
 +
 +    public Matches(final String pattern) {
 +      this(pattern, Pattern.DOTALL);
 +    }
 +
 +    public Matches(final String pattern, int flags) {
-       this(Pattern.compile(Preconditions.checkNotNull(pattern), flags));
++      this(Pattern.compile(requireNonNull(pattern), flags));
 +    }
 +
 +    public Matches(final Pattern pattern) {
-       Preconditions.checkNotNull(pattern);
++      requireNonNull(pattern);
 +      this.pattern = pattern;
 +    }
 +
 +    @Override
 +    public boolean apply(final String input) {
 +      // TODO when the input is null, it just means that the property wasn't set
 +      // we can add checks for not null for required properties with Predicates.and(Predicates.notNull(), ...),
 +      // or we can stop assuming that null is always okay for a Matches predicate, and do that explicitly with Predicates.or(Predicates.isNull(), ...)
 +      return input == null || pattern.matcher(input).matches();
 +    }
 +
 +  }
 +
  }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
index 9564f0b,060d956..a73936b
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
@@@ -16,6 -16,6 +16,8 @@@
   */
  package org.apache.accumulo.core.file.rfile;
  
++import static java.util.Objects.requireNonNull;
++
  import java.io.DataInput;
  import java.io.DataInputStream;
  import java.io.DataOutput;
@@@ -72,9 -68,6 +74,8 @@@ import org.apache.hadoop.io.Writable
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
 +import com.google.common.annotations.VisibleForTesting;
- import com.google.common.base.Preconditions;
 +
  public class RFile {
  
    public static final String EXTENSION = "rf";
@@@ -1306,46 -1043,9 +1307,46 @@@
        return new MultiIndexIterator(this, indexes);
      }
  
 +    @Override
 +    public FileSKVIterator getSample(SamplerConfigurationImpl sampleConfig) {
-       Preconditions.checkNotNull(sampleConfig);
++      requireNonNull(sampleConfig);
 +
 +      if (this.samplerConfig != null && this.samplerConfig.equals(sampleConfig)) {
 +        Reader copy = new Reader(this, sampleReaders);
 +        copy.setInterruptFlagInternal(interruptFlag);
 +        return copy;
 +      }
 +
 +      return null;
 +    }
 +
 +    // only visible for printinfo
 +    FileSKVIterator getSample() {
 +      if (samplerConfig == null)
 +        return null;
 +      return getSample(this.samplerConfig);
 +    }
 +
      public void printInfo() throws IOException {
 +
 +      System.out.printf("%-24s : %d\n", "RFile Version", rfileVersion);
 +      System.out.println();
 +
        for (LocalityGroupMetadata lgm : localityGroups) {
 -        lgm.printInfo();
 +        lgm.printInfo(false);
 +      }
 +
 +      if (sampleGroups.size() > 0) {
 +
 +        System.out.println();
 +        System.out.printf("%-24s :\n", "Sample Configuration");
 +        System.out.printf("\t%-22s : %s\n", "Sampler class ", samplerConfig.getClassName());
 +        System.out.printf("\t%-22s : %s\n", "Sampler options ", samplerConfig.getOptions());
 +        System.out.println();
 +
 +        for (LocalityGroupMetadata lgm : sampleGroups) {
 +          lgm.printInfo(true);
 +        }
        }
      }
  

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/sample/AbstractHashSampler.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/sample/AbstractHashSampler.java
index ae2b951,0000000..cbb0f31
mode 100644,000000..100644
--- a/core/src/main/java/org/apache/accumulo/core/sample/AbstractHashSampler.java
+++ b/core/src/main/java/org/apache/accumulo/core/sample/AbstractHashSampler.java
@@@ -1,106 -1,0 +1,108 @@@
 +/*
 + * 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.sample;
 +
++import static com.google.common.base.Preconditions.checkArgument;
++import static java.util.Objects.requireNonNull;
++
 +import java.util.Set;
 +
 +import org.apache.accumulo.core.client.admin.SamplerConfiguration;
 +import org.apache.accumulo.core.data.Key;
 +
- import com.google.common.base.Preconditions;
 +import com.google.common.collect.ImmutableSet;
 +import com.google.common.hash.HashCode;
 +import com.google.common.hash.HashFunction;
 +import com.google.common.hash.Hashing;
 +
 +/**
 + * A base class that can be used to create Samplers based on hashing. This class offers consistent options for configuring the hash function. The subclass
 + * decides which parts of the key to hash.
 + *
 + * <p>
 + * This class support two options passed into {@link #init(SamplerConfiguration)}. One option is {@code hasher} which specifies a hashing algorithm. Valid
 + * values for this option are {@code md5}, {@code sha1}, and {@code murmur3_32}. If you are not sure, then choose {@code murmur3_32}.
 + *
 + * <p>
 + * The second option is {@code modulus} which can have any positive integer as a value.
 + *
 + * <p>
 + * Any data where {@code hash(data) % modulus == 0} will be selected for the sample.
 + *
 + * @since 1.8.0
 + */
 +
 +public abstract class AbstractHashSampler implements Sampler {
 +
 +  private HashFunction hashFunction;
 +  private int modulus;
 +
 +  private static final Set<String> VALID_OPTIONS = ImmutableSet.of("hasher", "modulus");
 +
 +  /**
 +   * Subclasses with options should override this method and return true if the option is valid for the subclass or if {@code super.isValidOption(opt)} returns
 +   * true.
 +   */
 +
 +  protected boolean isValidOption(String option) {
 +    return VALID_OPTIONS.contains(option);
 +  }
 +
 +  /**
 +   * Subclasses with options should override this method and call {@code super.init(config)}.
 +   */
 +
 +  @Override
 +  public void init(SamplerConfiguration config) {
 +    String hasherOpt = config.getOptions().get("hasher");
 +    String modulusOpt = config.getOptions().get("modulus");
 +
-     Preconditions.checkNotNull(hasherOpt, "Hasher not specified");
-     Preconditions.checkNotNull(modulusOpt, "Modulus not specified");
++    requireNonNull(hasherOpt, "Hasher not specified");
++    requireNonNull(modulusOpt, "Modulus not specified");
 +
 +    for (String option : config.getOptions().keySet()) {
-       Preconditions.checkArgument(isValidOption(option), "Unknown option : %s", option);
++      checkArgument(isValidOption(option), "Unknown option : %s", option);
 +    }
 +
 +    switch (hasherOpt) {
 +      case "murmur3_32":
 +        hashFunction = Hashing.murmur3_32();
 +        break;
 +      case "md5":
 +        hashFunction = Hashing.md5();
 +        break;
 +      case "sha1":
 +        hashFunction = Hashing.sha1();
 +        break;
 +      default:
 +        throw new IllegalArgumentException("Uknown hahser " + hasherOpt);
 +    }
 +
 +    modulus = Integer.parseInt(modulusOpt);
 +  }
 +
 +  /**
 +   * Subclass must override this method and hash some portion of the key.
 +   */
 +  protected abstract HashCode hash(HashFunction hashFunction, Key k);
 +
 +  @Override
 +  public boolean accept(Key k) {
 +    return hash(hashFunction, k).asInt() % modulus == 0;
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/core/src/main/java/org/apache/accumulo/core/util/format/FormatterConfig.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/util/format/FormatterConfig.java
index c70b1e4,0000000..0cd5139
mode 100644,000000..100644
--- a/core/src/main/java/org/apache/accumulo/core/util/format/FormatterConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/format/FormatterConfig.java
@@@ -1,115 -1,0 +1,116 @@@
 +/*
 + * 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.format;
 +
++import static com.google.common.base.Preconditions.checkArgument;
++
 +import java.text.DateFormat;
 +import java.text.FieldPosition;
 +import java.text.ParsePosition;
 +import java.text.SimpleDateFormat;
 +import java.util.Date;
 +
- import com.google.common.base.Preconditions;
 +import com.google.common.base.Supplier;
 +
 +/**
 + * Holds configuration settings for a {@link Formatter}
 + */
 +public class FormatterConfig {
 +
 +  private boolean printTimestamps;
 +  private int shownLength;
 +  private Supplier<DateFormat> dateFormatSupplier;
 +
 +  /** Formats with milliseconds since epoch */
 +  public static class DefaultDateFormat extends SimpleDateFormat {
 +    private static final long serialVersionUID = 1L;
 +
 +    @Override
 +    public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
 +      toAppendTo.append(Long.toString(date.getTime()));
 +      return toAppendTo;
 +    }
 +
 +    @Override
 +    public Date parse(String source, ParsePosition pos) {
 +      return new Date(Long.parseLong(source));
 +    }
 +  }
 +
 +  public FormatterConfig() {
 +    this.setPrintTimestamps(false);
 +    this.doNotLimitShowLength();
 +    this.dateFormatSupplier = DateFormatSupplier.createDefaultFormatSupplier();
 +  }
 +
 +  /**
 +   * Copies most fields, but still points to other.dateFormatSupplier.
 +   */
 +  public FormatterConfig(FormatterConfig other) {
 +    this.printTimestamps = other.printTimestamps;
 +    this.shownLength = other.shownLength;
 +    this.dateFormatSupplier = other.dateFormatSupplier;
 +  }
 +
 +  public boolean willPrintTimestamps() {
 +    return printTimestamps;
 +  }
 +
 +  public FormatterConfig setPrintTimestamps(boolean printTimestamps) {
 +    this.printTimestamps = printTimestamps;
 +    return this;
 +  }
 +
 +  public int getShownLength() {
 +    return shownLength;
 +  }
 +
 +  public boolean willLimitShowLength() {
 +    return this.shownLength != Integer.MAX_VALUE;
 +  }
 +
 +  /**
 +   * If given a negative number, throws an {@link IllegalArgumentException}
 +   *
 +   * @param shownLength
 +   *          maximum length of formatted output
 +   * @return {@code this} to allow chaining of set methods
 +   */
 +  public FormatterConfig setShownLength(int shownLength) {
-     Preconditions.checkArgument(shownLength >= 0, "Shown length cannot be negative");
++    checkArgument(shownLength >= 0, "Shown length cannot be negative");
 +    this.shownLength = shownLength;
 +    return this;
 +  }
 +
 +  public FormatterConfig doNotLimitShowLength() {
 +    this.shownLength = Integer.MAX_VALUE;
 +    return this;
 +  }
 +
 +  public Supplier<DateFormat> getDateFormatSupplier() {
 +    return dateFormatSupplier;
 +  }
 +
 +  /**
 +   * this.dateFormatSupplier points to dateFormatSupplier, so it is recommended that you create a new {@code Supplier} when calling this function if your
 +   * {@code Supplier} maintains some kind of state (see {@link DateFormatSupplier}.
 +   */
 +  public FormatterConfig setDateFormatSupplier(Supplier<DateFormat> dateFormatSupplier) {
 +    this.dateFormatSupplier = dateFormatSupplier;
 +    return this;
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/CutoffIntersectingIterator.java
----------------------------------------------------------------------
diff --cc examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/CutoffIntersectingIterator.java
index 133e8ae,0000000..9f13dd4
mode 100644,000000..100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/CutoffIntersectingIterator.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/CutoffIntersectingIterator.java
@@@ -1,123 -1,0 +1,123 @@@
 +/*
 + * 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.examples.simple.shard;
 +
++import static com.google.common.base.Preconditions.checkArgument;
++import static java.util.Objects.requireNonNull;
++
 +import java.io.IOException;
 +import java.util.Collection;
 +import java.util.Map;
 +
 +import org.apache.accumulo.core.client.IteratorSetting;
 +import org.apache.accumulo.core.client.admin.SamplerConfiguration;
 +import org.apache.accumulo.core.data.ByteSequence;
 +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.iterators.IteratorEnvironment;
 +import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 +import org.apache.accumulo.core.iterators.user.IntersectingIterator;
 +import org.apache.accumulo.core.sample.RowColumnSampler;
 +
- import com.google.common.base.Preconditions;
- 
 +/**
 + * This iterator uses a sample built from the Column Qualifier to quickly avoid intersecting iterator queries that may return too many documents.
 + */
 +
 +public class CutoffIntersectingIterator extends IntersectingIterator {
 +
 +  private IntersectingIterator sampleII;
 +  private int sampleMax;
 +  private boolean hasTop;
 +
 +  public static void setCutoff(IteratorSetting iterCfg, int cutoff) {
-     Preconditions.checkArgument(cutoff >= 0);
++    checkArgument(cutoff >= 0);
 +    iterCfg.addOption("cutoff", cutoff + "");
 +  }
 +
 +  @Override
 +  public boolean hasTop() {
 +    return hasTop && super.hasTop();
 +  }
 +
 +  @Override
 +  public void seek(Range range, Collection<ByteSequence> seekColumnFamilies, boolean inclusive) throws IOException {
 +
 +    sampleII.seek(range, seekColumnFamilies, inclusive);
 +
 +    // this check will be redone whenever iterator stack is torn down and recreated.
 +    int count = 0;
 +    while (count <= sampleMax && sampleII.hasTop()) {
 +      sampleII.next();
 +      count++;
 +    }
 +
 +    if (count > sampleMax) {
 +      // In a real application would probably want to return a key value that indicates too much data. Since this would execute for each tablet, some tablets
 +      // may return data. For tablets that did not return data, would want an indication.
 +      hasTop = false;
 +    } else {
 +      hasTop = true;
 +      super.seek(range, seekColumnFamilies, inclusive);
 +    }
 +  }
 +
 +  @Override
 +  public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
 +    super.init(source, options, env);
 +
 +    IteratorEnvironment sampleEnv = env.cloneWithSamplingEnabled();
 +
 +    setMax(sampleEnv, options);
 +
 +    SortedKeyValueIterator<Key,Value> sampleDC = source.deepCopy(sampleEnv);
 +    sampleII = new IntersectingIterator();
 +    sampleII.init(sampleDC, options, env);
 +
 +  }
 +
 +  static void validateSamplerConfig(SamplerConfiguration sampleConfig) {
-     Preconditions.checkNotNull(sampleConfig);
-     Preconditions.checkArgument(sampleConfig.getSamplerClassName().equals(RowColumnSampler.class.getName()),
-         "Unexpected Sampler " + sampleConfig.getSamplerClassName());
-     Preconditions.checkArgument(sampleConfig.getOptions().get("qualifier").equals("true"), "Expected sample on column qualifier");
-     Preconditions.checkArgument(isNullOrFalse(sampleConfig.getOptions(), "row", "family", "visibility"), "Expected sample on column qualifier only");
++    requireNonNull(sampleConfig);
++    checkArgument(sampleConfig.getSamplerClassName().equals(RowColumnSampler.class.getName()), "Unexpected Sampler " + sampleConfig.getSamplerClassName());
++    checkArgument(sampleConfig.getOptions().get("qualifier").equals("true"), "Expected sample on column qualifier");
++    checkArgument(isNullOrFalse(sampleConfig.getOptions(), "row", "family", "visibility"), "Expected sample on column qualifier only");
 +  }
 +
 +  private void setMax(IteratorEnvironment sampleEnv, Map<String,String> options) {
 +    String cutoffValue = options.get("cutoff");
 +    SamplerConfiguration sampleConfig = sampleEnv.getSamplerConfiguration();
 +
 +    // Ensure the sample was constructed in an expected way. If the sample is not built as expected, then can not draw conclusions based on sample.
-     Preconditions.checkNotNull(cutoffValue, "Expected cutoff option is missing");
++    requireNonNull(cutoffValue, "Expected cutoff option is missing");
 +    validateSamplerConfig(sampleConfig);
 +
 +    int modulus = Integer.parseInt(sampleConfig.getOptions().get("modulus"));
 +
 +    sampleMax = Math.round(Float.parseFloat(cutoffValue) / modulus);
 +  }
 +
 +  private static boolean isNullOrFalse(Map<String,String> options, String... keys) {
 +    for (String key : keys) {
 +      String val = options.get(key);
 +      if (val != null && val.equals("true")) {
 +        return false;
 +      }
 +    }
 +    return true;
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStreamTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java
----------------------------------------------------------------------
diff --cc iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java
index 943bb0d,0000000..dfffdeb
mode 100644,000000..100644
--- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java
+++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java
@@@ -1,88 -1,0 +1,89 @@@
 +/*
 + * 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.iteratortest;
 +
++import static java.util.Objects.requireNonNull;
++
 +import java.util.Collections;
 +import java.util.Map;
- import java.util.Objects;
 +import java.util.SortedMap;
 +
 +import org.apache.accumulo.core.client.IteratorSetting;
 +import org.apache.accumulo.core.client.Scanner;
 +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.iterators.SortedKeyValueIterator;
 +
 +/**
 + * The necessary user-input to invoke a test on a {@link SortedKeyValueIterator}.
 + */
 +public class IteratorTestInput {
 +
 +  private final Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass;
 +  private final Map<String,String> iteratorOptions;
 +  private final Range range;
 +  private final SortedMap<Key,Value> input;
 +
 +  /**
 +   * Construct an instance of the test input.
 +   *
 +   * @param iteratorClass
 +   *          The class for the iterator to test
 +   * @param iteratorOptions
 +   *          Options, if any, to provide to the iterator ({@link IteratorSetting}'s Map of properties)
 +   * @param range
 +   *          The Range of data to query ({@link Scanner#setRange(Range)})
 +   * @param input
 +   *          A sorted collection of Key-Value pairs acting as the table.
 +   */
 +  public IteratorTestInput(Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass, Map<String,String> iteratorOptions, Range range,
 +      SortedMap<Key,Value> input) {
 +    // Already immutable
-     this.iteratorClass = Objects.requireNonNull(iteratorClass);
++    this.iteratorClass = requireNonNull(iteratorClass);
 +    // Make it immutable to the test
-     this.iteratorOptions = Collections.unmodifiableMap(Objects.requireNonNull(iteratorOptions));
++    this.iteratorOptions = Collections.unmodifiableMap(requireNonNull(iteratorOptions));
 +    // Already immutable
-     this.range = Objects.requireNonNull(range);
++    this.range = requireNonNull(range);
 +    // Make it immutable to the test
-     this.input = Collections.unmodifiableSortedMap((Objects.requireNonNull(input)));
++    this.input = Collections.unmodifiableSortedMap((requireNonNull(input)));
 +  }
 +
 +  public Class<? extends SortedKeyValueIterator<Key,Value>> getIteratorClass() {
 +    return iteratorClass;
 +  }
 +
 +  public Map<String,String> getIteratorOptions() {
 +    return iteratorOptions;
 +  }
 +
 +  public Range getRange() {
 +    return range;
 +  }
 +
 +  public SortedMap<Key,Value> getInput() {
 +    return input;
 +  }
 +
 +  @Override
 +  public String toString() {
 +    StringBuilder sb = new StringBuilder(64);
 +    sb.append("[iteratorClass=").append(iteratorClass).append(", iteratorOptions=").append(iteratorOptions).append(", range=").append(range)
 +        .append(", input='").append(input).append("']");
 +    return sb.toString();
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestOutput.java
----------------------------------------------------------------------
diff --cc iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestOutput.java
index 806c428,0000000..4b670bb
mode 100644,000000..100644
--- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestOutput.java
+++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestOutput.java
@@@ -1,163 -1,0 +1,162 @@@
 +/*
 + * 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.iteratortest;
 +
++import static java.util.Objects.requireNonNull;
++
 +import java.util.Collections;
- import java.util.Objects;
 +import java.util.SortedMap;
 +
 +import org.apache.accumulo.core.data.Key;
 +import org.apache.accumulo.core.data.Value;
 +import org.apache.accumulo.iteratortest.testcases.IteratorTestCase;
 +
 +/**
 + * The expected results from invoking a {@link IteratorTestCase} on a {@link IteratorTestInput}. The output will be either a {@link SortedMap} of Keys and
 + * Values or an exception but never both. If one of these members is null, the other is guaranteed to be non-null.
 + */
 +public class IteratorTestOutput {
 +
 +  /**
 +   * An outcome about what happened during a test case.
 +   */
 +  public enum TestOutcome {
 +    /**
 +     * The IteratorTestCase proactively passed.
 +     */
-     PASSED,
-     /**
++    PASSED, /**
 +     * The IteratorTestCase proactively failed.
 +     */
-     FAILED,
-     /**
++    FAILED, /**
 +     * The IteratorTestCase completed, but the pass/fail should be determined by the other context.
 +     */
 +    COMPLETED
 +  }
 +
 +  private final SortedMap<Key,Value> output;
 +  private final Exception exception;
 +  private final TestOutcome outcome;
 +
 +  public IteratorTestOutput(TestOutcome outcome) {
 +    this.outcome = outcome;
 +    if (outcome == TestOutcome.COMPLETED) {
 +      throw new IllegalArgumentException("This constructor is only for use with PASSED and FAILED");
 +    }
 +    output = null;
 +    exception = null;
 +  }
 +
 +  /**
 +   * Create an instance of the class.
 +   *
 +   * @param output
 +   *          The sorted collection of Key-Value pairs generated by an Iterator.
 +   */
 +  public IteratorTestOutput(SortedMap<Key,Value> output) {
-     this.output = Collections.unmodifiableSortedMap(Objects.requireNonNull(output));
++    this.output = Collections.unmodifiableSortedMap(requireNonNull(output));
 +    this.exception = null;
 +    this.outcome = TestOutcome.COMPLETED;
 +  }
 +
 +  public IteratorTestOutput(Exception e) {
 +    this.output = null;
-     this.exception = Objects.requireNonNull(e);
++    this.exception = requireNonNull(e);
 +    this.outcome = TestOutcome.FAILED;
 +  }
 +
 +  /**
 +   * @return The outcome of the test.
 +   */
 +  public TestOutcome getTestOutcome() {
 +    return outcome;
 +  }
 +
 +  /**
 +   * Returns the output from the iterator.
 +   *
 +   * @return The sorted Key-Value pairs from an iterator, null if an exception was thrown.
 +   */
 +  public SortedMap<Key,Value> getOutput() {
 +    return output;
 +  }
 +
 +  /**
 +   * @return True if there is output, false if the output is null.
 +   */
 +  public boolean hasOutput() {
 +    return null != output;
 +  }
 +
 +  /**
 +   * Returns the exception thrown by the iterator.
 +   *
 +   * @return The exception thrown by the iterator, null if no exception was thrown.
 +   */
 +  public Exception getException() {
 +    return exception;
 +  }
 +
 +  /**
 +   * @return True if there is an exception, null if the iterator successfully generated Key-Value pairs.
 +   */
 +  public boolean hasException() {
 +    return null != exception;
 +  }
 +
 +  @Override
 +  public int hashCode() {
 +    final int prime = 31;
 +    int result = 1;
 +    result = prime * result + ((exception == null) ? 0 : exception.hashCode());
 +    result = prime * result + ((outcome == null) ? 0 : outcome.hashCode());
 +    result = prime * result + ((output == null) ? 0 : output.hashCode());
 +    return result;
 +  }
 +
 +  @Override
 +  public boolean equals(Object o) {
 +    if (!(o instanceof IteratorTestOutput)) {
 +      return false;
 +    }
 +
 +    IteratorTestOutput other = (IteratorTestOutput) o;
 +
 +    if (outcome != other.outcome) {
 +      return false;
 +    }
 +
 +    if (hasOutput()) {
 +      if (!other.hasOutput()) {
 +        return false;
 +      }
 +      return output.equals(other.output);
 +    }
 +
 +    if (!other.hasException()) {
 +      return false;
 +    }
 +    return exception.equals(other.getException());
 +
 +  }
 +
 +  @Override
 +  public String toString() {
 +    StringBuilder sb = new StringBuilder(64);
 +    sb.append("[outcome=").append(outcome).append(", output='").append(output).append("', exception=").append(exception).append("]");
 +    return sb.toString();
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestReport.java
----------------------------------------------------------------------
diff --cc iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestReport.java
index a52e883,0000000..ea2b264
mode 100644,000000..100644
--- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestReport.java
+++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestReport.java
@@@ -1,76 -1,0 +1,76 @@@
 +/*
 + * 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.iteratortest;
 +
- import java.util.Objects;
++import static java.util.Objects.requireNonNull;
 +
 +import org.apache.accumulo.iteratortest.testcases.IteratorTestCase;
 +
 +/**
 + * A summary of the invocation of an {@link IteratorTestInput} over a {@link IteratorTestCase} with the expected {@link IteratorTestOutput}.
 + */
 +public class IteratorTestReport {
 +
 +  private final IteratorTestInput input;
 +  private final IteratorTestOutput expectedOutput;
 +  private final IteratorTestCase testCase;
 +  private final IteratorTestOutput actualOutput;
 +
 +  public IteratorTestReport(IteratorTestInput input, IteratorTestOutput expectedOutput, IteratorTestOutput actualOutput, IteratorTestCase testCase) {
-     this.input = Objects.requireNonNull(input);
-     this.expectedOutput = Objects.requireNonNull(expectedOutput);
-     this.testCase = Objects.requireNonNull(testCase);
-     this.actualOutput = Objects.requireNonNull(actualOutput);
++    this.input = requireNonNull(input);
++    this.expectedOutput = requireNonNull(expectedOutput);
++    this.testCase = requireNonNull(testCase);
++    this.actualOutput = requireNonNull(actualOutput);
 +  }
 +
 +  public IteratorTestInput getInput() {
 +    return input;
 +  }
 +
 +  public IteratorTestOutput getExpectedOutput() {
 +    return expectedOutput;
 +  }
 +
 +  public IteratorTestCase getTestCase() {
 +    return testCase;
 +  }
 +
 +  public IteratorTestOutput getActualOutput() {
 +    return actualOutput;
 +  }
 +
 +  /**
 +   * Evaluate whether the test passed or failed.
 +   *
 +   * @return True if the actual output matches the expected output, false otherwise.
 +   */
 +  public boolean didTestSucceed() {
 +    return testCase.verify(expectedOutput, actualOutput);
 +  }
 +
 +  public String getSummary() {
 +    StringBuilder sb = new StringBuilder(64);
 +    // @formatter:off
 +    sb.append("IteratorTestReport Summary: \n")
 +        .append("\tTest Case = ").append(testCase.getClass().getName())
 +        .append("\tInput Data = '").append(input).append("'\n")
 +        .append("\tExpected Output = '").append(expectedOutput).append("'\n")
 +        .append("\tActual Output = '").append(actualOutput).append("'\n");
 +    // @formatter:on
 +    return sb.toString();
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestUtil.java
----------------------------------------------------------------------
diff --cc iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestUtil.java
index 4185846,0000000..6e3c8e6
mode 100644,000000..100644
--- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestUtil.java
+++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestUtil.java
@@@ -1,44 -1,0 +1,44 @@@
 +/*
 + * 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.iteratortest;
 +
- import java.util.Objects;
++import static java.util.Objects.requireNonNull;
 +
 +import org.apache.accumulo.core.data.Key;
 +import org.apache.accumulo.core.data.Value;
 +import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 +import org.apache.accumulo.core.iterators.SortedMapIterator;
 +import org.apache.accumulo.core.iterators.system.ColumnFamilySkippingIterator;
 +import org.apache.accumulo.iteratortest.testcases.IteratorTestCase;
 +
 +/**
 + * A collection of methods that are helpful to the development of {@link IteratorTestCase}s.
 + */
 +public class IteratorTestUtil {
 +
 +  public static SortedKeyValueIterator<Key,Value> instantiateIterator(IteratorTestInput input) {
 +    try {
-       return Objects.requireNonNull(input.getIteratorClass()).newInstance();
++      return requireNonNull(input.getIteratorClass()).newInstance();
 +    } catch (InstantiationException | IllegalAccessException e) {
 +      throw new RuntimeException(e);
 +    }
 +  }
 +
 +  public static SortedKeyValueIterator<Key,Value> createSource(IteratorTestInput input) {
-     return new SimpleKVReusingIterator(new ColumnFamilySkippingIterator(new SortedMapIterator(Objects.requireNonNull(input).getInput())));
++    return new SimpleKVReusingIterator(new ColumnFamilySkippingIterator(new SortedMapIterator(requireNonNull(input).getInput())));
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
----------------------------------------------------------------------
diff --cc server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
index f474dc3,77d6412..26150e8
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
@@@ -16,7 -16,7 +16,8 @@@
   */
  package org.apache.accumulo.server.rpc;
  
+ import static com.google.common.base.Preconditions.checkArgument;
 +import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
  
  import java.io.IOException;
  import java.lang.reflect.Field;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactRange.java
----------------------------------------------------------------------
diff --cc server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactRange.java
index d9db5b2,7a9c5d6..d7d5b14
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactRange.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactRange.java
@@@ -53,11 -52,11 +52,11 @@@ public class CompactRange extends Maste
    private byte[] config;
  
    public CompactRange(String tableId, byte[] startRow, byte[] endRow, List<IteratorSetting> iterators, CompactionStrategyConfig compactionStrategy)
 -      throws ThriftTableOperationException {
 +      throws AcceptableThriftTableOperationException {
  
-     Preconditions.checkNotNull(tableId, "Invalid argument: null tableId");
-     Preconditions.checkNotNull(iterators, "Invalid argument: null iterator list");
-     Preconditions.checkNotNull(compactionStrategy, "Invalid argument: null compactionStrategy");
+     requireNonNull(tableId, "Invalid argument: null tableId");
+     requireNonNull(iterators, "Invalid argument: null iterator list");
+     requireNonNull(compactionStrategy, "Invalid argument: null compactionStrategy");
  
      this.tableId = tableId;
      this.startRow = startRow.length == 0 ? null : startRow;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/server/master/src/main/java/org/apache/accumulo/master/tableOps/LoadFiles.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
----------------------------------------------------------------------
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
index 417a107,3624e74..328c591
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
@@@ -79,9 -81,7 +81,8 @@@ import org.apache.thrift.transport.TTra
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
- import com.google.common.base.Preconditions;
  import com.google.common.net.HostAndPort;
 +import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
  
  public class AccumuloReplicaSystem implements ReplicaSystem {
    private static final Logger log = LoggerFactory.getLogger(AccumuloReplicaSystem.class);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
----------------------------------------------------------------------
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
index f48aec7,3231ce9..90fba75
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
@@@ -16,8 -16,8 +16,9 @@@
   */
  package org.apache.accumulo.tserver.tablet;
  
 +import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
  import static java.nio.charset.StandardCharsets.UTF_8;
+ import static java.util.Objects.requireNonNull;
  
  import java.io.ByteArrayInputStream;
  import java.io.DataInputStream;
@@@ -150,9 -149,6 +151,8 @@@ import org.apache.zookeeper.KeeperExcep
  
  import com.google.common.annotations.VisibleForTesting;
  import com.google.common.base.Optional;
- import com.google.common.base.Preconditions;
 +import com.google.common.cache.Cache;
 +import com.google.common.cache.CacheBuilder;
  
  /**
   *

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dc087b12/shell/src/main/java/org/apache/accumulo/shell/commands/TraceCommand.java
----------------------------------------------------------------------


Mime
View raw message