diff --git a/qa/pom.xml b/qa/pom.xml
index a402f1793f5..dd048c6e41e 100644
--- a/qa/pom.xml
+++ b/qa/pom.xml
@@ -113,11 +113,6 @@
compiler
provided
-
- com.google.guava
- guava
- provided
-
com.carrotsearch
hppc
diff --git a/shield/src/main/java/org/elasticsearch/shield/audit/index/IndexAuditTrail.java b/shield/src/main/java/org/elasticsearch/shield/audit/index/IndexAuditTrail.java
index 67196f549f5..30512967d70 100644
--- a/shield/src/main/java/org/elasticsearch/shield/audit/index/IndexAuditTrail.java
+++ b/shield/src/main/java/org/elasticsearch/shield/audit/index/IndexAuditTrail.java
@@ -5,8 +5,6 @@
*/
package org.elasticsearch.shield.audit.index;
-import com.google.common.base.Splitter;
-
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequest;
@@ -66,11 +64,7 @@ import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.EnumSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.Lock;
@@ -696,7 +690,7 @@ public class IndexAuditTrail extends AbstractComponent implements AuditTrail, Cl
List> hostPortPairs = new ArrayList<>();
for (String host : hosts) {
- List hostPort = Splitter.on(":").splitToList(host.trim());
+ List hostPort = Arrays.asList(host.trim().split(":"));
if (hostPort.size() != 1 && hostPort.size() != 2) {
logger.warn("invalid host:port specified: [{}] for setting [shield.audit.index.client.hosts]", host);
}
diff --git a/shield/src/test/java/org/elasticsearch/shield/authc/RunAsIntegTests.java b/shield/src/test/java/org/elasticsearch/shield/authc/RunAsIntegTests.java
index e5072ae8028..2cad0946887 100644
--- a/shield/src/test/java/org/elasticsearch/shield/authc/RunAsIntegTests.java
+++ b/shield/src/test/java/org/elasticsearch/shield/authc/RunAsIntegTests.java
@@ -5,7 +5,6 @@
*/
package org.elasticsearch.shield.authc;
-import com.google.common.base.Predicate;
import org.elasticsearch.ElasticsearchSecurityException;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
diff --git a/watcher/src/main/java/org/elasticsearch/watcher/support/SearchRequestEquivalence.java b/watcher/src/main/java/org/elasticsearch/watcher/support/SearchRequestEquivalence.java
index 17d7eb6f8d7..04d294bca63 100644
--- a/watcher/src/main/java/org/elasticsearch/watcher/support/SearchRequestEquivalence.java
+++ b/watcher/src/main/java/org/elasticsearch/watcher/support/SearchRequestEquivalence.java
@@ -5,11 +5,10 @@
*/
package org.elasticsearch.watcher.support;
-import com.google.common.base.Equivalence;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
-import java.io.IOException;
+import javax.annotation.Nullable;
import java.util.Arrays;
import static org.elasticsearch.watcher.support.Exceptions.illegalState;
@@ -21,14 +20,17 @@ import static org.elasticsearch.watcher.support.Exceptions.illegalState;
* don't compare search requests in normal runtime... we only do it in the tests. The is here basically
* due to the lack of equals/hashcode support in SearchRequest in core.
*/
-public final class SearchRequestEquivalence extends Equivalence {
+public final class SearchRequestEquivalence {
public static final SearchRequestEquivalence INSTANCE = new SearchRequestEquivalence();
private SearchRequestEquivalence() {
}
- @Override
+ public final boolean equivalent(@Nullable SearchRequest a, @Nullable SearchRequest b) {
+ return a == b ? true : (a != null && b != null ? this.doEquivalent(a, b) : false);
+ }
+
protected boolean doEquivalent(SearchRequest r1, SearchRequest r2) {
try {
BytesStreamOutput output1 = new BytesStreamOutput();
@@ -42,15 +44,4 @@ public final class SearchRequestEquivalence extends Equivalence {
throw illegalState("could not compare search requests", t);
}
}
-
- @Override
- protected int doHash(SearchRequest request) {
- try {
- BytesStreamOutput output = new BytesStreamOutput();
- request.writeTo(output);
- return Arrays.hashCode(output.bytes().toBytes());
- } catch (IOException ioe) {
- throw illegalState("could not compute hashcode for search request", ioe);
- }
- }
}
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/WatcherLifeCycleServiceTests.java b/watcher/src/test/java/org/elasticsearch/watcher/WatcherLifeCycleServiceTests.java
index ec44247fb26..4bf872df99d 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/WatcherLifeCycleServiceTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/WatcherLifeCycleServiceTests.java
@@ -5,7 +5,6 @@
*/
package org.elasticsearch.watcher;
-import com.google.common.util.concurrent.MoreExecutors;
import org.elasticsearch.cluster.*;
import org.elasticsearch.cluster.block.ClusterBlocks;
import org.elasticsearch.cluster.node.DiscoveryNodes;