accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhava...@apache.org
Subject [2/2] git commit: ACCUMULO-2021 Replace ArgumentChecker with Guava Preconditions
Date Fri, 07 Feb 2014 16:31:32 GMT
ACCUMULO-2021 Replace ArgumentChecker with Guava Preconditions

The ArgumentChecker offers some of the same argument checks as the Preconditions class
in Guava. This commit eliminates ArgumentChecker and replaces its uses with calls to
Preconditions, particularly Preconditions.checkArgument(). The Validator class inside
ArgumentChecker was also promoted to a regular class with its own unit test.


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

Branch: refs/heads/master
Commit: b94e308e5dcfc4bd19c735e9d323ea90b3d7d54c
Parents: ddd2365
Author: Bill Havanki <bhavanki@cloudera.com>
Authored: Mon Dec 30 06:18:37 2013 -0500
Committer: Bill Havanki <bhavanki@cloudera.com>
Committed: Fri Feb 7 11:29:50 2014 -0500

----------------------------------------------------------------------
 .../core/client/ClientConfiguration.java        |  12 +-
 .../core/client/ConditionalWriterConfig.java    |   4 +-
 .../accumulo/core/client/IteratorSetting.java   |  17 +--
 .../accumulo/core/client/ZooKeeperInstance.java |   7 +-
 .../client/admin/InstanceOperationsImpl.java    |  10 +-
 .../client/admin/NamespaceOperationsImpl.java   |  24 ++--
 .../client/admin/SecurityOperationsImpl.java    |  54 +++++---
 .../client/admin/TableOperationsHelper.java     |  14 +-
 .../core/client/admin/TableOperationsImpl.java  |  60 +++++----
 .../core/client/impl/BatchWriterImpl.java       |  10 +-
 .../core/client/impl/ConnectorImpl.java         |  21 +--
 .../accumulo/core/client/impl/MasterClient.java |   4 +-
 .../client/impl/MultiTableBatchWriterImpl.java  |  11 +-
 .../accumulo/core/client/impl/Namespaces.java   |   2 +-
 .../core/client/impl/OfflineScanner.java        |   7 +-
 .../accumulo/core/client/impl/ScannerImpl.java  |   9 +-
 .../core/client/impl/ScannerOptions.java        |  17 ++-
 .../accumulo/core/client/impl/ServerClient.java |   4 +-
 .../accumulo/core/client/impl/Tables.java       |   7 +-
 .../core/client/impl/TabletLocator.java         |   6 +-
 .../client/impl/TabletServerBatchReader.java    |   7 +-
 .../core/client/impl/ThriftTransportKey.java    |   4 +-
 .../accumulo/core/client/impl/Writer.java       |  13 +-
 .../mapreduce/lib/util/ConfiguratorBase.java    |  15 ++-
 .../mapreduce/lib/util/InputConfigurator.java   |  12 +-
 .../core/client/mock/MockBatchWriter.java       |   7 +-
 .../apache/accumulo/core/data/Condition.java    |  26 ++--
 .../accumulo/core/data/ConditionalMutation.java |   6 +-
 .../core/metadata/MetadataServicer.java         |   6 +-
 .../accumulo/core/security/Authorizations.java  |  12 +-
 .../accumulo/core/util/ArgumentChecker.java     | 101 --------------
 .../apache/accumulo/core/util/Validator.java    | 135 +++++++++++++++++++
 .../accumulo/core/util/ValidatorTest.java       |  98 ++++++++++++++
 .../accumulo/server/trace/TraceFileSystem.java  |   4 +-
 .../accumulo/master/FateServiceHandler.java     |   2 +-
 35 files changed, 484 insertions(+), 264 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
index b0ae537..4ac9e40 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.io.File;
 import java.io.StringReader;
 import java.io.StringWriter;
@@ -26,7 +27,6 @@ import java.util.UUID;
 
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.conf.PropertyType;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.commons.configuration.CompositeConfiguration;
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
@@ -226,7 +226,7 @@ public class ClientConfiguration extends CompositeConfiguration {
    * 
    */
   public ClientConfiguration withInstance(String instanceName) {
-    ArgumentChecker.notNull(instanceName);
+    checkArgument(instanceName != null, "instanceName is null");
     return with(ClientProperty.INSTANCE_NAME, instanceName);
   }
 
@@ -235,7 +235,7 @@ public class ClientConfiguration extends CompositeConfiguration {
    * 
    */
   public ClientConfiguration withInstance(UUID instanceId) {
-    ArgumentChecker.notNull(instanceId);
+    checkArgument(instanceId != null, "instanceId is null");
     return with(ClientProperty.INSTANCE_ID, instanceId.toString());
   }
 
@@ -244,7 +244,7 @@ public class ClientConfiguration extends CompositeConfiguration {
    * 
    */
   public ClientConfiguration withZkHosts(String zooKeepers) {
-    ArgumentChecker.notNull(zooKeepers);
+    checkArgument(zooKeepers != null, "zooKeepers is null");
     return with(ClientProperty.INSTANCE_ZK_HOST, zooKeepers);
   }
 
@@ -286,7 +286,7 @@ public class ClientConfiguration extends CompositeConfiguration {
    * 
    */
   public ClientConfiguration withTruststore(String path, String password, String type) {
-    ArgumentChecker.notNull(path);
+    checkArgument(path != null, "path is null");
     setProperty(ClientProperty.RPC_SSL_TRUSTSTORE_PATH, path);
     if (password != null)
       setProperty(ClientProperty.RPC_SSL_TRUSTSTORE_PASSWORD, password);
@@ -309,7 +309,7 @@ public class ClientConfiguration extends CompositeConfiguration {
    * 
    */
   public ClientConfiguration withKeystore(String path, String password, String type) {
-    ArgumentChecker.notNull(path);
+    checkArgument(path != null, "path is null");
     setProperty(ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH, "true");
     setProperty(ClientProperty.RPC_SSL_KEYSTORE_PATH, path);
     if (password != null)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java b/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
index f2a91ea..064b9be 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
@@ -16,10 +16,10 @@
  */
 package org.apache.accumulo.core.client;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.ArgumentChecker;
 
 /**
  * 
@@ -46,7 +46,7 @@ public class ConditionalWriterConfig {
    * @param auths
    */
   public ConditionalWriterConfig setAuthorizations(Authorizations auths) {
-    ArgumentChecker.notNull(auths);
+    checkArgument(auths != null, "auths is null");
     this.auths = auths;
     return this;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java b/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
index 7a98df2..ca50ce2 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -28,7 +29,6 @@ import java.util.Set;
 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.util.ArgumentChecker;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
@@ -70,7 +70,7 @@ public class IteratorSetting implements Writable {
    *          first)
    */
   public void setPriority(int priority) {
-    ArgumentChecker.strictlyPositive(priority);
+    checkArgument(priority > 0, "property must be strictly positive");
     this.priority = priority;
   }
   
@@ -89,7 +89,7 @@ public class IteratorSetting implements Writable {
    * @param name
    */
   public void setName(String name) {
-    ArgumentChecker.notNull(name);
+    checkArgument(name != null, "name is null");
     this.name = name;
   }
   
@@ -109,7 +109,7 @@ public class IteratorSetting implements Writable {
    * @param iteratorClass
    */
   public void setIteratorClass(String iteratorClass) {
-    ArgumentChecker.notNull(iteratorClass);
+    checkArgument(iteratorClass != null, "iteratorClass is null");
     this.iteratorClass = iteratorClass;
   }
   
@@ -221,7 +221,8 @@ public class IteratorSetting implements Writable {
    *          the value of the option
    */
   public void addOption(String option, String value) {
-    ArgumentChecker.notNull(option, value);
+    checkArgument(option != null, "option is null");
+    checkArgument(value != null, "value is null");
     properties.put(option, value);
   }
   
@@ -233,7 +234,7 @@ public class IteratorSetting implements Writable {
    * @return the value previously associated with the option, or null if no such option existed
    */
   public String removeOption(String option) {
-    ArgumentChecker.notNull(option);
+    checkArgument(option != null, "option is null");
     return properties.remove(option);
   }
   
@@ -244,7 +245,7 @@ public class IteratorSetting implements Writable {
    *          a set of entries to add to the options
    */
   public void addOptions(Set<Entry<String,String>> propertyEntries) {
-    ArgumentChecker.notNull(propertyEntries);
+    checkArgument(propertyEntries != null, "propertyEntries is null");
     for (Entry<String,String> keyValue : propertyEntries) {
       addOption(keyValue.getKey(), keyValue.getValue());
     }
@@ -257,7 +258,7 @@ public class IteratorSetting implements Writable {
    *          a map of entries to add to the options
    */
   public void addOptions(Map<String,String> properties) {
-    ArgumentChecker.notNull(properties);
+    checkArgument(properties != null, "properties is null");
     addOptions(properties.entrySet());
   }
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
index 43b315d..bfcd3b5 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.nio.ByteBuffer;
 import java.util.Collections;
 import java.util.List;
@@ -31,7 +32,6 @@ import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.ByteBufferUtil;
 import org.apache.accumulo.core.util.OpTimer;
 import org.apache.accumulo.core.util.TextUtil;
@@ -134,7 +134,7 @@ public class ZooKeeperInstance implements Instance {
    */
 
   public ZooKeeperInstance(Configuration config) {
-    ArgumentChecker.notNull(config);
+    checkArgument(config != null, "config is null");
     if (config instanceof ClientConfiguration) {
       this.clientConf = (ClientConfiguration)config;
     } else {
@@ -259,7 +259,8 @@ public class ZooKeeperInstance implements Instance {
    * Given a zooCache and instanceId, look up the instance name.
    */
   public static String lookupInstanceName(ZooCache zooCache, UUID instanceId) {
-    ArgumentChecker.notNull(zooCache, instanceId);
+    checkArgument(zooCache != null, "zooCache is null");
+    checkArgument(instanceId != null, "instanceId is null");
     for (String name : zooCache.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {
       String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
       byte[] bytes = zooCache.get(instanceNamePath);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
index f80eee5..fafbc7a 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.admin;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -39,7 +40,6 @@ import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Client;
 import org.apache.accumulo.core.util.AddressUtil;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
@@ -62,14 +62,16 @@ public class InstanceOperationsImpl implements InstanceOperations {
    *          the Credential, containing principal and Authentication Token
    */
   public InstanceOperationsImpl(Instance instance, Credentials credentials) {
-    ArgumentChecker.notNull(instance, credentials);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
     this.instance = instance;
     this.credentials = credentials;
   }
   
   @Override
   public void setProperty(final String property, final String value) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(property, value);
+    checkArgument(property != null, "property is null");
+    checkArgument(value != null, "value is null");
     MasterClient.execute(instance, new ClientExec<MasterClientService.Client>() {
       @Override
       public void execute(MasterClientService.Client client) throws Exception {
@@ -80,7 +82,7 @@ public class InstanceOperationsImpl implements InstanceOperations {
   
   @Override
   public void removeProperty(final String property) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(property);
+    checkArgument(property != null, "property is null");
     MasterClient.execute(instance, new ClientExec<MasterClientService.Client>() {
       @Override
       public void execute(MasterClientService.Client client) throws Exception {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java
index 569a3b6..71efb2e 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.admin;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 import java.util.Collections;
@@ -51,7 +52,6 @@ import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.master.thrift.FateOperation;
 import org.apache.accumulo.core.master.thrift.MasterClientService;
 import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.OpTimer;
 import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.log4j.Level;
@@ -65,7 +65,8 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
   private static final Logger log = Logger.getLogger(TableOperations.class);
 
   public NamespaceOperationsImpl(Instance instance, Credentials credentials, TableOperationsImpl tableOps) {
-    ArgumentChecker.notNull(instance, credentials);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
     this.instance = instance;
     this.credentials = credentials;
     this.tableOps = tableOps;
@@ -81,7 +82,7 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
 
   @Override
   public boolean exists(String namespace) {
-    ArgumentChecker.notNull(namespace);
+    checkArgument(namespace != null, "namespace is null");
 
     OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Checking if namespace " + namespace + " exists...");
     boolean exists = Namespaces.getNameToIdMap(instance).containsKey(namespace);
@@ -91,7 +92,7 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
 
   @Override
   public void create(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceExistsException {
-    ArgumentChecker.notNull(namespace);
+    checkArgument(namespace != null, "namespace is null");
 
     try {
       doNamespaceFateOperation(FateOperation.NAMESPACE_CREATE, Arrays.asList(ByteBuffer.wrap(namespace.getBytes())), Collections.<String,String> emptyMap());
@@ -103,7 +104,7 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
 
   @Override
   public void delete(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceNotEmptyException {
-    ArgumentChecker.notNull(namespace);
+    checkArgument(namespace != null, "namespace is null");
     String namespaceId = Namespaces.getNamespaceId(instance, namespace);
 
     if (namespaceId.equals(Namespaces.ACCUMULO_NAMESPACE_ID) || namespaceId.equals(Namespaces.DEFAULT_NAMESPACE_ID)) {
@@ -139,7 +140,9 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
   @Override
   public void setProperty(final String namespace, final String property, final String value) throws AccumuloException, AccumuloSecurityException,
       NamespaceNotFoundException {
-    ArgumentChecker.notNull(namespace, property, value);
+    checkArgument(namespace != null, "namespace is null");
+    checkArgument(property != null, "property is null");
+    checkArgument(value != null, "value is null");
 
     MasterClient.executeNamespace(instance, new ClientExec<MasterClientService.Client>() {
       @Override
@@ -151,7 +154,8 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
 
   @Override
   public void removeProperty(final String namespace, final String property) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
-    ArgumentChecker.notNull(namespace, property);
+    checkArgument(namespace != null, "namespace is null");
+    checkArgument(property != null, "property is null");
 
     MasterClient.executeNamespace(instance, new ClientExec<MasterClientService.Client>() {
       @Override
@@ -163,7 +167,7 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
 
   @Override
   public Iterable<Entry<String,String>> getProperties(final String namespace) throws AccumuloException, NamespaceNotFoundException {
-    ArgumentChecker.notNull(namespace);
+    checkArgument(namespace != null, "namespace is null");
     try {
       return ServerClient.executeRaw(instance, new ClientExecReturn<Map<String,String>,ClientService.Client>() {
         @Override
@@ -195,7 +199,9 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
   @Override
   public boolean testClassLoad(final String namespace, final String className, final String asTypeName) throws NamespaceNotFoundException, AccumuloException,
       AccumuloSecurityException {
-    ArgumentChecker.notNull(namespace, className, asTypeName);
+    checkArgument(namespace != null, "namespace is null");
+    checkArgument(className != null, "className is null");
+    checkArgument(asTypeName != null, "asTypeName is null");
 
     try {
       return ServerClient.executeRaw(instance, new ClientExecReturn<Boolean,ClientService.Client>() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java
index 17feb9b..f97e2b6 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.admin;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.nio.ByteBuffer;
 import java.util.Set;
 
@@ -37,7 +38,6 @@ import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.security.NamespacePermission;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.ByteBufferUtil;
 import org.apache.accumulo.trace.instrument.Tracer;
 
@@ -87,7 +87,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
   }
 
   public SecurityOperationsImpl(Instance instance, Credentials credentials) {
-    ArgumentChecker.notNull(instance, credentials);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
     this.instance = instance;
     this.credentials = credentials;
   }
@@ -101,7 +102,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public void createLocalUser(final String principal, final PasswordToken password) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, password);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(password != null, "password is null");
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {
@@ -118,7 +120,7 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public void dropLocalUser(final String principal) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal);
+    checkArgument(principal != null, "principal is null");
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {
@@ -135,7 +137,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public boolean authenticateUser(final String principal, final AuthenticationToken token) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, token);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(token != null, "token is null");
     final Credentials toAuth = new Credentials(principal, token);
     return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
       @Override
@@ -153,7 +156,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public void changeLocalUserPassword(final String principal, final PasswordToken token) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, token);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(token != null, "token is null");
     final Credentials toChange = new Credentials(principal, token);
     execute(new ClientExec<ClientService.Client>() {
       @Override
@@ -168,7 +172,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public void changeUserAuthorizations(final String principal, final Authorizations authorizations) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, authorizations);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(authorizations != null, "authorizations is null");
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {
@@ -180,7 +185,7 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public Authorizations getUserAuthorizations(final String principal) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal);
+    checkArgument(principal != null, "principal is null");
     return execute(new ClientExecReturn<Authorizations,ClientService.Client>() {
       @Override
       public Authorizations execute(ClientService.Client client) throws Exception {
@@ -191,7 +196,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public boolean hasSystemPermission(final String principal, final SystemPermission perm) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, perm);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(perm != null, "perm is null");
     return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
       @Override
       public Boolean execute(ClientService.Client client) throws Exception {
@@ -202,7 +208,9 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public boolean hasTablePermission(final String principal, final String table, final TablePermission perm) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, table, perm);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(table != null, "table is null");
+    checkArgument(perm != null, "perm is null");
     return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
       @Override
       public Boolean execute(ClientService.Client client) throws Exception {
@@ -214,7 +222,9 @@ public class SecurityOperationsImpl implements SecurityOperations {
   @Override
   public boolean hasNamespacePermission(final String principal, final String namespace, final NamespacePermission permission) throws AccumuloException,
       AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, namespace, permission);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(namespace != null, "namespace is null");
+    checkArgument(permission != null, "permission is null");
     return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
       @Override
       public Boolean execute(ClientService.Client client) throws Exception {
@@ -225,7 +235,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public void grantSystemPermission(final String principal, final SystemPermission permission) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, permission);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(permission != null, "permission is null");
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {
@@ -237,7 +248,9 @@ public class SecurityOperationsImpl implements SecurityOperations {
   @Override
   public void grantTablePermission(final String principal, final String table, final TablePermission permission) throws AccumuloException,
       AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, table, permission);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(table != null, "table is null");
+    checkArgument(permission != null, "permission is null");
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {
@@ -249,7 +262,9 @@ public class SecurityOperationsImpl implements SecurityOperations {
   @Override
   public void grantNamespacePermission(final String principal, final String namespace, final NamespacePermission permission) throws AccumuloException,
       AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, namespace, permission);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(namespace != null, "namespace is null");
+    checkArgument(permission != null, "permission is null");
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {
@@ -260,7 +275,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
 
   @Override
   public void revokeSystemPermission(final String principal, final SystemPermission permission) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, permission);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(permission != null, "permission is null");
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {
@@ -272,7 +288,9 @@ public class SecurityOperationsImpl implements SecurityOperations {
   @Override
   public void revokeTablePermission(final String principal, final String table, final TablePermission permission) throws AccumuloException,
       AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, table, permission);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(table != null, "table is null");
+    checkArgument(permission != null, "permission is null");
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {
@@ -284,7 +302,9 @@ public class SecurityOperationsImpl implements SecurityOperations {
   @Override
   public void revokeNamespacePermission(final String principal, final String namespace, final NamespacePermission permission) throws AccumuloException,
       AccumuloSecurityException {
-    ArgumentChecker.notNull(principal, namespace, permission);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(namespace != null, "namespace is null");
+    checkArgument(permission != null, "permission is null");
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsHelper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsHelper.java b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsHelper.java
index 843f572..f9bc6e7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsHelper.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsHelper.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.admin;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Map;
@@ -29,7 +30,6 @@ import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
-import org.apache.accumulo.core.util.ArgumentChecker;
 
 public abstract class TableOperationsHelper implements TableOperations {
 
@@ -41,7 +41,9 @@ public abstract class TableOperationsHelper implements TableOperations {
   @Override
   public void attachIterator(String tableName, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException,
       TableNotFoundException {
-    ArgumentChecker.notNull(tableName, setting, scopes);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(setting != null, "setting is null");
+    checkArgument(scopes != null, "scopes is null");
     checkIteratorConflicts(tableName, setting, scopes);
     for (IteratorScope scope : scopes) {
       String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase(), setting.getName());
@@ -71,7 +73,9 @@ public abstract class TableOperationsHelper implements TableOperations {
   @Override
   public IteratorSetting getIteratorSetting(String tableName, String name, IteratorScope scope) throws AccumuloSecurityException, AccumuloException,
       TableNotFoundException {
-    ArgumentChecker.notNull(tableName, name, scope);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(name != null, "name is null");
+    checkArgument(scope != null, "scope is null");
     int priority = -1;
     String classname = null;
     Map<String,String> settings = new HashMap<String,String>();
@@ -116,7 +120,9 @@ public abstract class TableOperationsHelper implements TableOperations {
 
   @Override
   public void checkIteratorConflicts(String tableName, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloException, TableNotFoundException {
-    ArgumentChecker.notNull(tableName, setting, scopes);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(setting != null, "setting is null");
+    checkArgument(scopes != null, "scopes is null");
     for (IteratorScope scope : scopes) {
       String scopeStr = String.format("%s%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase());
       String nameStr = String.format("%s.%s", scopeStr, setting.getName());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index 3042f4b..97f3aff 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.admin;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -97,7 +98,6 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.ByteBufferUtil;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.LocalityGroupUtil;
@@ -136,7 +136,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
    *          the username/password for this connection
    */
   public TableOperationsImpl(Instance instance, Credentials credentials) {
-    ArgumentChecker.notNull(instance, credentials);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
     this.instance = instance;
     this.credentials = credentials;
   }
@@ -163,7 +164,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
    */
   @Override
   public boolean exists(String tableName) {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     if (tableName.equals(MetadataTable.NAME) || tableName.equals(RootTable.NAME))
       return true;
 
@@ -211,7 +212,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
    */
   @Override
   public void create(String tableName, boolean limitVersion, TimeType timeType) throws AccumuloException, AccumuloSecurityException, TableExistsException {
-    ArgumentChecker.notNull(tableName, timeType);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(timeType != null, "timeType is null");
 
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), ByteBuffer.wrap(timeType.name().getBytes(Constants.UTF8)));
 
@@ -527,7 +529,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
   @Override
   public void merge(String tableName, Text start, Text end) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
 
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     ByteBuffer EMPTY = ByteBuffer.allocate(0);
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
         end == null ? EMPTY : TextUtil.getByteBuffer(end));
@@ -543,7 +545,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
   @Override
   public void deleteRows(String tableName, Text start, Text end) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
 
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     ByteBuffer EMPTY = ByteBuffer.allocate(0);
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
         end == null ? EMPTY : TextUtil.getByteBuffer(end));
@@ -564,7 +566,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
   @Override
   public Collection<Text> listSplits(String tableName) throws TableNotFoundException, AccumuloSecurityException {
 
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
 
     String tableId = Tables.getTableId(instance, tableName);
 
@@ -668,7 +670,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
    */
   @Override
   public void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
 
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)));
     Map<String,String> opts = new HashMap<String,String>();
@@ -686,7 +688,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
   public void clone(String srcTableName, String newTableName, boolean flush, Map<String,String> propertiesToSet, Set<String> propertiesToExclude)
       throws AccumuloSecurityException, TableNotFoundException, AccumuloException, TableExistsException {
 
-    ArgumentChecker.notNull(srcTableName, newTableName);
+    checkArgument(srcTableName != null, "srcTableName is null");
+    checkArgument(newTableName != null, "newTableName is null");
 
     String srcTableId = Tables.getTableId(instance, srcTableName);
 
@@ -765,7 +768,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
    */
   @Override
   public void flush(String tableName, Text start, Text end, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
 
     String tableId = Tables.getTableId(instance, tableName);
     _flush(tableId, start, end, wait);
@@ -780,7 +783,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
   @Override
   public void compact(String tableName, Text start, Text end, List<IteratorSetting> iterators, boolean flush, boolean wait) throws AccumuloSecurityException,
       TableNotFoundException, AccumuloException {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     ByteBuffer EMPTY = ByteBuffer.allocate(0);
 
     String tableId = Tables.getTableId(instance, tableName);
@@ -893,7 +896,9 @@ public class TableOperationsImpl extends TableOperationsHelper {
    */
   @Override
   public void setProperty(final String tableName, final String property, final String value) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(tableName, property, value);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(property != null, "property is null");
+    checkArgument(value != null, "value is null");
     try {
       MasterClient.executeTable(instance, new ClientExec<MasterClientService.Client>() {
         @Override
@@ -920,7 +925,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
    */
   @Override
   public void removeProperty(final String tableName, final String property) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(tableName, property);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(property != null, "property is null");
     try {
       MasterClient.executeTable(instance, new ClientExec<MasterClientService.Client>() {
         @Override
@@ -944,7 +950,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
    */
   @Override
   public Iterable<Entry<String,String>> getProperties(final String tableName) throws AccumuloException, TableNotFoundException {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     try {
       return ServerClient.executeRaw(instance, new ClientExecReturn<Map<String,String>,ClientService.Client>() {
         @Override
@@ -1077,7 +1083,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
   @Override
   public Set<Range> splitRangeByTablets(String tableName, Range range, int maxSplits) throws AccumuloException, AccumuloSecurityException,
       TableNotFoundException {
-    ArgumentChecker.notNull(tableName, range);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(range != null, "range is null");
     if (maxSplits < 1)
       throw new IllegalArgumentException("maximum splits must be >= 1");
     if (maxSplits == 1)
@@ -1168,7 +1175,9 @@ public class TableOperationsImpl extends TableOperationsHelper {
   @Override
   public void importDirectory(String tableName, String dir, String failureDir, boolean setTime) throws IOException, AccumuloSecurityException,
       TableNotFoundException, AccumuloException {
-    ArgumentChecker.notNull(tableName, dir, failureDir);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(dir != null, "dir is null");
+    checkArgument(failureDir != null, "failureDir is null");
     // check for table existance
     Tables.getTableId(instance, tableName);
 
@@ -1322,7 +1331,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
   @Override
   public void offline(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
 
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     String tableId = Tables.getTableId(instance, tableName);
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(Constants.UTF8)));
     Map<String,String> opts = new HashMap<String,String>();
@@ -1355,7 +1364,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
    */
   @Override
   public void online(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     String tableId = Tables.getTableId(instance, tableName);
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(Constants.UTF8)));
     Map<String,String> opts = new HashMap<String,String>();
@@ -1381,7 +1390,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
    */
   @Override
   public void clearLocatorCache(String tableName) throws TableNotFoundException {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     TabletLocator tabLocator = TabletLocator.getLocator(instance, new Text(Tables.getTableId(instance, tableName)));
     tabLocator.invalidateCache();
   }
@@ -1399,7 +1408,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
   @Override
   public Text getMaxRow(String tableName, Authorizations auths, Text startRow, boolean startInclusive, Text endRow, boolean endInclusive)
       throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(tableName, auths);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(auths != null, "auths is null");
     Scanner scanner = instance.getConnector(credentials.getPrincipal(), credentials.getToken()).createScanner(tableName, auths);
     return FindMax.findMax(scanner, startRow, startInclusive, endRow, endInclusive);
   }
@@ -1478,7 +1488,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
 
   @Override
   public void importTable(String tableName, String importDir) throws TableExistsException, AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(tableName, importDir);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(importDir != null, "importDir is null");
 
     try {
       importDir = checkPath(importDir, "Table", "").toString();
@@ -1516,7 +1527,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
 
   @Override
   public void exportTable(String tableName, String exportDir) throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(tableName, exportDir);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(exportDir != null, "exportDir is null");
 
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), ByteBuffer.wrap(exportDir.getBytes(Constants.UTF8)));
 
@@ -1533,7 +1545,9 @@ public class TableOperationsImpl extends TableOperationsHelper {
   @Override
   public boolean testClassLoad(final String tableName, final String className, final String asTypeName) throws TableNotFoundException, AccumuloException,
       AccumuloSecurityException {
-    ArgumentChecker.notNull(tableName, className, asTypeName);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(className != null, "className is null");
+    checkArgument(asTypeName != null, "asTypeName is null");
 
     try {
       return ServerClient.executeRaw(instance, new ClientExecReturn<Boolean,ClientService.Client>() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/BatchWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/BatchWriterImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/BatchWriterImpl.java
index 829a987..ac41af9 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/BatchWriterImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/BatchWriterImpl.java
@@ -16,13 +16,13 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 
 public class BatchWriterImpl implements BatchWriter {
   
@@ -30,7 +30,9 @@ public class BatchWriterImpl implements BatchWriter {
   private TabletServerBatchWriter bw;
   
   public BatchWriterImpl(Instance instance, Credentials credentials, String table, BatchWriterConfig config) {
-    ArgumentChecker.notNull(instance, credentials, table);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
+    checkArgument(table != null, "table is null");
     if (config == null)
       config = new BatchWriterConfig();
     this.table = table;
@@ -39,13 +41,13 @@ public class BatchWriterImpl implements BatchWriter {
   
   @Override
   public void addMutation(Mutation m) throws MutationsRejectedException {
-    ArgumentChecker.notNull(m);
+    checkArgument(m != null, "m is null");
     bw.addMutation(table, m);
   }
   
   @Override
   public void addMutations(Iterable<Mutation> iterable) throws MutationsRejectedException {
-    ArgumentChecker.notNull(iterable);
+    checkArgument(iterable != null, "iterable is null");
     bw.addMutation(table, iterable.iterator());
   }
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
index 7d9d3ab..c006b9f 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
@@ -18,6 +18,7 @@ package org.apache.accumulo.core.client.impl;
 
 import java.util.concurrent.TimeUnit;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchDeleter;
@@ -45,7 +46,6 @@ import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.trace.instrument.Tracer;
 
 public class ConnectorImpl extends Connector {
@@ -57,7 +57,8 @@ public class ConnectorImpl extends Connector {
   private InstanceOperations instanceops = null;
 
   public ConnectorImpl(final Instance instance, Credentials cred) throws AccumuloException, AccumuloSecurityException {
-    ArgumentChecker.notNull(instance, cred);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(cred != null, "cred is null");
     if (cred.getToken().isDestroyed())
       throw new AccumuloSecurityException(cred.getPrincipal(), SecurityErrorCode.TOKEN_EXPIRED);
 
@@ -94,7 +95,8 @@ public class ConnectorImpl extends Connector {
 
   @Override
   public BatchScanner createBatchScanner(String tableName, Authorizations authorizations, int numQueryThreads) throws TableNotFoundException {
-    ArgumentChecker.notNull(tableName, authorizations);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(authorizations != null, "authorizations is null");
     return new TabletServerBatchReader(instance, credentials, getTableId(tableName), authorizations, numQueryThreads);
   }
 
@@ -102,7 +104,8 @@ public class ConnectorImpl extends Connector {
   @Override
   public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, long maxMemory, long maxLatency,
       int maxWriteThreads) throws TableNotFoundException {
-    ArgumentChecker.notNull(tableName, authorizations);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(authorizations != null, "authorizations is null");
     return new TabletServerBatchDeleter(instance, credentials, getTableId(tableName), authorizations, numQueryThreads, new BatchWriterConfig()
         .setMaxMemory(maxMemory).setMaxLatency(maxLatency, TimeUnit.MILLISECONDS).setMaxWriteThreads(maxWriteThreads));
   }
@@ -110,21 +113,22 @@ public class ConnectorImpl extends Connector {
   @Override
   public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, BatchWriterConfig config)
       throws TableNotFoundException {
-    ArgumentChecker.notNull(tableName, authorizations);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(authorizations != null, "authorizations is null");
     return new TabletServerBatchDeleter(instance, credentials, getTableId(tableName), authorizations, numQueryThreads, config);
   }
 
   @Deprecated
   @Override
   public BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency, int maxWriteThreads) throws TableNotFoundException {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     return new BatchWriterImpl(instance, credentials, getTableId(tableName), new BatchWriterConfig().setMaxMemory(maxMemory)
         .setMaxLatency(maxLatency, TimeUnit.MILLISECONDS).setMaxWriteThreads(maxWriteThreads));
   }
 
   @Override
   public BatchWriter createBatchWriter(String tableName, BatchWriterConfig config) throws TableNotFoundException {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     return new BatchWriterImpl(instance, credentials, getTableId(tableName), config);
   }
 
@@ -147,7 +151,8 @@ public class ConnectorImpl extends Connector {
 
   @Override
   public Scanner createScanner(String tableName, Authorizations authorizations) throws TableNotFoundException {
-    ArgumentChecker.notNull(tableName, authorizations);
+    checkArgument(tableName != null, "tableName is null");
+    checkArgument(authorizations != null, "authorizations is null");
     return new ScannerImpl(instance, credentials, getTableId(tableName), authorizations);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java b/core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java
index 7356663..1fa8f12 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.net.UnknownHostException;
 import java.util.List;
 
@@ -27,7 +28,6 @@ import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
 import org.apache.accumulo.core.master.thrift.MasterClientService;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.log4j.Logger;
@@ -38,7 +38,7 @@ public class MasterClient {
   private static final Logger log = Logger.getLogger(MasterClient.class);
 
   public static MasterClientService.Client getConnectionWithRetry(Instance instance) {
-    ArgumentChecker.notNull(instance);
+    checkArgument(instance != null, "instance is null");
 
     while (true) {
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
index f2478d9..4312131 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
@@ -34,7 +35,6 @@ import org.apache.accumulo.core.client.TableOfflineException;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.log4j.Logger;
 
 import com.google.common.cache.CacheBuilder;
@@ -60,7 +60,7 @@ public class MultiTableBatchWriterImpl implements MultiTableBatchWriter {
 
     @Override
     public void addMutation(Mutation m) throws MutationsRejectedException {
-      ArgumentChecker.notNull(m);
+      checkArgument(m != null, "m is null");
       bw.addMutation(table, m);
     }
 
@@ -111,7 +111,10 @@ public class MultiTableBatchWriterImpl implements MultiTableBatchWriter {
   }
 
   public MultiTableBatchWriterImpl(Instance instance, Credentials credentials, BatchWriterConfig config, long cacheTime, TimeUnit cacheTimeUnit) {
-    ArgumentChecker.notNull(instance, credentials, config, cacheTimeUnit);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
+    checkArgument(config != null, "config is null");
+    checkArgument(cacheTimeUnit != null, "cacheTimeUnit is null");
     this.instance = instance;
     this.bw = new TabletServerBatchWriter(instance, credentials, config);
     tableWriters = new ConcurrentHashMap<String,BatchWriter>();
@@ -191,7 +194,7 @@ public class MultiTableBatchWriterImpl implements MultiTableBatchWriter {
 
   @Override
   public BatchWriter getBatchWriter(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-    ArgumentChecker.notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
 
     while (true) {
       long cacheResetCount = Tables.getCacheResetCount();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java b/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
index c134c04..6b5f966 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
@@ -26,7 +26,7 @@ import java.util.TreeMap;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.NamespaceNotFoundException;
-import org.apache.accumulo.core.util.ArgumentChecker.Validator;
+import org.apache.accumulo.core.util.Validator;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java b/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
index c60e153..d37cb9c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -60,7 +61,6 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.Da
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.LocalityGroupUtil;
 import org.apache.accumulo.core.util.Pair;
@@ -354,7 +354,10 @@ public class OfflineScanner extends ScannerOptions implements Scanner {
   private Text tableId;
   
   public OfflineScanner(Instance instance, Credentials credentials, String tableId, Authorizations authorizations) {
-    ArgumentChecker.notNull(instance, credentials, tableId, authorizations);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
+    checkArgument(tableId != null, "tableId is null");
+    checkArgument(authorizations != null, "authorizations is null");
     this.instance = instance;
     this.credentials = credentials;
     this.tableId = new Text(tableId);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
index 6be55b6..670782e 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.util.Iterator;
 import java.util.Map.Entry;
 import java.util.concurrent.TimeUnit;
@@ -28,7 +29,6 @@ import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.hadoop.io.Text;
 
 /**
@@ -58,7 +58,10 @@ public class ScannerImpl extends ScannerOptions implements Scanner {
   private long readaheadThreshold = Constants.SCANNER_DEFAULT_READAHEAD_THRESHOLD;
   
   public ScannerImpl(Instance instance, Credentials credentials, String table, Authorizations authorizations) {
-    ArgumentChecker.notNull(instance, credentials, table, authorizations);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
+    checkArgument(table != null, "table is null");
+    checkArgument(authorizations != null, "authorizations is null");
     this.instance = instance;
     this.credentials = credentials;
     this.table = new Text(table);
@@ -70,7 +73,7 @@ public class ScannerImpl extends ScannerOptions implements Scanner {
   
   @Override
   public synchronized void setRange(Range range) {
-    ArgumentChecker.notNull(range);
+    checkArgument(range != null, "range is null");
     this.range = range;
   }
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
----------------------------------------------------------------------
diff --git 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
index 7641755..9726266 100644
--- 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
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -34,7 +35,6 @@ import org.apache.accumulo.core.data.Column;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.data.thrift.IterInfo;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.TextUtil;
 import org.apache.hadoop.io.Text;
 
@@ -61,7 +61,7 @@ public class ScannerOptions implements ScannerBase {
    */
   @Override
   public synchronized void addScanIterator(IteratorSetting si) {
-    ArgumentChecker.notNull(si);
+    checkArgument(si != null, "si is null");
     if (serverSideIteratorList.size() == 0)
       serverSideIteratorList = new ArrayList<IterInfo>();
     
@@ -88,7 +88,7 @@ public class ScannerOptions implements ScannerBase {
   
   @Override
   public synchronized void removeScanIterator(String iteratorName) {
-    ArgumentChecker.notNull(iteratorName);
+    checkArgument(iteratorName != null, "iteratorName is null");
     // if no iterators are set, we don't have it, so it is already removed
     if (serverSideIteratorList.size() == 0)
       return;
@@ -108,7 +108,9 @@ public class ScannerOptions implements ScannerBase {
    */
   @Override
   public synchronized void updateScanIteratorOption(String iteratorName, String key, String value) {
-    ArgumentChecker.notNull(iteratorName, key, value);
+    checkArgument(iteratorName != null, "iteratorName is null");
+    checkArgument(key != null, "key is null");
+    checkArgument(value != null, "value is null");
     if (serverSideIteratorOptions.size() == 0)
       serverSideIteratorOptions = new HashMap<String,Map<String,String>>();
     
@@ -129,20 +131,21 @@ public class ScannerOptions implements ScannerBase {
   
   @Override
   public synchronized void fetchColumnFamily(Text col) {
-    ArgumentChecker.notNull(col);
+    checkArgument(col != null, "col is null");
     Column c = new Column(TextUtil.getBytes(col), null, null);
     fetchedColumns.add(c);
   }
   
   @Override
   public synchronized void fetchColumn(Text colFam, Text colQual) {
-    ArgumentChecker.notNull(colFam, colQual);
+    checkArgument(colFam != null, "colFam is null");
+    checkArgument(colQual != null, "colQual is null");
     Column c = new Column(TextUtil.getBytes(colFam), TextUtil.getBytes(colQual), null);
     fetchedColumns.add(c);
   }
   
   public synchronized void fetchColumn(Column column) {
-    ArgumentChecker.notNull(column);
+    checkArgument(column != null, "column is null");
     fetchedColumns.add(column);
   }
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
index bf3e1bc..ae62ab7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
@@ -29,7 +30,6 @@ import org.apache.accumulo.core.client.impl.thrift.ClientService.Client;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.ServerServices;
 import org.apache.accumulo.core.util.SslConnectionParams;
@@ -130,7 +130,7 @@ public class ServerClient {
   }
   
   public static Pair<String,ClientService.Client> getConnection(Instance instance, boolean preferCachedConnections, long rpcTimeout) throws TTransportException {
-    ArgumentChecker.notNull(instance);
+    checkArgument(instance != null, "instance is null");
     // create list of servers
     ArrayList<ThriftTransportKey> servers = new ArrayList<ThriftTransportKey>();
     

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
index 404aa32..10ef48f 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.security.SecurityPermission;
 import java.util.HashMap;
 import java.util.List;
@@ -31,8 +32,7 @@ import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
-import org.apache.accumulo.core.util.ArgumentChecker;
-import org.apache.accumulo.core.util.ArgumentChecker.Validator;
+import org.apache.accumulo.core.util.Validator;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
@@ -293,7 +293,8 @@ public class Tables {
    * @throws IllegalArgumentException if the table doesn't exist in ZooKeeper
    */
   public static String getNamespaceId(Instance instance, String tableId) throws IllegalArgumentException {
-    ArgumentChecker.notNull(instance, tableId);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(tableId != null, "tableId is null");
     
     ZooCache zc = getZooCache(instance);
     byte[] n = zc.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_NAMESPACE);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
index e396d82..6c57c29 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -35,7 +36,6 @@ import org.apache.accumulo.core.metadata.MetadataLocationObtainer;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.hadoop.io.Text;
 
 public abstract class TabletLocator {
@@ -155,7 +155,9 @@ public abstract class TabletLocator {
     public final String tablet_session;
     
     public TabletLocation(KeyExtent tablet_extent, String tablet_location, String session) {
-      ArgumentChecker.notNull(tablet_extent, tablet_location, session);
+      checkArgument(tablet_extent != null, "tablet_extent is null");
+      checkArgument(tablet_location != null, "tablet_location is null");
+      checkArgument(session != null, "session is null");
       this.tablet_extent = tablet_extent;
       this.tablet_location = dedupeLocation(tablet_location);
       this.tablet_session = dedupeLocation(session);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
index aee8c21..379ee80 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -29,7 +30,6 @@ import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.SimpleThreadPool;
 import org.apache.log4j.Logger;
 
@@ -56,7 +56,10 @@ public class TabletServerBatchReader extends ScannerOptions implements BatchScan
   private final int batchReaderInstance = getNextBatchReaderInstance();
   
   public TabletServerBatchReader(Instance instance, Credentials credentials, String table, Authorizations authorizations, int numQueryThreads) {
-    ArgumentChecker.notNull(instance, credentials, table, authorizations);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
+    checkArgument(table != null, "table is null");
+    checkArgument(authorizations != null, "authorizations is null");
     this.instance = instance;
     this.credentials = credentials;
     this.authorizations = authorizations;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java
index 2816da7..3791d63 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
-import org.apache.accumulo.core.util.ArgumentChecker;
+import static com.google.common.base.Preconditions.checkArgument;
 import org.apache.accumulo.core.util.SslConnectionParams;
 
 class ThriftTransportKey {
@@ -28,7 +28,7 @@ class ThriftTransportKey {
   private int hash = -1;
   
   ThriftTransportKey(String location, long timeout, SslConnectionParams sslParams) {
-    ArgumentChecker.notNull(location);
+    checkArgument(location != null, "location is null");
     String[] locationAndPort = location.split(":", 2);
     if (locationAndPort.length == 2) {
       this.location = locationAndPort[0];

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java b/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
index 950eb4d..8872059 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
@@ -30,7 +31,6 @@ import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException;
 import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.trace.instrument.Tracer;
@@ -49,7 +49,9 @@ public class Writer {
   private Text table;
   
   public Writer(Instance instance, Credentials credentials, Text table) {
-    ArgumentChecker.notNull(instance, credentials, table);
+    checkArgument(instance != null, "instance is null");
+    checkArgument(credentials != null, "credentials is null");
+    checkArgument(table != null, "table is null");
     this.instance = instance;
     this.credentials = credentials;
     this.table = table;
@@ -61,7 +63,10 @@ public class Writer {
   
   private static void updateServer(Instance instance, Mutation m, KeyExtent extent, String server, Credentials ai, AccumuloConfiguration configuration)
       throws TException, NotServingTabletException, ConstraintViolationException, AccumuloSecurityException {
-    ArgumentChecker.notNull(m, extent, server, ai);
+    checkArgument(m != null, "m is null");
+    checkArgument(extent != null, "extent is null");
+    checkArgument(server != null, "server is null");
+    checkArgument(ai != null, "ai is null");
     
     TabletClientService.Iface client = null;
     try {
@@ -79,7 +84,7 @@ public class Writer {
   }
   
   public void update(Mutation m) throws AccumuloException, AccumuloSecurityException, ConstraintViolationException, TableNotFoundException {
-    ArgumentChecker.notNull(m);
+    checkArgument(m != null, "m is null");
     
     if (m.size() == 0)
       throw new IllegalArgumentException("Can not add empty mutations");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/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 cf861ce..fef272e 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
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client.mapreduce.lib.util;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -29,7 +30,6 @@ 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.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;
@@ -122,7 +122,8 @@ public class ConfiguratorBase {
     if (isConnectorInfoSet(implementingClass, conf))
       throw new IllegalStateException("Connector info for " + implementingClass.getSimpleName() + " can only be set once per job");
 
-    ArgumentChecker.notNull(principal, token);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(token != null, "token is null");
     conf.setBoolean(enumToConfKey(implementingClass, ConnectorInfo.IS_CONFIGURED), true);
     conf.set(enumToConfKey(implementingClass, ConnectorInfo.PRINCIPAL), principal);
     conf.set(enumToConfKey(implementingClass, ConnectorInfo.TOKEN),
@@ -151,7 +152,8 @@ public class ConfiguratorBase {
     if (isConnectorInfoSet(implementingClass, conf))
       throw new IllegalStateException("Connector info for " + implementingClass.getSimpleName() + " can only be set once per job");
 
-    ArgumentChecker.notNull(principal, tokenFile);
+    checkArgument(principal != null, "principal is null");
+    checkArgument(tokenFile != null, "tokenFile is null");
 
     try {
       DistributedCacheHelper.addCacheFile(new URI(tokenFile), conf);
@@ -283,7 +285,8 @@ public class ConfiguratorBase {
 
   @Deprecated
   public static void setZooKeeperInstance(Class<?> implementingClass, Configuration conf, String instanceName, String zooKeepers) {
-    ArgumentChecker.notNull(instanceName, zooKeepers);
+    checkArgument(instanceName != null, "instanceName is null");
+    checkArgument(zooKeepers != null, "zooKeepers is null");
     setZooKeeperInstance(implementingClass, conf, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers));
   }
 
@@ -325,7 +328,7 @@ public class ConfiguratorBase {
       throw new IllegalStateException("Instance info can only be set once per job; it has already been configured with " + conf.get(key));
     conf.set(key, "MockInstance");
 
-    ArgumentChecker.notNull(instanceName);
+    checkArgument(instanceName != null, "instanceName is null");
     conf.set(enumToConfKey(implementingClass, InstanceOpts.NAME), instanceName);
   }
 
@@ -372,7 +375,7 @@ public class ConfiguratorBase {
    * @since 1.5.0
    */
   public static void setLogLevel(Class<?> implementingClass, Configuration conf, Level level) {
-    ArgumentChecker.notNull(level);
+    checkArgument(level != null, "level is null");
     Logger.getLogger(implementingClass).setLevel(level);
     conf.setInt(enumToConfKey(implementingClass, GeneralOpts.LOG_LEVEL), level.toInt());
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java
index c76a185..89b5234 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.client.mapreduce.lib.util;
 
-import static org.apache.accumulo.core.util.ArgumentChecker.notNull;
+import static com.google.common.base.Preconditions.checkArgument;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -106,7 +106,7 @@ public class InputConfigurator extends ConfiguratorBase {
    * @since 1.5.0
    */
   public static void setInputTableName(Class<?> implementingClass, Configuration conf, String tableName) {
-    notNull(tableName);
+    checkArgument(tableName != null, "tableName is null");
     conf.set(enumToConfKey(implementingClass, ScanOpts.TABLE_NAME), tableName);
   }
 
@@ -169,7 +169,7 @@ public class InputConfigurator extends ConfiguratorBase {
    * @since 1.5.0
    */
   public static void setRanges(Class<?> implementingClass, Configuration conf, Collection<Range> ranges) {
-    notNull(ranges);
+    checkArgument(ranges != null, "ranges is null");
 
     ArrayList<String> rangeStrings = new ArrayList<String>(ranges.size());
     try {
@@ -259,13 +259,13 @@ public class InputConfigurator extends ConfiguratorBase {
    * @since 1.5.0
    */
   public static void fetchColumns(Class<?> implementingClass, Configuration conf, Collection<Pair<Text,Text>> columnFamilyColumnQualifierPairs) {
-    notNull(columnFamilyColumnQualifierPairs);
+    checkArgument(columnFamilyColumnQualifierPairs != null, "columnFamilyColumnQualifierPairs is null");
     String[] columnStrings = serializeColumns(columnFamilyColumnQualifierPairs);
     conf.setStrings(enumToConfKey(implementingClass, ScanOpts.COLUMNS), columnStrings);
   }
 
   public static String[] serializeColumns(Collection<Pair<Text,Text>> columnFamilyColumnQualifierPairs) {
-    notNull(columnFamilyColumnQualifierPairs);
+    checkArgument(columnFamilyColumnQualifierPairs != null, "columnFamilyColumnQualifierPairs is null");
     ArrayList<String> columnStrings = new ArrayList<String>(columnFamilyColumnQualifierPairs.size());
     for (Pair<Text,Text> column : columnFamilyColumnQualifierPairs) {
 
@@ -293,7 +293,7 @@ public class InputConfigurator extends ConfiguratorBase {
    * @see #fetchColumns(Class, Configuration, Collection)
    */
   public static Set<Pair<Text,Text>> getFetchedColumns(Class<?> implementingClass, Configuration conf) {
-    notNull(conf);
+    checkArgument(conf != null, "conf is null");
     String confValue = conf.get(enumToConfKey(implementingClass, ScanOpts.COLUMNS));
     List<String> serialized = new ArrayList<String>();
     if (confValue != null) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b94e308e/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 d89a263..f2c5c85 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
@@ -16,10 +16,11 @@
  */
 package org.apache.accumulo.core.client.mock;
 
+import static com.google.common.base.Preconditions.checkArgument;
+
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.data.Mutation;
-import org.apache.accumulo.core.util.ArgumentChecker;
 
 public class MockBatchWriter implements BatchWriter {
   
@@ -33,13 +34,13 @@ public class MockBatchWriter implements BatchWriter {
   
   @Override
   public void addMutation(Mutation m) throws MutationsRejectedException {
-    ArgumentChecker.notNull(m);
+    checkArgument(m != null, "m is null");
     acu.addMutation(tablename, m);
   }
   
   @Override
   public void addMutations(Iterable<Mutation> iterable) throws MutationsRejectedException {
-    ArgumentChecker.notNull(iterable);
+    checkArgument(iterable != null, "iterable is null");
     for (Mutation m : iterable) {
       acu.addMutation(tablename, m);
     }


Mime
View raw message