accumulo-commits mailing list archives

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

* Favor built-ins over Guava
* Avoid boxing constructors
* Make arg check methods static imports for readability/consistency and to ease
  future migrations, if necessary.


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

Branch: refs/heads/1.7
Commit: b639709e02a2534ca2cf60aafb8b0f2f7111b550
Parents: 317178d
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Wed Feb 3 10:48:19 2016 -0500
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Wed Feb 3 10:48:19 2016 -0500

----------------------------------------------------------------------
 .../core/client/admin/CompactionConfig.java     |  6 ++--
 .../client/admin/CompactionStrategyConfig.java  |  8 +++---
 .../client/admin/DelegationTokenConfig.java     |  6 ++--
 .../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/ThriftTransportKey.java    |  6 ++--
 .../core/client/lexicoder/AbstractEncoder.java  | 15 +++++-----
 .../AccumuloMultiTableInputFormat.java          |  4 +--
 .../mapreduce/impl/DelegationTokenStub.java     |  4 +--
 .../mapreduce/lib/impl/ConfiguratorBase.java    | 10 +++----
 .../core/client/mock/MockTableOperations.java   |  8 +++---
 .../tokens/CredentialProviderToken.java         |  8 +++---
 .../client/security/tokens/KerberosToken.java   | 17 +++++------
 .../accumulo/core/compaction/SizeType.java      |  6 ++--
 .../accumulo/core/compaction/UIntType.java      |  4 +--
 .../conf/CredentialProviderFactoryShim.java     | 28 +++++++++---------
 .../core/conf/ObservableConfiguration.java      |  6 ++--
 .../core/constraints/VisibilityConstraint.java  |  4 +--
 .../org/apache/accumulo/core/data/Mutation.java |  6 ++--
 .../org/apache/accumulo/core/data/Value.java    | 11 ++++---
 .../accumulo/core/iterators/IteratorUtil.java   |  6 ++--
 .../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 +++---
 .../accumulo/core/util/ThriftMessageUtil.java   |  6 ++--
 .../core/volume/VolumeConfiguration.java        |  6 ++--
 .../apache/accumulo/core/volume/VolumeImpl.java | 12 ++++----
 .../core/client/IteratorSettingTest.java        |  9 +++---
 .../org/apache/accumulo/fate/ReadOnlyStore.java |  8 +++---
 .../apache/accumulo/fate/zookeeper/ZooUtil.java |  7 +++--
 .../apache/accumulo/cluster/ClusterUser.java    | 10 +++----
 .../apache/accumulo/cluster/RemoteShell.java    |  6 ++--
 .../standalone/StandaloneClusterControl.java    |  4 +--
 .../impl/MiniAccumuloClusterControl.java        |  5 ++--
 .../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       |  7 +++--
 .../security/delegation/AuthenticationKey.java  | 14 ++++-----
 .../AuthenticationTokenSecretManager.java       | 12 ++++----
 .../ZooAuthenticationKeyDistributor.java        | 10 +++----
 .../org/apache/accumulo/server/util/Admin.java  |  5 ++--
 .../server/watcher/Log4jConfiguration.java      |  6 ++--
 .../master/metrics/MasterMetricsFactory.java    |  6 ++--
 .../MasterReplicationCoordinator.java           |  5 ++--
 .../accumulo/master/tableOps/CompactRange.java  |  9 +++---
 .../accumulo/master/tableOps/LoadFiles.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/test/randomwalk/Environment.java   |  4 +--
 .../test/stress/random/IntArgValidator.java     |  8 ++++--
 .../test/stress/random/RandomWithinRange.java   |  8 +++---
 .../accumulo/harness/AccumuloClusterIT.java     | 17 ++++++-----
 .../accumulo/harness/MiniClusterHarness.java    |  8 +++---
 .../org/apache/accumulo/harness/TestingKdc.java |  6 ++--
 .../AccumuloClusterPropertyConfiguration.java   |  6 ++--
 .../conf/AccumuloMiniClusterConfiguration.java  |  6 ++--
 .../accumulo/test/AccumuloOutputFormatIT.java   |  5 ++--
 .../apache/accumulo/test/TableOperationsIT.java |  3 +-
 .../apache/accumulo/test/WaitForBalanceIT.java  |  4 +--
 .../test/replication/ReplicationIT.java         |  4 +--
 82 files changed, 361 insertions(+), 355 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionConfig.java b/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionConfig.java
index 064d836..74e77eb 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionConfig.java
@@ -17,6 +17,8 @@
 
 package org.apache.accumulo.core.client.admin;
 
+import static java.util.Objects.requireNonNull;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -25,8 +27,6 @@ import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.impl.CompactionStrategyConfigUtil;
 import org.apache.hadoop.io.Text;
 
-import com.google.common.base.Preconditions;
-
 /**
  * This class exist to pass parameters to {@link TableOperations#compact(String, CompactionConfig)}
  *
@@ -136,7 +136,7 @@ public class CompactionConfig {
    * @return this
    */
   public CompactionConfig setCompactionStrategy(CompactionStrategyConfig csConfig) {
-    Preconditions.checkNotNull(csConfig);
+    requireNonNull(csConfig);
     this.compactionStrategy = csConfig;
     return this;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionStrategyConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionStrategyConfig.java b/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionStrategyConfig.java
index c04c175..af3b537 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionStrategyConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionStrategyConfig.java
@@ -17,12 +17,12 @@
 
 package org.apache.accumulo.core.client.admin;
 
+import static java.util.Objects.requireNonNull;
+
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import com.google.common.base.Preconditions;
-
 /**
  * Configuration object which describes how a Compaction is run. Configuration objects are dependent upon the CompactionStrategy running insider the server.
  * This class is used in conjunction with {@link CompactionConfig}.
@@ -38,7 +38,7 @@ public class CompactionStrategyConfig {
    *          The name of a class that implements org.apache.accumulo.tserver.compaction.CompactionStrategy. This class must be exist on tservers.
    */
   public CompactionStrategyConfig(String className) {
-    Preconditions.checkNotNull(className);
+    requireNonNull(className);
     this.className = className;
   }
 
@@ -56,7 +56,7 @@ public class CompactionStrategyConfig {
    * @return this
    */
   public CompactionStrategyConfig setOptions(Map<String,String> opts) {
-    Preconditions.checkNotNull(opts);
+    requireNonNull(opts);
     this.options = new HashMap<>(opts);
     return this;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/admin/DelegationTokenConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/DelegationTokenConfig.java b/core/src/main/java/org/apache/accumulo/core/client/admin/DelegationTokenConfig.java
index dab146c..b67a3e8 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/DelegationTokenConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/DelegationTokenConfig.java
@@ -17,7 +17,7 @@
 package org.apache.accumulo.core.client.admin;
 
 import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.util.concurrent.TimeUnit;
 
@@ -42,7 +42,7 @@ public class DelegationTokenConfig {
    */
   public DelegationTokenConfig setTokenLifetime(long lifetime, TimeUnit unit) {
     checkArgument(0 <= lifetime, "Lifetime must be non-negative");
-    checkNotNull(unit, "TimeUnit was null");
+    requireNonNull(unit, "TimeUnit was null");
     this.lifetime = TimeUnit.MILLISECONDS.convert(lifetime, unit);
     return this;
   }
@@ -55,7 +55,7 @@ public class DelegationTokenConfig {
    * @return Token lifetime in requested unit of time
    */
   public long getTokenLifetime(TimeUnit unit) {
-    checkNotNull(unit);
+    requireNonNull(unit);
     return unit.convert(lifetime, TimeUnit.MILLISECONDS);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/impl/AuthenticationTokenIdentifier.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/AuthenticationTokenIdentifier.java b/core/src/main/java/org/apache/accumulo/core/client/impl/AuthenticationTokenIdentifier.java
index eaf0ce7..41c9120 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/AuthenticationTokenIdentifier.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/AuthenticationTokenIdentifier.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.DataInput;
 import java.io.DataOutput;
@@ -51,13 +51,13 @@ public class AuthenticationTokenIdentifier extends TokenIdentifier {
   }
 
   public AuthenticationTokenIdentifier(String principal, DelegationTokenConfig cfg) {
-    checkNotNull(principal);
+    requireNonNull(principal);
     impl = new TAuthenticationTokenIdentifier(principal);
     this.cfg = cfg;
   }
 
   public AuthenticationTokenIdentifier(String principal, int keyId, long issueDate, long expirationDate, String instanceId) {
-    checkNotNull(principal);
+    requireNonNull(principal);
     impl = new TAuthenticationTokenIdentifier(principal);
     impl.setKeyId(keyId);
     impl.setIssueDate(issueDate);
@@ -66,12 +66,12 @@ public class AuthenticationTokenIdentifier extends TokenIdentifier {
   }
 
   public AuthenticationTokenIdentifier(AuthenticationTokenIdentifier identifier) {
-    checkNotNull(identifier);
+    requireNonNull(identifier);
     impl = new TAuthenticationTokenIdentifier(identifier.getThriftIdentifier());
   }
 
   public AuthenticationTokenIdentifier(TAuthenticationTokenIdentifier identifier) {
-    checkNotNull(identifier);
+    requireNonNull(identifier);
     impl = new TAuthenticationTokenIdentifier(identifier);
   }
 
@@ -80,42 +80,42 @@ public class AuthenticationTokenIdentifier extends TokenIdentifier {
   }
 
   public int getKeyId() {
-    checkNotNull(impl, "Identifier not initialized");
+    requireNonNull(impl, "Identifier not initialized");
     return impl.getKeyId();
   }
 
   public void setIssueDate(long issueDate) {
-    checkNotNull(impl, "Identifier not initialized");
+    requireNonNull(impl, "Identifier not initialized");
     impl.setIssueDate(issueDate);
   }
 
   public long getIssueDate() {
-    checkNotNull(impl, "Identifier not initialized");
+    requireNonNull(impl, "Identifier not initialized");
     return impl.getIssueDate();
   }
 
   public void setExpirationDate(long expirationDate) {
-    checkNotNull(impl, "Identifier not initialized");
+    requireNonNull(impl, "Identifier not initialized");
     impl.setExpirationDate(expirationDate);
   }
 
   public long getExpirationDate() {
-    checkNotNull(impl, "Identifier not initialized");
+    requireNonNull(impl, "Identifier not initialized");
     return impl.getExpirationDate();
   }
 
   public void setInstanceId(String instanceId) {
-    checkNotNull(impl, "Identifier not initialized");
+    requireNonNull(impl, "Identifier not initialized");
     impl.setInstanceId(instanceId);
   }
 
   public String getInstanceId() {
-    checkNotNull(impl, "Identifier not initialized");
+    requireNonNull(impl, "Identifier not initialized");
     return impl.getInstanceId();
   }
 
   public TAuthenticationTokenIdentifier getThriftIdentifier() {
-    checkNotNull(impl);
+    requireNonNull(impl);
     return impl;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
index cba7e8d..6828174 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
@@ -17,7 +17,7 @@
 package org.apache.accumulo.core.client.impl;
 
 import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.IOException;
 import java.util.Iterator;
@@ -63,7 +63,7 @@ public class ClientContext {
    * Instantiate a client context
    */
   public ClientContext(Instance instance, Credentials credentials, ClientConfiguration clientConf) {
-    this(instance, credentials, convertClientConfig(checkNotNull(clientConf, "clientConf is null")));
+    this(instance, credentials, convertClientConfig(requireNonNull(clientConf, "clientConf is null")));
     this.clientConf = clientConf;
   }
 
@@ -71,9 +71,9 @@ public class ClientContext {
    * Instantiate a client context from an existing {@link AccumuloConfiguration}. This is primarily intended for subclasses and testing.
    */
   public ClientContext(Instance instance, Credentials credentials, AccumuloConfiguration serverConf) {
-    inst = checkNotNull(instance, "instance is null");
-    creds = checkNotNull(credentials, "credentials is null");
-    rpcConf = checkNotNull(serverConf, "serverConf is null");
+    inst = requireNonNull(instance, "instance is null");
+    creds = requireNonNull(credentials, "credentials is null");
+    rpcConf = requireNonNull(serverConf, "serverConf is null");
     clientConf = null;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/impl/DelegationTokenImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/DelegationTokenImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/DelegationTokenImpl.java
index 119f157..5e7a12d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/DelegationTokenImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/DelegationTokenImpl.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.DataInput;
 import java.io.DataOutput;
@@ -47,16 +47,16 @@ public class DelegationTokenImpl extends PasswordToken implements DelegationToke
   }
 
   public DelegationTokenImpl(byte[] delegationTokenPassword, AuthenticationTokenIdentifier identifier) {
-    checkNotNull(delegationTokenPassword);
-    checkNotNull(identifier);
+    requireNonNull(delegationTokenPassword);
+    requireNonNull(identifier);
     setPassword(delegationTokenPassword);
     this.identifier = identifier;
   }
 
   public DelegationTokenImpl(Instance instance, UserGroupInformation user, AuthenticationTokenIdentifier identifier) {
-    checkNotNull(instance);
-    checkNotNull(user);
-    checkNotNull(identifier);
+    requireNonNull(instance);
+    requireNonNull(user);
+    requireNonNull(identifier);
 
     Credentials creds = user.getCredentials();
     Token<? extends TokenIdentifier> token = creds.getToken(new Text(SERVICE_NAME + "-" + instance.getInstanceID()));
@@ -67,8 +67,8 @@ public class DelegationTokenImpl extends PasswordToken implements DelegationToke
   }
 
   public DelegationTokenImpl(Token<? extends TokenIdentifier> token, AuthenticationTokenIdentifier identifier) {
-    checkNotNull(token);
-    checkNotNull(identifier);
+    requireNonNull(token);
+    requireNonNull(identifier);
     setPasswordFromToken(token, identifier);
   }
 
@@ -94,7 +94,7 @@ public class DelegationTokenImpl extends PasswordToken implements DelegationToke
    * The service name used to identify the {@link Token}
    */
   public Text getServiceName() {
-    checkNotNull(identifier);
+    requireNonNull(identifier);
     return new Text(SERVICE_NAME + "-" + identifier.getInstanceId());
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationClient.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationClient.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationClient.java
index 673775a..cc9b5c1 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationClient.java
@@ -16,8 +16,8 @@
  */
 package org.apache.accumulo.core.client.impl;
 
-import static com.google.common.base.Preconditions.checkNotNull;
 import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Objects.requireNonNull;
 
 import java.util.List;
 
@@ -48,7 +48,7 @@ public class ReplicationClient {
    * @return Client to the ReplicationCoordinator service
    */
   public static ReplicationCoordinator.Client getCoordinatorConnectionWithRetry(ClientContext context) throws AccumuloException {
-    checkNotNull(context);
+    requireNonNull(context);
     Instance instance = context.getInstance();
 
     for (int attempts = 1; attempts <= 10; attempts++) {
@@ -122,8 +122,8 @@ public class ReplicationClient {
    * @return A ReplicationServicer client to the given host in the given instance
    */
   public static ReplicationServicer.Client getServicerConnection(ClientContext context, HostAndPort server) throws TTransportException {
-    checkNotNull(context);
-    checkNotNull(server);
+    requireNonNull(context);
+    requireNonNull(server);
 
     try {
       return ThriftUtil.getClientNoTimeout(new ReplicationServicer.Client.Factory(), server, context);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java
index 6a5c74a..d5a13ad 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.client.impl;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.util.Collections;
 import java.util.HashSet;
@@ -57,26 +57,26 @@ public class ReplicationOperationsImpl implements ReplicationOperations {
   private final ClientContext context;
 
   public ReplicationOperationsImpl(ClientContext context) {
-    checkNotNull(context);
+    requireNonNull(context);
     this.context = context;
   }
 
   @Override
   public void addPeer(final String name, final String replicaType) throws AccumuloException, AccumuloSecurityException, PeerExistsException {
-    checkNotNull(name);
-    checkNotNull(replicaType);
+    requireNonNull(name);
+    requireNonNull(replicaType);
     context.getConnector().instanceOperations().setProperty(Property.REPLICATION_PEERS.getKey() + name, replicaType);
   }
 
   @Override
   public void removePeer(final String name) throws AccumuloException, AccumuloSecurityException, PeerNotFoundException {
-    checkNotNull(name);
+    requireNonNull(name);
     context.getConnector().instanceOperations().removeProperty(Property.REPLICATION_PEERS.getKey() + name);
   }
 
   @Override
   public void drain(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-    checkNotNull(tableName);
+    requireNonNull(tableName);
 
     Set<String> wals = referencedFiles(tableName);
 
@@ -85,7 +85,7 @@ public class ReplicationOperationsImpl implements ReplicationOperations {
 
   @Override
   public void drain(final String tableName, final Set<String> wals) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-    checkNotNull(tableName);
+    requireNonNull(tableName);
 
     final TInfo tinfo = Tracer.traceInfo();
     final TCredentials rpcCreds = context.rpcCreds();
@@ -136,7 +136,7 @@ public class ReplicationOperationsImpl implements ReplicationOperations {
 
   @Override
   public Set<String> referencedFiles(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-    checkNotNull(tableName);
+    requireNonNull(tableName);
 
     log.debug("Collecting referenced files for replication of table {}", tableName);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/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 891d6e1..7bc17c0 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 static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import org.apache.accumulo.core.rpc.SaslConnectionParams;
 import org.apache.accumulo.core.rpc.SslConnectionParams;
@@ -35,7 +35,7 @@ public class ThriftTransportKey {
 
   @VisibleForTesting
   public ThriftTransportKey(HostAndPort server, long timeout, ClientContext context) {
-    checkNotNull(server, "location is null");
+    requireNonNull(server, "location is null");
     this.server = server;
     this.timeout = timeout;
     this.sslParams = context.getClientSslParams();
@@ -52,7 +52,7 @@ public class ThriftTransportKey {
    * Visible only for testing
    */
   ThriftTransportKey(HostAndPort server, long timeout, SslConnectionParams sslParams, SaslConnectionParams saslParams) {
-    checkNotNull(server, "location is null");
+    requireNonNull(server, "location is null");
     this.server = server;
     this.timeout = timeout;
     this.sslParams = sslParams;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
index d776329..59f4332 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
@@ -16,9 +16,10 @@
  */
 package org.apache.accumulo.core.client.lexicoder;
 
-import org.apache.accumulo.core.iterators.ValueFormatException;
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Objects.requireNonNull;
 
-import com.google.common.base.Preconditions;
+import org.apache.accumulo.core.iterators.ValueFormatException;
 
 /**
  * AbstractEncoder is an {@link org.apache.accumulo.core.client.lexicoder.Encoder} that implements all of Encoder's methods validating the input, but has those
@@ -35,7 +36,7 @@ public abstract class AbstractEncoder<T> implements Encoder<T> {
 
   @Override
   public T decode(byte[] b) {
-    Preconditions.checkNotNull(b, "cannot decode null byte array");
+    requireNonNull(b, "cannot decode null byte array");
     return decodeUnchecked(b, 0, b.length);
   }
 
@@ -48,10 +49,10 @@ public abstract class AbstractEncoder<T> implements Encoder<T> {
    *           if {@code offset + len} exceeds the length of {@code b}
    */
   public T decode(byte[] b, int offset, int len) {
-    Preconditions.checkNotNull(b, "cannot decode null byte array");
-    Preconditions.checkArgument(offset >= 0, "offset %s cannot be negative", offset);
-    Preconditions.checkArgument(len >= 0, "length %s cannot be negative", len);
-    Preconditions.checkArgument(offset + len <= b.length, "offset + length %s exceeds byte array length %s", (offset + len), b.length);
+    requireNonNull(b, "cannot decode null byte array");
+    checkArgument(offset >= 0, "offset %s cannot be negative", offset);
+    checkArgument(len >= 0, "length %s cannot be negative", len);
+    checkArgument(offset + len <= b.length, "offset + length %s exceeds byte array length %s", (offset + len), b.length);
 
     return decodeUnchecked(b, offset, len);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java
index 679256b..e8e49f0 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.client.mapreduce;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.IOException;
 import java.util.List;
@@ -62,7 +62,7 @@ public class AccumuloMultiTableInputFormat extends AbstractInputFormat<Key,Value
    * @since 1.6.0
    */
   public static void setInputTableConfigs(Job job, Map<String,InputTableConfig> configs) {
-    checkNotNull(configs);
+    requireNonNull(configs);
     InputConfigurator.setInputTableConfigs(CLASS, job.getConfiguration(), configs);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/DelegationTokenStub.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/DelegationTokenStub.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/DelegationTokenStub.java
index 5ad91b5..e681d9c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/DelegationTokenStub.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/DelegationTokenStub.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.client.mapreduce.impl;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.DataInput;
 import java.io.DataOutput;
@@ -35,7 +35,7 @@ public class DelegationTokenStub implements AuthenticationToken {
   private String serviceName;
 
   public DelegationTokenStub(String serviceName) {
-    checkNotNull(serviceName);
+    requireNonNull(serviceName);
     this.serviceName = serviceName;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
index 5364e4a..c3a4b4f 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
@@ -17,8 +17,8 @@
 package org.apache.accumulo.core.client.mapreduce.lib.impl;
 
 import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
 import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Objects.requireNonNull;
 
 import java.io.ByteArrayInputStream;
 import java.io.DataInputStream;
@@ -458,8 +458,8 @@ public class ConfiguratorBase {
    *          The authentication token
    */
   public static AuthenticationToken unwrapAuthenticationToken(JobConf job, AuthenticationToken token) {
-    checkNotNull(job);
-    checkNotNull(token);
+    requireNonNull(job);
+    requireNonNull(token);
     if (token instanceof DelegationTokenStub) {
       DelegationTokenStub delTokenStub = (DelegationTokenStub) token;
       Token<? extends TokenIdentifier> hadoopToken = job.getCredentials().getToken(new Text(delTokenStub.getServiceName()));
@@ -483,8 +483,8 @@ public class ConfiguratorBase {
    *          The authentication token
    */
   public static AuthenticationToken unwrapAuthenticationToken(JobContext job, AuthenticationToken token) {
-    checkNotNull(job);
-    checkNotNull(token);
+    requireNonNull(job);
+    requireNonNull(token);
     if (token instanceof DelegationTokenStub) {
       DelegationTokenStub delTokenStub = (DelegationTokenStub) token;
       Token<? extends TokenIdentifier> hadoopToken = job.getCredentials().getToken(new Text(delTokenStub.getServiceName()));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
index e998722..0da8bd1 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.core.client.mock;
 
+import static com.google.common.base.Preconditions.checkArgument;
+
 import java.io.DataInputStream;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -64,8 +66,6 @@ import org.apache.hadoop.io.Text;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
-
 class MockTableOperations extends TableOperationsHelper {
   private static final Logger log = LoggerFactory.getLogger(MockTableOperations.class);
   private static final byte[] ZERO = {0};
@@ -117,10 +117,10 @@ class MockTableOperations extends TableOperationsHelper {
   public void create(String tableName, NewTableConfiguration ntc) throws AccumuloException, AccumuloSecurityException, TableExistsException {
     String namespace = Tables.qualify(tableName).getFirst();
 
-    Preconditions.checkArgument(tableName.matches(Tables.VALID_NAME_REGEX));
+    checkArgument(tableName.matches(Tables.VALID_NAME_REGEX));
     if (exists(tableName))
       throw new TableExistsException(tableName, tableName, "");
-    Preconditions.checkArgument(namespaceExists(namespace), "Namespace (" + namespace + ") does not exist, create it first");
+    checkArgument(namespaceExists(namespace), "Namespace (" + namespace + ") does not exist, create it first");
     acu.createTable(username, tableName, ntc.getTimeType(), ntc.getProperties());
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/security/tokens/CredentialProviderToken.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/CredentialProviderToken.java b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/CredentialProviderToken.java
index bc427a7..a34aadf 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/CredentialProviderToken.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/CredentialProviderToken.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.core.client.security.tokens;
 
+import static java.util.Objects.requireNonNull;
+
 import java.io.IOException;
 import java.nio.CharBuffer;
 import java.util.LinkedHashSet;
@@ -25,8 +27,6 @@ import org.apache.accumulo.core.conf.CredentialProviderFactoryShim;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.hadoop.conf.Configuration;
 
-import com.google.common.base.Preconditions;
-
 /**
  * An {@link AuthenticationToken} backed by a Hadoop CredentialProvider.
  */
@@ -38,8 +38,8 @@ public class CredentialProviderToken extends PasswordToken {
   }
 
   public CredentialProviderToken(String name, String credentialProviders) throws IOException {
-    Preconditions.checkNotNull(name);
-    Preconditions.checkNotNull(credentialProviders);
+    requireNonNull(name);
+    requireNonNull(credentialProviders);
 
     setWithCredentialProviders(name, credentialProviders);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/client/security/tokens/KerberosToken.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/KerberosToken.java b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/KerberosToken.java
index ff353cf..284a838 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/KerberosToken.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/KerberosToken.java
@@ -16,6 +16,9 @@
  */
 package org.apache.accumulo.core.client.security.tokens;
 
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Objects.requireNonNull;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.File;
@@ -27,8 +30,6 @@ import javax.security.auth.DestroyFailedException;
 
 import org.apache.hadoop.security.UserGroupInformation;
 
-import com.google.common.base.Preconditions;
-
 /**
  * Authentication token for Kerberos authenticated clients
  *
@@ -50,10 +51,10 @@ public class KerberosToken implements AuthenticationToken {
    *          The user that is logged in
    */
   public KerberosToken(String principal) throws IOException {
-    Preconditions.checkNotNull(principal);
+    requireNonNull(principal);
     final UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
-    Preconditions.checkArgument(ugi.hasKerberosCredentials(), "Subject is not logged in via Kerberos");
-    Preconditions.checkArgument(principal.equals(ugi.getUserName()), "Provided principal does not match currently logged-in user");
+    checkArgument(ugi.hasKerberosCredentials(), "Subject is not logged in via Kerberos");
+    checkArgument(principal.equals(ugi.getUserName()), "Provided principal does not match currently logged-in user");
     this.principal = ugi.getUserName();
   }
 
@@ -69,9 +70,9 @@ public class KerberosToken implements AuthenticationToken {
    *          Should the current Hadoop user be replaced with this user
    */
   public KerberosToken(String principal, File keytab, boolean replaceCurrentUser) throws IOException {
-    Preconditions.checkNotNull(principal, "Principal was null");
-    Preconditions.checkNotNull(keytab, "Keytab was null");
-    Preconditions.checkArgument(keytab.exists() && keytab.isFile(), "Keytab was not a normal file");
+    requireNonNull(principal, "Principal was null");
+    requireNonNull(keytab, "Keytab was null");
+    checkArgument(keytab.exists() && keytab.isFile(), "Keytab was not a normal file");
     UserGroupInformation ugi;
     if (replaceCurrentUser) {
       UserGroupInformation.loginUserFromKeytab(principal, keytab.getAbsolutePath());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/compaction/SizeType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/compaction/SizeType.java b/core/src/main/java/org/apache/accumulo/core/compaction/SizeType.java
index ea86605..cf147a8 100644
--- a/core/src/main/java/org/apache/accumulo/core/compaction/SizeType.java
+++ b/core/src/main/java/org/apache/accumulo/core/compaction/SizeType.java
@@ -16,15 +16,15 @@
  */
 package org.apache.accumulo.core.compaction;
 
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
+import static com.google.common.base.Preconditions.checkArgument;
 
-import com.google.common.base.Preconditions;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
 
 class SizeType implements Type {
   @Override
   public String convert(String str) {
     long size = AccumuloConfiguration.getMemoryInBytes(str);
-    Preconditions.checkArgument(size > 0);
+    checkArgument(size > 0);
     return Long.toString(size);
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/compaction/UIntType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/compaction/UIntType.java b/core/src/main/java/org/apache/accumulo/core/compaction/UIntType.java
index 09923c3..8239d78 100644
--- a/core/src/main/java/org/apache/accumulo/core/compaction/UIntType.java
+++ b/core/src/main/java/org/apache/accumulo/core/compaction/UIntType.java
@@ -16,12 +16,12 @@
  */
 package org.apache.accumulo.core.compaction;
 
-import com.google.common.base.Preconditions;
+import static com.google.common.base.Preconditions.checkArgument;
 
 class UIntType implements Type {
   @Override
   public String convert(String str) {
-    Preconditions.checkArgument(Integer.parseInt(str) > 0);
+    checkArgument(Integer.parseInt(str) > 0);
     return str;
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShim.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShim.java b/core/src/main/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShim.java
index 388f3ca..977097e 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShim.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShim.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.core.conf;
 
+import static java.util.Objects.requireNonNull;
+
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -29,8 +31,6 @@ import org.apache.hadoop.conf.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
-
 /**
  * Shim around Hadoop: tries to use the CredentialProviderFactory provided by hadoop-common, falling back to a copy inside accumulo-core.
  * <p>
@@ -331,7 +331,7 @@ public class CredentialProviderFactoryShim {
    * @return Configuration to be used for CredentialProvider
    */
   public static Configuration getConfiguration(String credentialProviders) {
-    Preconditions.checkNotNull(credentialProviders);
+    requireNonNull(credentialProviders);
     return getConfiguration(new Configuration(CachedConfiguration.getInstance()), credentialProviders);
   }
 
@@ -344,8 +344,8 @@ public class CredentialProviderFactoryShim {
    *          Comma-separated list of CredentialProvider URLs
    */
   public static Configuration getConfiguration(Configuration conf, String credentialProviders) {
-    Preconditions.checkNotNull(conf);
-    Preconditions.checkNotNull(credentialProviders);
+    requireNonNull(conf);
+    requireNonNull(credentialProviders);
     conf.set(CredentialProviderFactoryShim.CREDENTIAL_PROVIDER_PATH, credentialProviders);
     return conf;
   }
@@ -362,8 +362,8 @@ public class CredentialProviderFactoryShim {
    *           On errors reading a CredentialProvider
    */
   public static char[] getValueFromCredentialProvider(Configuration conf, String alias) throws IOException {
-    Preconditions.checkNotNull(conf);
-    Preconditions.checkNotNull(alias);
+    requireNonNull(conf);
+    requireNonNull(alias);
 
     if (isHadoopCredentialProviderAvailable()) {
       log.trace("Hadoop CredentialProvider is available, attempting to extract value for {}", alias);
@@ -383,7 +383,7 @@ public class CredentialProviderFactoryShim {
    *           On errors reading a CredentialProvider
    */
   public static List<String> getKeys(Configuration conf) throws IOException {
-    Preconditions.checkNotNull(conf);
+    requireNonNull(conf);
 
     if (isHadoopCredentialProviderAvailable()) {
       log.trace("Hadoop CredentialProvider is available, attempting to extract all aliases");
@@ -404,9 +404,9 @@ public class CredentialProviderFactoryShim {
    *          The credential
    */
   public static void createEntry(Configuration conf, String name, char[] credential) throws IOException {
-    Preconditions.checkNotNull(conf);
-    Preconditions.checkNotNull(name);
-    Preconditions.checkNotNull(credential);
+    requireNonNull(conf);
+    requireNonNull(name);
+    requireNonNull(credential);
 
     if (!isHadoopCredentialProviderAvailable()) {
       log.warn("Hadoop CredentialProvider is not available");
@@ -438,9 +438,9 @@ public class CredentialProviderFactoryShim {
    *          The credential to store
    */
   public static void createEntryInProvider(Object credentialProvider, String name, char[] credential) throws IOException {
-    Preconditions.checkNotNull(credentialProvider);
-    Preconditions.checkNotNull(name);
-    Preconditions.checkNotNull(credential);
+    requireNonNull(credentialProvider);
+    requireNonNull(name);
+    requireNonNull(credential);
 
     if (!isHadoopCredentialProviderAvailable()) {
       log.warn("Hadoop CredentialProvider is not available");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/conf/ObservableConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/ObservableConfiguration.java b/core/src/main/java/org/apache/accumulo/core/conf/ObservableConfiguration.java
index fc4abaf..4c3f932 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/ObservableConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/ObservableConfiguration.java
@@ -16,12 +16,12 @@
  */
 package org.apache.accumulo.core.conf;
 
+import static java.util.Objects.requireNonNull;
+
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Set;
 
-import com.google.common.base.Preconditions;
-
 /**
  * A configuration that can be observed. Handling of observers is thread-safe.
  */
@@ -45,7 +45,7 @@ public abstract class ObservableConfiguration extends AccumuloConfiguration {
    *           if co is null
    */
   public void addObserver(ConfigurationObserver co) {
-    Preconditions.checkNotNull(co);
+    requireNonNull(co);
     observers.add(co);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/constraints/VisibilityConstraint.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/constraints/VisibilityConstraint.java b/core/src/main/java/org/apache/accumulo/core/constraints/VisibilityConstraint.java
index 648d044..d03f66e 100644
--- a/core/src/main/java/org/apache/accumulo/core/constraints/VisibilityConstraint.java
+++ b/core/src/main/java/org/apache/accumulo/core/constraints/VisibilityConstraint.java
@@ -77,9 +77,9 @@ public class VisibilityConstraint implements Constraint {
             return Collections.singletonList(Short.valueOf((short) 2));
 
         } catch (BadArgumentException bae) {
-          return Collections.singletonList(new Short((short) 1));
+          return Collections.singletonList(Short.valueOf((short) 1));
         } catch (VisibilityParseException e) {
-          return Collections.singletonList(new Short((short) 1));
+          return Collections.singletonList(Short.valueOf((short) 1));
         }
 
         if (ok != null)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
index 2804d37..1d15ef4 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.core.data;
 
+import static java.util.Objects.requireNonNull;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -35,8 +37,6 @@ import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableUtils;
 
-import com.google.common.base.Preconditions;
-
 /**
  * <p>
  * Mutation represents an action that manipulates a row in a table. A mutation holds a list of column/value pairs that represent an atomic set of modifications
@@ -926,7 +926,7 @@ public class Mutation implements Writable {
    * @since 1.7.0
    */
   public void setReplicationSources(Set<String> sources) {
-    Preconditions.checkNotNull(sources);
+    requireNonNull(sources);
     this.replicationSources = sources;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/data/Value.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Value.java b/core/src/main/java/org/apache/accumulo/core/data/Value.java
index f2a80b7..6883885 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Value.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Value.java
@@ -18,6 +18,7 @@
 package org.apache.accumulo.core.data;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Objects.requireNonNull;
 import static org.apache.accumulo.core.util.ByteBufferUtil.toBytes;
 
 import java.io.DataInput;
@@ -30,8 +31,6 @@ import org.apache.hadoop.io.BytesWritable;
 import org.apache.hadoop.io.WritableComparable;
 import org.apache.hadoop.io.WritableComparator;
 
-import com.google.common.base.Preconditions;
-
 /**
  * A byte sequence that is usable as a key or value. Based on {@link org.apache.hadoop.io.BytesWritable} only this class is NOT resizable and DOES NOT
  * distinguish between the size of the sequence and the current capacity as {@link org.apache.hadoop.io.BytesWritable} does. Hence it is comparatively
@@ -93,7 +92,7 @@ public class Value implements WritableComparable<Object> {
    *          false to use the given byte array directly as the backing array, true to force a copy
    */
   public Value(byte[] bytes, boolean copy) {
-    Preconditions.checkNotNull(bytes);
+    requireNonNull(bytes);
     if (!copy) {
       this.value = bytes;
     } else {
@@ -126,7 +125,7 @@ public class Value implements WritableComparable<Object> {
    *           if offset or length are invalid
    */
   public Value(final byte[] newData, final int offset, final int length) {
-    Preconditions.checkNotNull(newData);
+    requireNonNull(newData);
     this.value = new byte[length];
     System.arraycopy(newData, offset, this.value, 0, length);
   }
@@ -148,7 +147,7 @@ public class Value implements WritableComparable<Object> {
    *          may not be null
    */
   public void set(final byte[] b) {
-    Preconditions.checkNotNull(b);
+    requireNonNull(b);
     this.value = b;
   }
 
@@ -159,7 +158,7 @@ public class Value implements WritableComparable<Object> {
    *          may not be null
    */
   public void copy(byte[] b) {
-    Preconditions.checkNotNull(b);
+    requireNonNull(b);
     this.value = new byte[b.length];
     System.arraycopy(b, 0, this.value, 0, b.length);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
index c739e56..079bb70 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.core.iterators;
 
+import static java.util.Objects.requireNonNull;
+
 import java.io.IOException;
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -51,8 +53,6 @@ import org.apache.thrift.protocol.TBinaryProtocol;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
-
 public class IteratorUtil {
 
   private static final Logger log = LoggerFactory.getLogger(IteratorUtil.class);
@@ -90,7 +90,7 @@ public class IteratorUtil {
    * Fetch the correct configuration key prefix for the given scope. Throws an IllegalArgumentException if no property exists for the given scope.
    */
   static Property getProperty(IteratorScope scope) {
-    Preconditions.checkNotNull(scope);
+    requireNonNull(scope);
     switch (scope) {
       case scan:
         return Property.TABLE_ITERATOR_SCAN_PREFIX;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java b/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java
index 3970c49..236698c 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java
@@ -16,6 +16,9 @@
  */
 package org.apache.accumulo.core.metadata.schema;
 
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Objects.requireNonNull;
+
 import org.apache.accumulo.core.client.admin.TimeType;
 import org.apache.accumulo.core.data.ArrayByteSequence;
 import org.apache.accumulo.core.data.Key;
@@ -25,8 +28,6 @@ import org.apache.accumulo.core.schema.Section;
 import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.hadoop.io.Text;
 
-import com.google.common.base.Preconditions;
-
 /**
  * Describes the table schema used for metadata tables
  */
@@ -254,8 +255,8 @@ public class MetadataSchema {
      *          Text to place table ID into
      */
     public static void getTableId(Key k, Text buff) {
-      Preconditions.checkNotNull(k);
-      Preconditions.checkNotNull(buff);
+      requireNonNull(k);
+      requireNonNull(buff);
 
       k.getColumnQualifier(buff);
     }
@@ -269,9 +270,9 @@ public class MetadataSchema {
      *          Text to place file name into
      */
     public static void getFile(Key k, Text buff) {
-      Preconditions.checkNotNull(k);
-      Preconditions.checkNotNull(buff);
-      Preconditions.checkArgument(COLF_BYTE_SEQ.equals(k.getColumnFamilyData()), "Given metadata replication status key with incorrect colfam");
+      requireNonNull(k);
+      requireNonNull(buff);
+      checkArgument(COLF_BYTE_SEQ.equals(k.getColumnFamilyData()), "Given metadata replication status key with incorrect colfam");
 
       k.getRow(buff);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/replication/ReplicationSchema.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationSchema.java b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationSchema.java
index b352957..7e7ae38 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationSchema.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationSchema.java
@@ -16,7 +16,9 @@
  */
 package org.apache.accumulo.core.replication;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Objects.requireNonNull;
 
 import java.nio.charset.CharacterCodingException;
 
@@ -32,8 +34,6 @@ import org.apache.hadoop.io.Text;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
-
 /**
  *
  */
@@ -50,9 +50,9 @@ public class ReplicationSchema {
     private static final ByteSequence BYTE_SEQ_NAME = new ArrayByteSequence("work");
 
     public static void getFile(Key k, Text buff) {
-      Preconditions.checkNotNull(k);
-      Preconditions.checkNotNull(buff);
-      Preconditions.checkArgument(BYTE_SEQ_NAME.equals(k.getColumnFamilyData()), "Given replication work key with incorrect colfam");
+      requireNonNull(k);
+      requireNonNull(buff);
+      checkArgument(BYTE_SEQ_NAME.equals(k.getColumnFamilyData()), "Given replication work key with incorrect colfam");
       _getFile(k, buff);
     }
 
@@ -61,7 +61,7 @@ public class ReplicationSchema {
     }
 
     public static ReplicationTarget getTarget(Key k, Text buff) {
-      Preconditions.checkArgument(BYTE_SEQ_NAME.equals(k.getColumnFamilyData()), "Given replication work key with incorrect colfam");
+      checkArgument(BYTE_SEQ_NAME.equals(k.getColumnFamilyData()), "Given replication work key with incorrect colfam");
       k.getColumnQualifier(buff);
 
       return ReplicationTarget.from(buff);
@@ -112,8 +112,8 @@ public class ReplicationSchema {
      *          Text to place table ID into
      */
     public static void getTableId(Key k, Text buff) {
-      Preconditions.checkNotNull(k);
-      Preconditions.checkNotNull(buff);
+      requireNonNull(k);
+      requireNonNull(buff);
 
       k.getColumnQualifier(buff);
     }
@@ -127,9 +127,9 @@ public class ReplicationSchema {
      *          Text to place file name into
      */
     public static void getFile(Key k, Text buff) {
-      Preconditions.checkNotNull(k);
-      Preconditions.checkNotNull(buff);
-      Preconditions.checkArgument(BYTE_SEQ_NAME.equals(k.getColumnFamilyData()), "Given replication status key with incorrect colfam");
+      requireNonNull(k);
+      requireNonNull(buff);
+      checkArgument(BYTE_SEQ_NAME.equals(k.getColumnFamilyData()), "Given replication status key with incorrect colfam");
 
       _getFile(k, buff);
     }
@@ -180,8 +180,8 @@ public class ReplicationSchema {
      *          Text to place table ID into
      */
     public static void getTableId(Key k, Text buff) {
-      Preconditions.checkNotNull(k);
-      Preconditions.checkNotNull(buff);
+      requireNonNull(k);
+      requireNonNull(buff);
 
       k.getColumnQualifier(buff);
     }
@@ -203,8 +203,8 @@ public class ReplicationSchema {
      * @return Mutation for the Order section
      */
     public static Mutation createMutation(String file, long timeInMillis) {
-      Preconditions.checkNotNull(file);
-      Preconditions.checkArgument(timeInMillis >= 0, "timeInMillis must be greater than zero");
+      requireNonNull(file);
+      checkArgument(timeInMillis >= 0, "timeInMillis must be greater than zero");
 
       // Encode the time so it sorts properly
       byte[] rowPrefix = longEncoder.encode(timeInMillis);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/rpc/FilterTransport.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/FilterTransport.java b/core/src/main/java/org/apache/accumulo/core/rpc/FilterTransport.java
index a50944b..d49c282 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/FilterTransport.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/FilterTransport.java
@@ -18,11 +18,11 @@
 
 package org.apache.accumulo.core.rpc;
 
+import static java.util.Objects.requireNonNull;
+
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
 
-import com.google.common.base.Preconditions;
-
 /**
  * Transport that simply wraps another transport. This is the equivalent of FilterInputStream for Thrift transports.
  */
@@ -30,7 +30,7 @@ public class FilterTransport extends TTransport {
   private final TTransport wrapped;
 
   public FilterTransport(TTransport wrapped) {
-    Preconditions.checkNotNull(wrapped);
+    requireNonNull(wrapped);
     this.wrapped = wrapped;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/rpc/ProtocolOverridingSSLSocketFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/ProtocolOverridingSSLSocketFactory.java b/core/src/main/java/org/apache/accumulo/core/rpc/ProtocolOverridingSSLSocketFactory.java
index cc8ca95..487cc53 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/ProtocolOverridingSSLSocketFactory.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/ProtocolOverridingSSLSocketFactory.java
@@ -16,6 +16,9 @@
  */
 package org.apache.accumulo.core.rpc;
 
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Objects.requireNonNull;
+
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.Socket;
@@ -24,8 +27,6 @@ import java.net.UnknownHostException;
 import javax.net.ssl.SSLSocket;
 import javax.net.ssl.SSLSocketFactory;
 
-import com.google.common.base.Preconditions;
-
 /**
  * JDK6's SSLSocketFactory doesn't seem to properly set the protocols on the Sockets that it creates which causes an SSLv2 client hello message during
  * handshake, even when only TLSv1 is enabled. This only appears to be an issue on the client sockets, not the server sockets.
@@ -41,8 +42,8 @@ class ProtocolOverridingSSLSocketFactory extends SSLSocketFactory {
   private final String[] enabledProtocols;
 
   public ProtocolOverridingSSLSocketFactory(final SSLSocketFactory delegate, final String[] enabledProtocols) {
-    Preconditions.checkNotNull(enabledProtocols);
-    Preconditions.checkArgument(0 != enabledProtocols.length, "Expected at least one protocol");
+    requireNonNull(enabledProtocols);
+    checkArgument(0 != enabledProtocols.length, "Expected at least one protocol");
     this.delegate = delegate;
     this.enabledProtocols = enabledProtocols;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/rpc/SaslClientDigestCallbackHandler.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/SaslClientDigestCallbackHandler.java b/core/src/main/java/org/apache/accumulo/core/rpc/SaslClientDigestCallbackHandler.java
index 6504741..f74493a 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/SaslClientDigestCallbackHandler.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/SaslClientDigestCallbackHandler.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.rpc;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.util.Arrays;
 
@@ -44,14 +44,14 @@ public class SaslClientDigestCallbackHandler extends SaslDigestCallbackHandler {
   private final char[] userPassword;
 
   public SaslClientDigestCallbackHandler(DelegationTokenImpl token) {
-    checkNotNull(token);
+    requireNonNull(token);
     this.userName = encodeIdentifier(token.getIdentifier().getBytes());
     this.userPassword = encodePassword(token.getPassword());
   }
 
   public SaslClientDigestCallbackHandler(String userName, char[] userPassword) {
-    checkNotNull(userName);
-    checkNotNull(userPassword);
+    requireNonNull(userName);
+    requireNonNull(userPassword);
     this.userName = userName;
     this.userPassword = userPassword;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/rpc/SaslConnectionParams.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/SaslConnectionParams.java b/core/src/main/java/org/apache/accumulo/core/rpc/SaslConnectionParams.java
index 1550f03..4400da5 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/SaslConnectionParams.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/SaslConnectionParams.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.rpc;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -140,8 +140,8 @@ public class SaslConnectionParams {
   }
 
   public SaslConnectionParams(ClientConfiguration conf, AuthenticationToken token) {
-    checkNotNull(conf, "Configuration was null");
-    checkNotNull(token, "AuthenticationToken was null");
+    requireNonNull(conf, "Configuration was null");
+    requireNonNull(token, "AuthenticationToken was null");
 
     saslProperties = new HashMap<>();
     updatePrincipalFromUgi();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/rpc/UGIAssumingTransportFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/UGIAssumingTransportFactory.java b/core/src/main/java/org/apache/accumulo/core/rpc/UGIAssumingTransportFactory.java
index b1772fa..f64e54a 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/UGIAssumingTransportFactory.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/UGIAssumingTransportFactory.java
@@ -16,14 +16,14 @@
  */
 package org.apache.accumulo.core.rpc;
 
+import static java.util.Objects.requireNonNull;
+
 import java.security.PrivilegedAction;
 
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportFactory;
 
-import com.google.common.base.Preconditions;
-
 /**
  * A TransportFactory that wraps another one, but assumes a specified UGI before calling through.
  *
@@ -36,8 +36,8 @@ public class UGIAssumingTransportFactory extends TTransportFactory {
   private final TTransportFactory wrapped;
 
   public UGIAssumingTransportFactory(TTransportFactory wrapped, UserGroupInformation ugi) {
-    Preconditions.checkNotNull(wrapped);
-    Preconditions.checkNotNull(ugi);
+    requireNonNull(wrapped);
+    requireNonNull(ugi);
 
     this.wrapped = wrapped;
     this.ugi = ugi;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java b/core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java
index 7405f27..18c8836 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.util;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -57,7 +57,7 @@ public class ThriftMessageUtil {
    *           When serialization fails
    */
   public ByteBuffer serialize(TBase<?,?> msg) throws IOException {
-    checkNotNull(msg);
+    requireNonNull(msg);
     transport.reset();
     try {
       msg.write(protocol);
@@ -89,7 +89,7 @@ public class ThriftMessageUtil {
    *           When deserialization fails
    */
   public <T extends TBase<?,?>> T deserialize(byte[] serialized, int offset, int length, T instance) throws IOException {
-    checkNotNull(instance);
+    requireNonNull(instance);
     TCompactProtocol proto = new TCompactProtocol(new TMemoryInputTransport(serialized, offset, length));
     try {
       instance.read(proto);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java b/core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java
index 01fa0f9..573978d 100644
--- a/core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.core.volume;
 
+import static java.util.Objects.requireNonNull;
+
 import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -27,12 +29,10 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 
-import com.google.common.base.Preconditions;
-
 public class VolumeConfiguration {
 
   public static Volume getVolume(String path, Configuration conf, AccumuloConfiguration acuconf) throws IOException {
-    Preconditions.checkNotNull(path);
+    requireNonNull(path);
 
     if (path.contains(":")) {
       // An absolute path

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/main/java/org/apache/accumulo/core/volume/VolumeImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/volume/VolumeImpl.java b/core/src/main/java/org/apache/accumulo/core/volume/VolumeImpl.java
index 9285cb6..a646cf2 100644
--- a/core/src/main/java/org/apache/accumulo/core/volume/VolumeImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/volume/VolumeImpl.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.volume;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.IOException;
 import java.util.Objects;
@@ -38,16 +38,16 @@ public class VolumeImpl implements Volume {
   protected final String basePath;
 
   public VolumeImpl(Path path, Configuration conf) throws IOException {
-    checkNotNull(path);
-    checkNotNull(conf);
+    requireNonNull(path);
+    requireNonNull(conf);
 
     this.fs = path.getFileSystem(conf);
     this.basePath = path.toUri().getPath();
   }
 
   public VolumeImpl(FileSystem fs, String basePath) {
-    checkNotNull(fs);
-    checkNotNull(basePath);
+    requireNonNull(fs);
+    requireNonNull(basePath);
 
     this.fs = fs;
     this.basePath = basePath;
@@ -70,7 +70,7 @@ public class VolumeImpl implements Volume {
 
   @Override
   public boolean isValidPath(Path p) {
-    checkNotNull(p);
+    requireNonNull(p);
 
     FileSystem other;
     try {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/core/src/test/java/org/apache/accumulo/core/client/IteratorSettingTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/IteratorSettingTest.java b/core/src/test/java/org/apache/accumulo/core/client/IteratorSettingTest.java
index eed3dea..bbe2415 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/IteratorSettingTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/IteratorSettingTest.java
@@ -19,14 +19,13 @@ package org.apache.accumulo.core.client;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 
+import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.accumulo.core.iterators.Combiner;
 import org.apache.accumulo.core.iterators.DevNull;
 import org.junit.Test;
 
-import com.google.common.collect.Maps;
-
 /**
  * Test cases for the IteratorSetting class
  */
@@ -97,15 +96,15 @@ public class IteratorSettingTest {
   @Test
   public void testEquivalentConstructor() {
     IteratorSetting setting1 = new IteratorSetting(100, Combiner.class);
-    IteratorSetting setting2 = new IteratorSetting(100, "Combiner", Combiner.class, Maps.<String,String> newHashMap());
+    IteratorSetting setting2 = new IteratorSetting(100, "Combiner", Combiner.class, new HashMap<String,String>());
 
     assertEquals(setting1, setting2);
 
-    IteratorSetting notEqual1 = new IteratorSetting(100, "FooCombiner", Combiner.class, Maps.<String,String> newHashMap());
+    IteratorSetting notEqual1 = new IteratorSetting(100, "FooCombiner", Combiner.class, new HashMap<String,String>());
 
     assertNotEquals(setting1, notEqual1);
 
-    Map<String,String> props = Maps.newHashMap();
+    Map<String,String> props = new HashMap<String,String>();
     props.put("foo", "bar");
     IteratorSetting notEquals2 = new IteratorSetting(100, "Combiner", Combiner.class, props);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/fate/src/main/java/org/apache/accumulo/fate/ReadOnlyStore.java
----------------------------------------------------------------------
diff --git a/fate/src/main/java/org/apache/accumulo/fate/ReadOnlyStore.java b/fate/src/main/java/org/apache/accumulo/fate/ReadOnlyStore.java
index 1f01090..0ca59dd 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/ReadOnlyStore.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/ReadOnlyStore.java
@@ -16,12 +16,12 @@
  */
 package org.apache.accumulo.fate;
 
+import static java.util.Objects.requireNonNull;
+
 import java.io.Serializable;
 import java.util.EnumSet;
 import java.util.List;
 
-import com.google.common.base.Preconditions;
-
 /**
  * This store decorates a TStore to make sure it can not be modified.
  *
@@ -37,7 +37,7 @@ public class ReadOnlyStore<T> implements ReadOnlyTStore<T> {
    *          may not be null
    */
   public ReadOnlyStore(TStore<T> store) {
-    Preconditions.checkNotNull(store);
+    requireNonNull(store);
     this.store = store;
   }
 
@@ -69,7 +69,7 @@ public class ReadOnlyStore<T> implements ReadOnlyTStore<T> {
      *          may not be null
      */
     public ReadOnlyRepoWrapper(Repo<X> repo) {
-      Preconditions.checkNotNull(repo);
+      requireNonNull(repo);
       this.repo = repo;
     }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java
----------------------------------------------------------------------
diff --git a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java
index 2262184..4c4aa13 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.fate.zookeeper;
 
+import static java.util.Objects.requireNonNull;
+
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -35,8 +37,6 @@ import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
-
 public class ZooUtil {
   private static final Logger log = LoggerFactory.getLogger(ZooUtil.class);
 
@@ -92,7 +92,7 @@ public class ZooUtil {
     byte[] auth;
 
     public ZooKeeperConnectionInfo(String keepers, int timeout, String scheme, byte[] auth) {
-      Preconditions.checkNotNull(keepers);
+      requireNonNull(keepers);
       this.keepers = keepers;
       this.timeout = timeout;
       this.scheme = scheme;
@@ -159,6 +159,7 @@ public class ZooUtil {
   public static final List<ACL> PRIVATE;
   public static final List<ACL> PUBLIC;
   private static final RetryFactory RETRY_FACTORY;
+
   static {
     PRIVATE = new ArrayList<ACL>();
     PRIVATE.addAll(Ids.CREATOR_ALL_ACL);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterUser.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterUser.java b/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterUser.java
index f59c47a..6644d44 100644
--- a/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterUser.java
+++ b/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterUser.java
@@ -17,7 +17,7 @@
 package org.apache.accumulo.cluster;
 
 import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.File;
 import java.io.IOException;
@@ -35,16 +35,16 @@ public class ClusterUser {
   private File keytab;
 
   public ClusterUser(String principal, File keytab) {
-    checkNotNull(principal, "Principal was null");
-    checkNotNull(keytab, "Keytab was null");
+    requireNonNull(principal, "Principal was null");
+    requireNonNull(keytab, "Keytab was null");
     checkArgument(keytab.exists() && keytab.isFile(), "Keytab should be a file");
     this.principal = principal;
     this.keytab = keytab;
   }
 
   public ClusterUser(String principal, String password) {
-    checkNotNull(principal, "Principal was null");
-    checkNotNull(password, "Password was null");
+    requireNonNull(principal, "Principal was null");
+    requireNonNull(password, "Password was null");
     this.principal = principal;
     this.password = password;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShell.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShell.java b/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShell.java
index 5a44acf..137b7f7 100644
--- a/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShell.java
+++ b/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShell.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.cluster;
 
+import static java.util.Objects.requireNonNull;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.Map;
@@ -25,8 +27,6 @@ import org.apache.hadoop.util.Shell.ShellCommandExecutor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
-
 /**
  * Execute a command, leveraging Hadoop's {@link ShellCommandExecutor}, on a remote host. SSH configuration provided by {@link RemoteShellOptions}.
  */
@@ -61,7 +61,7 @@ public class RemoteShell extends ShellCommandExecutor {
   }
 
   public void setRemoteShellOptions(RemoteShellOptions options) {
-    Preconditions.checkNotNull(options);
+    requireNonNull(options);
     this.options = options;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
index fea542c..3edf60d 100644
--- a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
@@ -17,7 +17,7 @@
 package org.apache.accumulo.cluster.standalone;
 
 import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -168,7 +168,7 @@ public class StandaloneClusterControl implements ClusterControl {
    *           If SetGoalState returns a non-zero result
    */
   public void setGoalState(String goalState) throws IOException {
-    checkNotNull(goalState, "Goal state must not be null");
+    requireNonNull(goalState, "Goal state must not be null");
     checkArgument(MasterGoalState.valueOf(goalState) != null, "Unknown goal state: " + goalState);
     File confDir = getConfDir();
     String master = getHosts(new File(confDir, "masters")).get(0);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
index 61b4629..80c4edc 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.minicluster.impl;
 
+import static java.util.Objects.requireNonNull;
+
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -39,7 +41,6 @@ import org.apache.zookeeper.server.ZooKeeperServerMain;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
 
 /**
@@ -58,7 +59,7 @@ public class MiniAccumuloClusterControl implements ClusterControl {
   final List<Process> tabletServerProcesses = new ArrayList<Process>();
 
   public MiniAccumuloClusterControl(MiniAccumuloClusterImpl cluster) {
-    Preconditions.checkNotNull(cluster);
+    requireNonNull(cluster);
     this.cluster = cluster;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java b/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
index a35f39c..8039207 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.server;
 
+import static com.google.common.base.Preconditions.checkArgument;
+
 import java.io.IOException;
 
 import org.apache.accumulo.core.client.AccumuloException;
@@ -40,8 +42,6 @@ import org.apache.accumulo.server.security.SystemCredentials;
 import org.apache.accumulo.server.security.delegation.AuthenticationTokenSecretManager;
 import org.apache.hadoop.security.UserGroupInformation;
 
-import com.google.common.base.Preconditions;
-
 /**
  * Provides a server context for Accumulo server components that operate with the system credentials and have access to the system files and configuration.
  */
@@ -86,9 +86,8 @@ public class AccumuloServerContext extends ClientContext {
       throw new RuntimeException("Could not get login user", e);
     }
 
-    Preconditions.checkArgument(loginUser.hasKerberosCredentials(), "Server does not have Kerberos credentials");
-    Preconditions.checkArgument(kerberosPrincipal.equals(loginUser.getUserName()),
-        "Expected login user to be " + kerberosPrincipal + " but was " + loginUser.getUserName());
+    checkArgument(loginUser.hasKerberosCredentials(), "Server does not have Kerberos credentials");
+    checkArgument(kerberosPrincipal.equals(loginUser.getUserName()), "Expected login user to be " + kerberosPrincipal + " but was " + loginUser.getUserName());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
index d167dd2..6c6c77c 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.server.fs;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.io.IOException;
 import java.net.URI;
@@ -116,7 +116,7 @@ public class VolumeManagerImpl implements VolumeManager {
 
   @Override
   public FSDataOutputStream create(Path path) throws IOException {
-    checkNotNull(path);
+    requireNonNull(path);
 
     Volume v = getVolumeByPath(path);
 
@@ -125,7 +125,7 @@ public class VolumeManagerImpl implements VolumeManager {
 
   @Override
   public FSDataOutputStream create(Path path, boolean overwrite) throws IOException {
-    checkNotNull(path);
+    requireNonNull(path);
 
     Volume v = getVolumeByPath(path);
 
@@ -150,7 +150,7 @@ public class VolumeManagerImpl implements VolumeManager {
 
   @Override
   public FSDataOutputStream create(Path path, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException {
-    checkNotNull(path);
+    requireNonNull(path);
 
     Volume v = getVolumeByPath(path);
     FileSystem fs = v.getFileSystem();
@@ -161,7 +161,7 @@ public class VolumeManagerImpl implements VolumeManager {
 
   @Override
   public boolean createNewFile(Path path) throws IOException {
-    checkNotNull(path);
+    requireNonNull(path);
 
     Volume v = getVolumeByPath(path);
     return v.getFileSystem().createNewFile(path);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b639709e/server/base/src/main/java/org/apache/accumulo/server/master/balancer/GroupBalancer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/GroupBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/GroupBalancer.java
index 9734528..2ea8e71 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/GroupBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/GroupBalancer.java
@@ -17,6 +17,9 @@
 
 package org.apache.accumulo.server.master.balancer;
 
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkState;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -48,7 +51,6 @@ import org.apache.commons.lang.mutable.MutableInt;
 import org.apache.hadoop.io.Text;
 
 import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
 import com.google.common.collect.HashBasedTable;
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.Iterators;
@@ -322,7 +324,7 @@ public abstract class GroupBalancer extends TabletBalancer {
     }
 
     public void addGroup(String group) {
-      Preconditions.checkState(!finishedAdding);
+      checkState(!finishedAdding);
 
       MutableInt mi = initialCounts.get(group);
       if (mi == null) {
@@ -334,7 +336,7 @@ public abstract class GroupBalancer extends TabletBalancer {
     }
 
     public void finishedAdding(Map<String,Integer> expectedCounts) {
-      Preconditions.checkState(!finishedAdding);
+      checkState(!finishedAdding);
       finishedAdding = true;
       this.expectedCounts = expectedCounts;
 
@@ -355,16 +357,16 @@ public abstract class GroupBalancer extends TabletBalancer {
     }
 
     public void moveOff(String group, int num) {
-      Preconditions.checkArgument(num > 0);
-      Preconditions.checkState(finishedAdding);
+      checkArgument(num > 0);
+      checkState(finishedAdding);
 
       Integer extraCount = extraCounts.get(group);
 
-      Preconditions.checkArgument(extraCount != null && extraCount >= num, "group=%s num=%s extraCount=%s", group, num, extraCount);
+      checkArgument(extraCount != null && extraCount >= num, "group=%s num=%s extraCount=%s", group, num, extraCount);
 
       MutableInt initialCount = initialCounts.get(group);
 
-      Preconditions.checkArgument(initialCount.intValue() >= num);
+      checkArgument(initialCount.intValue() >= num);
 
       initialCount.subtract(num);
 
@@ -376,9 +378,9 @@ public abstract class GroupBalancer extends TabletBalancer {
     }
 
     public void moveTo(String group, int num) {
-      Preconditions.checkArgument(num > 0);
-      Preconditions.checkArgument(expectedCounts.containsKey(group));
-      Preconditions.checkState(finishedAdding);
+      checkArgument(num > 0);
+      checkArgument(expectedCounts.containsKey(group));
+      checkState(finishedAdding);
 
       Integer deficit = expectedDeficits.get(group);
       if (deficit != null) {
@@ -404,12 +406,12 @@ public abstract class GroupBalancer extends TabletBalancer {
     }
 
     public Map<String,Integer> getExpectedDeficits() {
-      Preconditions.checkState(finishedAdding);
+      checkState(finishedAdding);
       return Collections.unmodifiableMap(expectedDeficits);
     }
 
     public Map<String,Integer> getExtras() {
-      Preconditions.checkState(finishedAdding);
+      checkState(finishedAdding);
       return Collections.unmodifiableMap(extraCounts);
     }
 
@@ -455,8 +457,8 @@ public abstract class GroupBalancer extends TabletBalancer {
     private int totalMoves = 0;
 
     public void move(String group, int num, TserverGroupInfo src, TserverGroupInfo dest) {
-      Preconditions.checkArgument(num > 0);
-      Preconditions.checkArgument(!src.equals(dest));
+      checkArgument(num > 0);
+      checkArgument(!src.equals(dest));
 
       src.moveOff(group, num);
       dest.moveTo(group, num);


Mime
View raw message