diff --git a/.idea/libraries/google_collect.xml b/.idea/libraries/google_collect.xml
deleted file mode 100644
index e7950c5b919..00000000000
--- a/.idea/libraries/google_collect.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules/elasticsearch.iml b/.idea/modules/elasticsearch.iml
index 582e94864e5..69b50a8bef9 100644
--- a/.idea/modules/elasticsearch.iml
+++ b/.idea/modules/elasticsearch.iml
@@ -15,7 +15,6 @@
-
diff --git a/modules/elasticsearch/build.gradle b/modules/elasticsearch/build.gradle
index df61b281b75..281c404f940 100644
--- a/modules/elasticsearch/build.gradle
+++ b/modules/elasticsearch/build.gradle
@@ -37,7 +37,6 @@ dependencies {
compile('log4j:log4j:1.2.15') { transitive = false }
compile 'joda-time:joda-time:1.6'
- compile 'com.google.collections:google-collections:1.0'
compile 'org.codehaus.jackson:jackson-core-asl:1.5.1'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.5.1'
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/Nullable.java b/modules/elasticsearch/src/main/java/javax/annotation/Nullable.java
similarity index 97%
rename from modules/elasticsearch/src/main/java/org/elasticsearch/util/Nullable.java
rename to modules/elasticsearch/src/main/java/javax/annotation/Nullable.java
index 0940e3263a6..ae2760ea3aa 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/Nullable.java
+++ b/modules/elasticsearch/src/main/java/javax/annotation/Nullable.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.elasticsearch.util;
+package javax.annotation;
import java.lang.annotation.*;
@@ -32,4 +32,4 @@ import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER, ElementType.FIELD, ElementType.METHOD})
public @interface Nullable {
-}
+}
\ No newline at end of file
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java
index 5eb0771015c..9a0070dffdd 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java
@@ -19,8 +19,8 @@
package org.elasticsearch.action.admin.cluster.health;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Maps;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.Maps;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
@@ -30,7 +30,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.action.admin.cluster.health.ClusterIndexHealth.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterIndexHealth.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterIndexHealth.java
index b42062987b8..7a1e247a420 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterIndexHealth.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterIndexHealth.java
@@ -19,8 +19,8 @@
package org.elasticsearch.action.admin.cluster.health;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Maps;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.Maps;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
import org.elasticsearch.util.io.stream.Streamable;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java
index c317de8d473..c2613aa0503 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.admin.cluster.node.info;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.elasticsearch.action.support.nodes.NodeOperationResponse;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.util.io.stream.StreamInput;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfo.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfo.java
index 3417716b4e3..e1f704f34e9 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfo.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfo.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.admin.cluster.node.info;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import com.google.inject.Inject;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.action.TransportActions;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/TransportNodesShutdown.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/TransportNodesShutdown.java
index dd5925d9b27..405c21cafc5 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/TransportNodesShutdown.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/TransportNodesShutdown.java
@@ -40,7 +40,7 @@ import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.util.TimeValue.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/ping/broadcast/TransportBroadcastPingAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/ping/broadcast/TransportBroadcastPingAction.java
index fc281fe5af6..3bc59d96a15 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/ping/broadcast/TransportBroadcastPingAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/cluster/ping/broadcast/TransportBroadcastPingAction.java
@@ -38,7 +38,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/alias/IndicesAliasesRequest.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/alias/IndicesAliasesRequest.java
index df53d90f992..c2289d0252d 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/alias/IndicesAliasesRequest.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/alias/IndicesAliasesRequest.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.admin.indices.alias;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.support.master.MasterNodeOperationRequest;
import org.elasticsearch.cluster.metadata.AliasAction;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java
index 6842cbb87f4..d34d8db03fd 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java
@@ -39,7 +39,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* Indices clear cache action.
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java
index d0f08d52132..645420015ae 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java
@@ -35,7 +35,7 @@ import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.elasticsearch.action.Actions.*;
import static org.elasticsearch.util.TimeValue.*;
import static org.elasticsearch.util.json.Jackson.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java
index c7d801b4283..4db8ec07856 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java
@@ -40,7 +40,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* Flush Action.
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize/TransportOptimizeAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize/TransportOptimizeAction.java
index 90828298978..bce3f65344b 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize/TransportOptimizeAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize/TransportOptimizeAction.java
@@ -40,7 +40,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* Optimize index/indices action.
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java
index 0a0bbb2cb41..5315d86a90c 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java
@@ -40,7 +40,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* Refresh action.
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndexShardStatus.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndexShardStatus.java
index b366568cdce..d1f5950cd1a 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndexShardStatus.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndexShardStatus.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.admin.indices.status;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.util.SizeValue;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndexStatus.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndexStatus.java
index 310787488d1..dbe2b55e7fb 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndexStatus.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndexStatus.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.admin.indices.status;
-import com.google.common.collect.Maps;
+import org.elasticsearch.util.gcommon.collect.Maps;
import org.elasticsearch.util.SizeValue;
import org.elasticsearch.util.settings.Settings;
@@ -27,7 +27,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndicesStatusResponse.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndicesStatusResponse.java
index 91b25f61268..a5f52d29459 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndicesStatusResponse.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/IndicesStatusResponse.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.admin.indices.status;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse;
import org.elasticsearch.cluster.ClusterState;
@@ -31,8 +31,8 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.elasticsearch.action.admin.indices.status.ShardStatus.*;
import static org.elasticsearch.util.settings.ImmutableSettings.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/TransportIndicesStatusAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/TransportIndicesStatusAction.java
index 59b55d28b95..c5b4261897f 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/TransportIndicesStatusAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/TransportIndicesStatusAction.java
@@ -42,7 +42,7 @@ import java.io.IOException;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/CountRequest.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/CountRequest.java
index 4fe99282fb8..d4a66acb229 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/CountRequest.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/CountRequest.java
@@ -22,13 +22,13 @@ package org.elasticsearch.action.count;
import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest;
import org.elasticsearch.action.support.broadcast.BroadcastOperationThreading;
import org.elasticsearch.index.query.QueryBuilder;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.Required;
import org.elasticsearch.util.Strings;
import org.elasticsearch.util.Unicode;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.Arrays;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/ShardCountRequest.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/ShardCountRequest.java
index 3a32982171e..8423e1c03e9 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/ShardCountRequest.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/ShardCountRequest.java
@@ -20,11 +20,11 @@
package org.elasticsearch.action.count;
import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.Strings;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
+import javax.annotation.Nullable;
import java.io.IOException;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/TransportCountAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/TransportCountAction.java
index 582abed2c90..c240b3d9681 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/TransportCountAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/count/TransportCountAction.java
@@ -39,7 +39,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryResponse.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryResponse.java
index 9ff5920cd36..fde3e508089 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryResponse.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryResponse.java
@@ -28,7 +28,7 @@ import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* The response of delete by query action. Holds the {@link IndexDeleteByQueryResponse}s from all the
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/ShardDeleteByQueryRequest.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/ShardDeleteByQueryRequest.java
index 633c4199272..f2d2636b237 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/ShardDeleteByQueryRequest.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/ShardDeleteByQueryRequest.java
@@ -21,12 +21,12 @@ package org.elasticsearch.action.deletebyquery;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.support.replication.ShardReplicationOperationRequest;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.Strings;
import org.elasticsearch.util.Unicode;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.Arrays;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java
index 678eae81a05..678757600f4 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.get;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.elasticsearch.ElasticSearchParseException;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.util.Unicode;
@@ -31,8 +31,8 @@ import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
-import static com.google.common.collect.Iterators.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Iterators.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.elasticsearch.action.get.GetField.*;
import static org.elasticsearch.util.json.Jackson.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/TransportGetAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/TransportGetAction.java
index cb781d3f244..e8e8c584da8 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/TransportGetAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/TransportGetAction.java
@@ -41,7 +41,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* Performs the get operation.
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java
index 905e5b692cb..ca99671c2ee 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java
@@ -48,7 +48,7 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.Set;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.client.Requests.*;
import static org.elasticsearch.index.query.json.JsonQueryBuilders.*;
import static org.elasticsearch.search.builder.SearchSourceBuilder.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java
index 6ed03f71223..67463f12eed 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java
@@ -23,10 +23,10 @@ import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.search.SearchException;
import org.elasticsearch.search.SearchShardTarget;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
+import javax.annotation.Nullable;
import java.io.IOException;
import static org.elasticsearch.search.SearchShardTarget.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/AbstractListenableActionFuture.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/AbstractListenableActionFuture.java
index 8884ebe5c02..35d2a84aa51 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/AbstractListenableActionFuture.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/AbstractListenableActionFuture.java
@@ -25,7 +25,7 @@ import org.elasticsearch.threadpool.ThreadPool;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequest.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequest.java
index 18792d88cce..3909eee5504 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequest.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequest.java
@@ -21,11 +21,11 @@ package org.elasticsearch.action.support.broadcast;
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionRequestValidationException;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.Strings;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
+import javax.annotation.Nullable;
import java.io.IOException;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationResponse.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationResponse.java
index 301d07b7362..fca58a4e578 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationResponse.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationResponse.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.support.broadcast;
-import com.google.common.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.util.io.stream.StreamInput;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java
index ed26cca460e..3d4f427c795 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.support.broadcast;
-import com.google.common.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.support.BaseAction;
@@ -46,7 +46,7 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationResponse.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationResponse.java
index c448cc4da5c..215b7cb6b88 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationResponse.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationResponse.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.support.nodes;
-import com.google.common.collect.Maps;
+import org.elasticsearch.util.gcommon.collect.Maps;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.util.io.stream.StreamInput;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/FieldTermsFreq.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/FieldTermsFreq.java
index b054b8393cc..153cf32276b 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/FieldTermsFreq.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/FieldTermsFreq.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.terms;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
import org.elasticsearch.util.io.stream.Streamable;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/TermsResponse.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/TermsResponse.java
index 7465b555a9f..dfe911a21fd 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/TermsResponse.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/TermsResponse.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.terms;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse;
import org.elasticsearch.util.io.stream.StreamInput;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/TransportTermsAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/TransportTermsAction.java
index 7844209048d..c99f1ec2a83 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/TransportTermsAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/terms/TransportTermsAction.java
@@ -19,7 +19,7 @@
package org.elasticsearch.action.terms;
-import com.google.common.collect.Maps;
+import org.elasticsearch.util.gcommon.collect.Maps;
import com.google.inject.Inject;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermDocs;
@@ -44,17 +44,17 @@ import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.util.BoundedTreeSet;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.gnu.trove.TObjectIntHashMap;
import org.elasticsearch.util.gnu.trove.TObjectIntIterator;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.regex.Pattern;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java b/modules/elasticsearch/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java
index 79c65135ded..71d793e84fb 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java
@@ -39,7 +39,7 @@ import org.elasticsearch.util.settings.Settings;
import java.io.File;
import java.util.Set;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static jline.ANSIBuffer.ANSICodes.*;
import static org.elasticsearch.util.settings.ImmutableSettings.Builder.*;
import static org.elasticsearch.util.settings.ImmutableSettings.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/client/transport/TransportClient.java b/modules/elasticsearch/src/main/java/org/elasticsearch/client/transport/TransportClient.java
index 50765c44376..f24ff5df396 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/client/transport/TransportClient.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/client/transport/TransportClient.java
@@ -19,7 +19,7 @@
package org.elasticsearch.client.transport;
-import com.google.common.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/client/transport/TransportClientNodesService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/client/transport/TransportClientNodesService.java
index b8b61a00e63..a8d0c488bb5 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/client/transport/TransportClientNodesService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/client/transport/TransportClientNodesService.java
@@ -19,7 +19,7 @@
package org.elasticsearch.client.transport;
-import com.google.common.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
import com.google.inject.Inject;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.action.TransportActions;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/ClusterState.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/ClusterState.java
index 14941103719..de1ad830e23 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/ClusterState.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/ClusterState.java
@@ -24,13 +24,13 @@ import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.RoutingNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.io.stream.BytesStreamInput;
import org.elasticsearch.util.io.stream.BytesStreamOutput;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.io.IOException;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java
index cbd7fc78f73..003899f504e 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java
@@ -44,7 +44,7 @@ import org.elasticsearch.util.settings.Settings;
import java.io.IOException;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.cluster.ClusterState.*;
import static org.elasticsearch.cluster.routing.ImmutableShardRouting.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java
index 17da4f57a10..042d1edbf98 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java
@@ -19,12 +19,11 @@
package org.elasticsearch.cluster.metadata;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
import org.elasticsearch.util.MapBuilder;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.Preconditions;
import org.elasticsearch.util.concurrent.Immutable;
import org.elasticsearch.util.io.stream.StreamInput;
@@ -34,6 +33,7 @@ import org.elasticsearch.util.json.ToJson;
import org.elasticsearch.util.settings.ImmutableSettings;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.Map;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java
index 77cc273d7ab..9efbc5e290e 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java
@@ -19,17 +19,16 @@
package org.elasticsearch.cluster.metadata;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-import com.google.common.collect.UnmodifiableIterator;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
import org.elasticsearch.ElasticSearchIllegalArgumentException;
import org.elasticsearch.index.Index;
import org.elasticsearch.indices.IndexMissingException;
import org.elasticsearch.util.MapBuilder;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.concurrent.Immutable;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
@@ -38,11 +37,12 @@ import org.elasticsearch.util.json.StringJsonBuilder;
import org.elasticsearch.util.json.ToJson;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.*;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.util.MapBuilder.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataService.java
index 6afb6ba527e..9dfe092bbaa 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataService.java
@@ -19,7 +19,7 @@
package org.elasticsearch.cluster.metadata;
-import com.google.common.collect.Maps;
+import org.elasticsearch.util.gcommon.collect.Maps;
import com.google.inject.Inject;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.cluster.ClusterService;
@@ -59,8 +59,8 @@ import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import static com.google.common.collect.Maps.*;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.cluster.ClusterState.*;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.elasticsearch.cluster.metadata.MetaData.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java
index 7f4bfb676c5..f28d1d50de9 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java
@@ -19,9 +19,9 @@
package org.elasticsearch.cluster.node;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.Maps;
import org.apache.lucene.util.StringHelper;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java
index 67981e62662..15b3c8cc4d7 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java
@@ -19,21 +19,21 @@
package org.elasticsearch.cluster.node;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.UnmodifiableIterator;
-import org.elasticsearch.util.Nullable;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
import org.elasticsearch.util.transport.TransportAddress;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/ImmutableShardRouting.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/ImmutableShardRouting.java
index ec547f5d88c..6b674873aab 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/ImmutableShardRouting.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/ImmutableShardRouting.java
@@ -19,7 +19,7 @@
package org.elasticsearch.cluster.routing;
-import com.google.common.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/IndexRoutingTable.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/IndexRoutingTable.java
index 078c7a336b7..777c4969e1d 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/IndexRoutingTable.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/IndexRoutingTable.java
@@ -19,9 +19,9 @@
package org.elasticsearch.cluster.routing;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Sets;
-import com.google.common.collect.UnmodifiableIterator;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.Sets;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.util.IdentityHashSet;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java
index b1d73dd53f6..a7229074479 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java
@@ -19,8 +19,8 @@
package org.elasticsearch.cluster.routing;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.UnmodifiableIterator;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.util.concurrent.jsr166y.ThreadLocalRandom;
import org.elasticsearch.util.io.stream.StreamInput;
@@ -32,7 +32,7 @@ import java.util.List;
import java.util.NoSuchElementException;
import java.util.concurrent.atomic.AtomicInteger;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java
index e7185f2f555..31b5bc0f6f2 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java
@@ -25,7 +25,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java
index 9b578fa2edd..e8c2cf87390 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java
@@ -24,8 +24,8 @@ import org.elasticsearch.util.concurrent.NotThreadSafe;
import java.util.*;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingTable.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingTable.java
index 36e980abfb7..b0708d68beb 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingTable.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingTable.java
@@ -19,9 +19,9 @@
package org.elasticsearch.cluster.routing;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.UnmodifiableIterator;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.index.Index;
@@ -34,7 +34,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingTableValidation.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingTableValidation.java
index 546b8e8712e..67746c218e9 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingTableValidation.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/RoutingTableValidation.java
@@ -19,9 +19,9 @@
package org.elasticsearch.cluster.routing;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
import org.elasticsearch.util.io.stream.Streamable;
@@ -31,8 +31,8 @@ import java.io.Serializable;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/strategy/DefaultShardsRoutingStrategy.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/strategy/DefaultShardsRoutingStrategy.java
index c9a7a7d0f11..ee1be9af054 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/strategy/DefaultShardsRoutingStrategy.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/strategy/DefaultShardsRoutingStrategy.java
@@ -27,7 +27,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/local/LocalDiscovery.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/local/LocalDiscovery.java
index aebc1d8cc8e..6e70f7d37d5 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/local/LocalDiscovery.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/local/LocalDiscovery.java
@@ -40,7 +40,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.cluster.ClusterState.*;
import static org.elasticsearch.cluster.node.DiscoveryNode.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java
index c89613444d9..feedb3b4130 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java
@@ -46,7 +46,7 @@ import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.cluster.ClusterState.*;
import static org.elasticsearch.cluster.node.DiscoveryNode.*;
import static org.elasticsearch.cluster.node.DiscoveryNodes.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/elect/ElectMasterService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/elect/ElectMasterService.java
index d8067301e9a..8e37891f9a1 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/elect/ElectMasterService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/elect/ElectMasterService.java
@@ -19,7 +19,7 @@
package org.elasticsearch.discovery.zen.elect;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.util.component.AbstractComponent;
import org.elasticsearch.util.settings.Settings;
@@ -29,7 +29,7 @@ import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPingService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPingService.java
index f30effb39e9..b58ffc775f3 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPingService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPingService.java
@@ -19,7 +19,7 @@
package org.elasticsearch.discovery.zen.ping;
-import com.google.common.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
import com.google.inject.Inject;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.ElasticSearchIllegalStateException;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java
index 808ddd5b83c..125f67cbb0f 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java
@@ -19,7 +19,7 @@
package org.elasticsearch.discovery.zen.ping.unicast;
-import com.google.common.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.ElasticSearchIllegalArgumentException;
import org.elasticsearch.cluster.ClusterName;
@@ -47,7 +47,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.discovery.zen.ping.ZenPing.PingResponse.*;
import static org.elasticsearch.util.TimeValue.*;
import static org.elasticsearch.util.concurrent.ConcurrentMaps.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/GatewayService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/GatewayService.java
index c320ae9e84a..2576c2437ef 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/GatewayService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/GatewayService.java
@@ -27,11 +27,11 @@ import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.metadata.MetaDataService;
import org.elasticsearch.discovery.DiscoveryService;
import org.elasticsearch.threadpool.ThreadPool;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.TimeValue;
import org.elasticsearch.util.component.AbstractLifecycleComponent;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/AnalysisService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/AnalysisService.java
index c68b0b17c51..39c8ae12097 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/AnalysisService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/AnalysisService.java
@@ -19,20 +19,20 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import com.google.inject.Inject;
import org.apache.lucene.analysis.Analyzer;
import org.elasticsearch.index.AbstractIndexComponent;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.settings.IndexSettings;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.component.CloseableComponent;
import org.elasticsearch.util.settings.ImmutableSettings;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/ArabicAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/ArabicAnalyzerProvider.java
index f3ca137082b..5904c70a910 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/ArabicAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/ArabicAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.ar.ArabicAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/BrazilianAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/BrazilianAnalyzerProvider.java
index 54d5abe5653..2e9042b653d 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/BrazilianAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/BrazilianAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.br.BrazilianAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/BrazilianStemTokenFilterFactory.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/BrazilianStemTokenFilterFactory.java
index efb55eeabed..8de735a25f5 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/BrazilianStemTokenFilterFactory.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/BrazilianStemTokenFilterFactory.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.TokenStream;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CjkAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CjkAnalyzerProvider.java
index 89b20097cb2..52553cc09e5 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CjkAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CjkAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.cjk.CJKAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CustomAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CustomAnalyzerProvider.java
index 2d713f6fd56..3e22e2f549d 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CustomAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CustomAnalyzerProvider.java
@@ -29,7 +29,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* A custom analyzer that is built out of a single {@link org.apache.lucene.analysis.Tokenizer} and a list
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CzechAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CzechAnalyzerProvider.java
index 5527cec22db..f1489f6c9f7 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CzechAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/CzechAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.cz.CzechAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/DutchAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/DutchAnalyzerProvider.java
index 17d89999d99..1e9ccf43129 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/DutchAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/DutchAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.nl.DutchAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/DutchStemTokenFilterFactory.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/DutchStemTokenFilterFactory.java
index 75837d12371..cbc155fbb83 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/DutchStemTokenFilterFactory.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/DutchStemTokenFilterFactory.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.TokenStream;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FieldNameAnalyzer.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FieldNameAnalyzer.java
index 33fa2a80386..7022b988096 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FieldNameAnalyzer.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FieldNameAnalyzer.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FrenchAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FrenchAnalyzerProvider.java
index 9cfcb782fc5..b7ea6d865bd 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FrenchAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FrenchAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.fr.FrenchAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FrenchStemTokenFilterFactory.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FrenchStemTokenFilterFactory.java
index ebf0ca5c1a3..7eef5ed88ac 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FrenchStemTokenFilterFactory.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/FrenchStemTokenFilterFactory.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.TokenStream;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GermanAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GermanAnalyzerProvider.java
index d1848d344c0..d4d4d27101b 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GermanAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GermanAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.de.GermanAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GermanStemTokenFilterFactory.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GermanStemTokenFilterFactory.java
index 2601bbb14dc..59fa291f801 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GermanStemTokenFilterFactory.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GermanStemTokenFilterFactory.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.TokenStream;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GreekAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GreekAnalyzerProvider.java
index 7479382b96d..33abc9f6705 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GreekAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/GreekAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.el.GreekAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/PersianAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/PersianAnalyzerProvider.java
index 517db2d21a9..c5297e05281 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/PersianAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/PersianAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.fa.PersianAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/RussianAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/RussianAnalyzerProvider.java
index 76fbecc7245..f4ce8acd4e0 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/RussianAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/RussianAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.ru.RussianAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StandardAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StandardAnalyzerProvider.java
index a45531466c3..9d4153ba3fe 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StandardAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StandardAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.StopAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StopAnalyzerProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StopAnalyzerProvider.java
index 07dd429db0f..22a611314c4 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StopAnalyzerProvider.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StopAnalyzerProvider.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.StopAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StopTokenFilterFactory.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StopTokenFilterFactory.java
index 1f6f22d1407..d67ddaaaae7 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StopTokenFilterFactory.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/analysis/StopTokenFilterFactory.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.analysis;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import org.apache.lucene.analysis.StopAnalyzer;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/soft/SoftFilterCache.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/soft/SoftFilterCache.java
index a8f81a656e5..e26bab14212 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/soft/SoftFilterCache.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/soft/SoftFilterCache.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.cache.filter.soft;
-import com.google.common.collect.MapMaker;
+import org.elasticsearch.util.gcommon.collect.MapMaker;
import com.google.inject.Inject;
import org.apache.lucene.search.DocIdSet;
import org.apache.lucene.search.Filter;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/weak/WeakFilterCache.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/weak/WeakFilterCache.java
index 4fc5a04ba3a..397f803deec 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/weak/WeakFilterCache.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/weak/WeakFilterCache.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.cache.filter.weak;
-import com.google.common.collect.MapMaker;
+import org.elasticsearch.util.gcommon.collect.MapMaker;
import com.google.inject.Inject;
import org.apache.lucene.search.DocIdSet;
import org.apache.lucene.search.Filter;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/engine/Engine.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/engine/Engine.java
index 90b7956366a..4d8d14cc3f4 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/engine/Engine.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/engine/Engine.java
@@ -29,12 +29,13 @@ import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.index.deletionpolicy.SnapshotIndexCommit;
import org.elasticsearch.index.shard.IndexShardComponent;
import org.elasticsearch.index.translog.Translog;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.SizeValue;
import org.elasticsearch.util.component.CloseableComponent;
import org.elasticsearch.util.concurrent.ThreadSafe;
import org.elasticsearch.util.lease.Releasable;
+import javax.annotation.Nullable;
+
/**
* @author kimchy (shay.banon)
*/
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/fs/FsIndexShardGateway.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/fs/FsIndexShardGateway.java
index e3d08d9bca1..1404e72d389 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/fs/FsIndexShardGateway.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/fs/FsIndexShardGateway.java
@@ -50,7 +50,7 @@ import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.index.translog.TranslogStreams.*;
import static org.elasticsearch.util.io.FileSystemUtils.*;
import static org.elasticsearch.util.lucene.Directories.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/DocumentFieldMappers.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/DocumentFieldMappers.java
index 988b9bda960..b925b24707b 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/DocumentFieldMappers.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/DocumentFieldMappers.java
@@ -19,18 +19,18 @@
package org.elasticsearch.index.mapper;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.UnmodifiableIterator;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.Iterables;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import org.apache.lucene.analysis.Analyzer;
import org.elasticsearch.index.analysis.FieldNameAnalyzer;
import org.elasticsearch.util.concurrent.Immutable;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/DocumentMapper.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/DocumentMapper.java
index db5dc9e3731..8f7c54d4752 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/DocumentMapper.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/DocumentMapper.java
@@ -21,9 +21,10 @@ package org.elasticsearch.index.mapper;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.document.Fieldable;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.concurrent.ThreadSafe;
+import javax.annotation.Nullable;
+
/**
* @author kimchy (shay.banon)
*/
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/FieldMappers.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/FieldMappers.java
index c1d218692f4..e5db03e7e6c 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/FieldMappers.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/FieldMappers.java
@@ -19,9 +19,9 @@
package org.elasticsearch.index.mapper;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterators;
-import com.google.common.collect.UnmodifiableIterator;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import org.elasticsearch.util.concurrent.Immutable;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java
index 1acc9920a89..ddb0954a930 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.mapper;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.UnmodifiableIterator;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import com.google.inject.Inject;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
@@ -31,11 +31,11 @@ import org.elasticsearch.index.Index;
import org.elasticsearch.index.analysis.AnalysisService;
import org.elasticsearch.index.mapper.json.JsonDocumentMapperParser;
import org.elasticsearch.index.settings.IndexSettings;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.concurrent.ThreadSafe;
import org.elasticsearch.util.io.Streams;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonDocumentMapper.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonDocumentMapper.java
index e867a7a739c..acd5aa45cf2 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonDocumentMapper.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonDocumentMapper.java
@@ -26,7 +26,6 @@ import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
import org.elasticsearch.index.analysis.NamedAnalyzer;
import org.elasticsearch.index.mapper.*;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.Preconditions;
import org.elasticsearch.util.ThreadLocals;
import org.elasticsearch.util.json.Jackson;
@@ -34,10 +33,11 @@ import org.elasticsearch.util.json.JsonBuilder;
import org.elasticsearch.util.json.StringJsonBuilder;
import org.elasticsearch.util.json.ToJson;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.util.json.JsonBuilder.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonDocumentMapperParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonDocumentMapperParser.java
index dd815e842c6..4d72e65549e 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonDocumentMapperParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonDocumentMapperParser.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.mapper.json;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.node.ObjectNode;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMergeContext.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMergeContext.java
index b1a2601b0f7..8edf4ac5627 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMergeContext.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMergeContext.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.mapper.json;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.elasticsearch.index.mapper.DocumentMapper;
import java.util.List;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMultiFieldMapper.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMultiFieldMapper.java
index ca55a801afb..655bb1e52c0 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMultiFieldMapper.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMultiFieldMapper.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.mapper.json;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.node.ObjectNode;
import org.elasticsearch.index.mapper.FieldMapper;
@@ -35,7 +35,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.index.mapper.json.JsonMapperBuilders.*;
import static org.elasticsearch.index.mapper.json.JsonTypeParsers.*;
import static org.elasticsearch.util.MapBuilder.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonObjectMapper.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonObjectMapper.java
index ee371dbda91..2a590bf85e4 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonObjectMapper.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonObjectMapper.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.mapper.json;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
@@ -38,8 +38,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.ImmutableMap.*;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.ImmutableMap.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.index.mapper.json.JsonMapperBuilders.*;
import static org.elasticsearch.index.mapper.json.JsonTypeParsers.*;
import static org.elasticsearch.util.MapBuilder.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonTypeParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonTypeParser.java
index e46d7e01a5e..2ac643ddd2d 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonTypeParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonTypeParser.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.mapper.json;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.node.ObjectNode;
import org.elasticsearch.index.analysis.AnalysisService;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/IndexQueryParserService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/IndexQueryParserService.java
index 8eb08926ace..f5cdc1b85b0 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/IndexQueryParserService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/IndexQueryParserService.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.query;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import com.google.inject.Inject;
import org.elasticsearch.index.AbstractIndexComponent;
import org.elasticsearch.index.Index;
@@ -29,13 +29,13 @@ import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.query.json.JsonIndexQueryParser;
import org.elasticsearch.index.settings.IndexSettings;
import org.elasticsearch.index.similarity.SimilarityService;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.settings.ImmutableSettings;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/BoolJsonFilterParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/BoolJsonFilterParser.java
index e0b40e566c9..0039156435e 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/BoolJsonFilterParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/BoolJsonFilterParser.java
@@ -32,7 +32,7 @@ import org.elasticsearch.util.settings.Settings;
import java.io.IOException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/BoolJsonQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/BoolJsonQueryParser.java
index eb709b81e7f..6dfe4e31bd1 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/BoolJsonQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/BoolJsonQueryParser.java
@@ -35,7 +35,7 @@ import org.elasticsearch.util.settings.Settings;
import java.io.IOException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.util.lucene.search.Queries.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/DisMaxJsonQueryBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/DisMaxJsonQueryBuilder.java
index 2333d3785d4..ff649c0c2c2 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/DisMaxJsonQueryBuilder.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/DisMaxJsonQueryBuilder.java
@@ -24,7 +24,7 @@ import org.elasticsearch.util.json.JsonBuilder;
import java.io.IOException;
import java.util.ArrayList;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* A query that generates the union of documents produced by its sub-queries, and that scores each document
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/DisMaxJsonQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/DisMaxJsonQueryParser.java
index 3d4a1b49759..bf62b70d6d1 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/DisMaxJsonQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/DisMaxJsonQueryParser.java
@@ -34,7 +34,7 @@ import org.elasticsearch.util.settings.Settings;
import java.io.IOException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/FuzzyLikeThisJsonQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/FuzzyLikeThisJsonQueryParser.java
index d0cbde9b0f4..53d2c1ac9ef 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/FuzzyLikeThisJsonQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/FuzzyLikeThisJsonQueryParser.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.query.json;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.apache.lucene.search.FuzzyLikeThisQuery;
import org.apache.lucene.search.Query;
import org.codehaus.jackson.JsonParser;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonIndexQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonIndexQueryParser.java
index 20191bed7d7..6f7363bbae5 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonIndexQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonIndexQueryParser.java
@@ -35,7 +35,6 @@ import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryParsingException;
import org.elasticsearch.index.settings.IndexSettings;
import org.elasticsearch.index.similarity.SimilarityService;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.ThreadLocals;
import org.elasticsearch.util.io.FastCharArrayReader;
import org.elasticsearch.util.io.FastCharArrayWriter;
@@ -43,11 +42,12 @@ import org.elasticsearch.util.io.FastStringReader;
import org.elasticsearch.util.json.Jackson;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonQueryParseContext.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonQueryParseContext.java
index b33917a9892..72daa8446eb 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonQueryParseContext.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonQueryParseContext.java
@@ -31,8 +31,8 @@ import org.elasticsearch.index.mapper.FieldMappers;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.query.QueryParsingException;
import org.elasticsearch.index.similarity.SimilarityService;
-import org.elasticsearch.util.Nullable;
+import javax.annotation.Nullable;
import java.io.IOException;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonQueryParserRegistry.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonQueryParserRegistry.java
index b4363d15c06..5b88e8f2ff5 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonQueryParserRegistry.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/JsonQueryParserRegistry.java
@@ -19,17 +19,17 @@
package org.elasticsearch.index.query.json;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.apache.lucene.util.StringHelper;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.analysis.AnalysisService;
import org.elasticsearch.index.settings.IndexSettings;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/MoreLikeThisFieldJsonQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/MoreLikeThisFieldJsonQueryParser.java
index 756684d0446..da94d219406 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/MoreLikeThisFieldJsonQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/MoreLikeThisFieldJsonQueryParser.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.query.json;
-import com.google.common.collect.Sets;
+import org.elasticsearch.util.gcommon.collect.Sets;
import org.apache.lucene.search.Query;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/MoreLikeThisJsonQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/MoreLikeThisJsonQueryParser.java
index 5ae8f021eae..172960137c8 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/MoreLikeThisJsonQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/MoreLikeThisJsonQueryParser.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.query.json;
-import com.google.common.collect.Sets;
+import org.elasticsearch.util.gcommon.collect.Sets;
import org.apache.lucene.search.Query;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
@@ -35,7 +35,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Set;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/QueryStringJsonQueryBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/QueryStringJsonQueryBuilder.java
index 4b83a2e5542..cb47f918d3a 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/QueryStringJsonQueryBuilder.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/QueryStringJsonQueryBuilder.java
@@ -25,7 +25,7 @@ import org.elasticsearch.util.trove.ExtTObjectFloatHashMap;
import java.io.IOException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* A query that parses a query string and runs it. There are two modes that this operates. The first,
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/QueryStringJsonQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/QueryStringJsonQueryParser.java
index 7669ea526fb..0bda1d5dbad 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/QueryStringJsonQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/QueryStringJsonQueryParser.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.query.json;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import com.google.inject.Inject;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.queryParser.ParseException;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/SpanNearJsonQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/SpanNearJsonQueryParser.java
index 58f5bac99c4..b6780119d05 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/SpanNearJsonQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/SpanNearJsonQueryParser.java
@@ -36,7 +36,7 @@ import org.elasticsearch.util.settings.Settings;
import java.io.IOException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/SpanOrJsonQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/SpanOrJsonQueryParser.java
index 6699639bd2b..b9d53e429f3 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/SpanOrJsonQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/SpanOrJsonQueryParser.java
@@ -35,7 +35,7 @@ import org.elasticsearch.util.settings.Settings;
import java.io.IOException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/MapperQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/MapperQueryParser.java
index 1f43d652472..9be49b95582 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/MapperQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/MapperQueryParser.java
@@ -31,8 +31,8 @@ import org.elasticsearch.index.cache.IndexCache;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.FieldMappers;
import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.util.Nullable;
+import javax.annotation.Nullable;
import java.util.List;
import static org.elasticsearch.index.query.support.QueryParsers.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/MultiFieldMapperQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/MultiFieldMapperQueryParser.java
index c7ea608def6..1018d20dbd4 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/MultiFieldMapperQueryParser.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/MultiFieldMapperQueryParser.java
@@ -24,9 +24,9 @@ import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.*;
import org.elasticsearch.index.cache.IndexCache;
import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.trove.ExtTObjectFloatHashMap;
+import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/QueryParsers.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/QueryParsers.java
index 6fe70e302c1..19b4778355f 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/QueryParsers.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/support/QueryParsers.java
@@ -23,9 +23,10 @@ import org.apache.lucene.search.*;
import org.elasticsearch.index.cache.IndexCache;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.lucene.search.TermFilter;
+import javax.annotation.Nullable;
+
/**
* @author kimchy (shay.banon)
*/
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/routing/OperationRouting.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/routing/OperationRouting.java
index f9503d3d9fc..7da54928cec 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/routing/OperationRouting.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/routing/OperationRouting.java
@@ -24,7 +24,8 @@ import org.elasticsearch.cluster.routing.GroupShardsIterator;
import org.elasticsearch.cluster.routing.ShardsIterator;
import org.elasticsearch.index.IndexShardMissingException;
import org.elasticsearch.indices.IndexMissingException;
-import org.elasticsearch.util.Nullable;
+
+import javax.annotation.Nullable;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/routing/plain/PlainOperationRouting.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/routing/plain/PlainOperationRouting.java
index e6d45bfce86..3498c115bf2 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/routing/plain/PlainOperationRouting.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/routing/plain/PlainOperationRouting.java
@@ -35,9 +35,10 @@ import org.elasticsearch.index.settings.IndexSettings;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.indices.IndexMissingException;
import org.elasticsearch.util.IdentityHashSet;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
+
/**
* @author kimchy (Shay Banon)
*/
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/service/InternalIndexService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/service/InternalIndexService.java
index fbb972733bd..4336c395743 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/service/InternalIndexService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/service/InternalIndexService.java
@@ -19,8 +19,8 @@
package org.elasticsearch.index.service;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.UnmodifiableIterator;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import com.google.inject.Inject;
import com.google.inject.Injector;
import org.elasticsearch.ElasticSearchException;
@@ -62,8 +62,8 @@ import java.io.IOException;
import java.util.Map;
import java.util.Set;
-import static com.google.common.collect.Maps.*;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.util.MapBuilder.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/IndexShard.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/IndexShard.java
index 145865f8194..8b6fa9b97ee 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/IndexShard.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/IndexShard.java
@@ -27,11 +27,12 @@ import org.elasticsearch.index.engine.EngineException;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.shard.IndexShardComponent;
import org.elasticsearch.index.shard.IndexShardState;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.SizeValue;
import org.elasticsearch.util.component.CloseableComponent;
import org.elasticsearch.util.concurrent.ThreadSafe;
+import javax.annotation.Nullable;
+
/**
* @author kimchy (shay.banon)
*/
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java
index c84d24a0646..d73233c3da4 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java
@@ -46,7 +46,6 @@ import org.elasticsearch.index.store.Store;
import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.indices.TypeMissingException;
import org.elasticsearch.threadpool.ThreadPool;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.SizeValue;
import org.elasticsearch.util.Strings;
import org.elasticsearch.util.TimeValue;
@@ -55,6 +54,7 @@ import org.elasticsearch.util.lucene.Lucene;
import org.elasticsearch.util.lucene.search.TermFilter;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.nio.channels.ClosedByInterruptException;
import java.util.concurrent.ScheduledFuture;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/similarity/SimilarityService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/similarity/SimilarityService.java
index 4aa55ac1662..8cee04fe922 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/similarity/SimilarityService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/similarity/SimilarityService.java
@@ -19,19 +19,19 @@
package org.elasticsearch.index.similarity;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import com.google.inject.Inject;
import org.apache.lucene.search.Similarity;
import org.elasticsearch.index.AbstractIndexComponent;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.settings.IndexSettings;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.settings.ImmutableSettings;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/AbstractFsStore.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/AbstractFsStore.java
index 4daf3258a3b..2135418efe4 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/AbstractFsStore.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/AbstractFsStore.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.store.fs;
-import com.google.common.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.elasticsearch.index.settings.IndexSettings;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/FsStores.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/FsStores.java
index 95a465625db..b1175917023 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/FsStores.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/FsStores.java
@@ -20,8 +20,8 @@
package org.elasticsearch.index.store.fs;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.util.Nullable;
+import javax.annotation.Nullable;
import java.io.File;
import java.io.IOException;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/Translog.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/Translog.java
index a40e7ecbac6..b5b4331bf5c 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/Translog.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/Translog.java
@@ -24,7 +24,6 @@ import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.index.engine.Engine;
import org.elasticsearch.index.shard.IndexShardComponent;
import org.elasticsearch.index.shard.service.IndexShard;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.SizeValue;
import org.elasticsearch.util.Strings;
import org.elasticsearch.util.concurrent.NotThreadSafe;
@@ -34,6 +33,7 @@ import org.elasticsearch.util.io.stream.StreamOutput;
import org.elasticsearch.util.io.stream.Streamable;
import org.elasticsearch.util.lease.Releasable;
+import javax.annotation.Nullable;
import java.io.IOException;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/memory/MemorySnapshot.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/memory/MemorySnapshot.java
index 703d53c09bb..094c091604a 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/memory/MemorySnapshot.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/memory/MemorySnapshot.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.translog.memory;
-import com.google.common.collect.Iterables;
+import org.elasticsearch.util.gcommon.collect.Iterables;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.ElasticSearchIllegalArgumentException;
import org.elasticsearch.index.translog.Translog;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/InternalIndicesService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/InternalIndicesService.java
index 33c0c538235..c3c5148e2c0 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/InternalIndicesService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/InternalIndicesService.java
@@ -19,8 +19,8 @@
package org.elasticsearch.indices;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.UnmodifiableIterator;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.UnmodifiableIterator;
import com.google.inject.Inject;
import com.google.inject.Injector;
import org.elasticsearch.ElasticSearchException;
@@ -53,8 +53,8 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Set;
-import static com.google.common.collect.Maps.*;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.elasticsearch.util.MapBuilder.*;
import static org.elasticsearch.util.settings.ImmutableSettings.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java
index 60aeec46d69..b283d28c735 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java
@@ -19,7 +19,7 @@
package org.elasticsearch.indices.cluster;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import com.google.inject.Inject;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.cluster.ClusterChangedEvent;
@@ -56,7 +56,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.Map;
import java.util.Set;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.ExceptionsHelper.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/jmx/ResourceDMBean.java b/modules/elasticsearch/src/main/java/org/elasticsearch/jmx/ResourceDMBean.java
index 0365a0f4551..5bcc7a9c993 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/jmx/ResourceDMBean.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/jmx/ResourceDMBean.java
@@ -19,8 +19,8 @@
package org.elasticsearch.jmx;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.elasticsearch.util.Classes;
import org.elasticsearch.util.MapBuilder;
import org.elasticsearch.util.Preconditions;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/AbstractDump.java b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/AbstractDump.java
index 27b7f58db26..04e146d3038 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/AbstractDump.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/AbstractDump.java
@@ -19,9 +19,9 @@
package org.elasticsearch.monitor.dump;
-import com.google.common.collect.ImmutableMap;
-import org.elasticsearch.util.Nullable;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import javax.annotation.Nullable;
import java.io.*;
import java.util.ArrayList;
import java.util.Map;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/DumpGenerator.java b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/DumpGenerator.java
index 9fdf5270066..9b69dd50db7 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/DumpGenerator.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/DumpGenerator.java
@@ -19,8 +19,8 @@
package org.elasticsearch.monitor.dump;
-import org.elasticsearch.util.Nullable;
+import javax.annotation.Nullable;
import java.io.File;
import java.util.Map;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/DumpMonitorService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/DumpMonitorService.java
index d92967fb77f..0331b2c5577 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/DumpMonitorService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/DumpMonitorService.java
@@ -25,14 +25,14 @@ import org.elasticsearch.env.Environment;
import org.elasticsearch.monitor.dump.heap.HeapDumpContributor;
import org.elasticsearch.monitor.dump.summary.SummaryDumpContributor;
import org.elasticsearch.monitor.dump.thread.ThreadDumpContributor;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.component.AbstractComponent;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.io.File;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.elasticsearch.monitor.dump.heap.HeapDumpContributor.*;
import static org.elasticsearch.monitor.dump.summary.SummaryDumpContributor.*;
import static org.elasticsearch.monitor.dump.thread.ThreadDumpContributor.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/SimpleDump.java b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/SimpleDump.java
index 810b73d0d15..fec31d70807 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/SimpleDump.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/SimpleDump.java
@@ -19,8 +19,7 @@
package org.elasticsearch.monitor.dump;
-import org.elasticsearch.util.Nullable;
-
+import javax.annotation.Nullable;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Map;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/SimpleDumpGenerator.java b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/SimpleDumpGenerator.java
index 2c148c2a27d..91552fc5955 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/SimpleDumpGenerator.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/dump/SimpleDumpGenerator.java
@@ -19,10 +19,10 @@
package org.elasticsearch.monitor.dump;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.elasticsearch.cluster.node.DiscoveryNode;
-import org.elasticsearch.util.Nullable;
+import javax.annotation.Nullable;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/DeadlockAnalyzer.java b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/DeadlockAnalyzer.java
index 856a38ba3f7..fbca6d2cb81 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/DeadlockAnalyzer.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/DeadlockAnalyzer.java
@@ -19,8 +19,8 @@
package org.elasticsearch.monitor.jvm;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmMonitorService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmMonitorService.java
index 38cc039fdbb..869c1cefd46 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmMonitorService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmMonitorService.java
@@ -19,7 +19,7 @@
package org.elasticsearch.monitor.jvm;
-import com.google.common.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
import com.google.inject.Inject;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.monitor.dump.DumpGenerator;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/AbstractPlugin.java b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/AbstractPlugin.java
index ee63a7c86ef..13ffdd1fa75 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/AbstractPlugin.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/AbstractPlugin.java
@@ -19,7 +19,7 @@
package org.elasticsearch.plugins;
-import com.google.common.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
import com.google.inject.Module;
import org.elasticsearch.util.component.CloseableIndexComponent;
import org.elasticsearch.util.component.LifecycleComponent;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/PluginsService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/PluginsService.java
index 357ebd2a1c6..d3062b97df8 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/PluginsService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/PluginsService.java
@@ -19,9 +19,9 @@
package org.elasticsearch.plugins;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Maps;
import com.google.inject.Inject;
import com.google.inject.Module;
import org.elasticsearch.ElasticSearchException;
@@ -39,7 +39,7 @@ import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.elasticsearch.util.io.FileSystemUtils.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/main/RestMainAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/main/RestMainAction.java
index d0314fc2c85..8cb8fbf2653 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/main/RestMainAction.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/main/RestMainAction.java
@@ -19,7 +19,7 @@
package org.elasticsearch.rest.action.main;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import com.google.inject.Inject;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.node.ArrayNode;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/SearchService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/SearchService.java
index b37f425b665..cd1db3c9f1b 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/SearchService.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/SearchService.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import com.google.inject.Inject;
import org.apache.lucene.search.TopDocs;
import org.codehaus.jackson.JsonFactory;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java
index 15c6369c1f8..e6de72da5c0 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java
@@ -29,7 +29,7 @@ import org.elasticsearch.util.json.ToJson;
import java.util.ArrayList;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.util.json.JsonBuilder.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceFacetsBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceFacetsBuilder.java
index 2bb237ea2ea..e1284844fa6 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceFacetsBuilder.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceFacetsBuilder.java
@@ -26,7 +26,7 @@ import org.elasticsearch.util.json.ToJson;
import java.io.IOException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* A search source facets builder.
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceHighlightBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceHighlightBuilder.java
index c857c29e5b9..c138c2be0af 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceHighlightBuilder.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceHighlightBuilder.java
@@ -25,7 +25,7 @@ import org.elasticsearch.util.json.ToJson;
import java.io.IOException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* A builder for search highlighting.
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/controller/SearchPhaseController.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/controller/SearchPhaseController.java
index 7ca0b7281d2..6ff16b291e2 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/controller/SearchPhaseController.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/controller/SearchPhaseController.java
@@ -19,9 +19,9 @@
package org.elasticsearch.search.controller;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
+import org.elasticsearch.util.gcommon.collect.Iterables;
+import org.elasticsearch.util.gcommon.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Maps;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.FieldDoc;
import org.apache.lucene.search.ScoreDoc;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/dfs/DfsPhase.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/dfs/DfsPhase.java
index fa9cc3f9fd1..3f591b0017d 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/dfs/DfsPhase.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/dfs/DfsPhase.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.dfs;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.apache.lucene.index.Term;
import org.elasticsearch.search.SearchParseElement;
import org.elasticsearch.search.SearchPhase;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/Facets.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/Facets.java
index 31cab6dc56c..5b1b3cfb036 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/Facets.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/Facets.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.facets;
-import com.google.common.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
import org.elasticsearch.util.io.stream.Streamable;
@@ -31,8 +31,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.elasticsearch.search.facets.CountFacet.*;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/FacetsParseElement.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/FacetsParseElement.java
index baf750c3cc3..56f54630059 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/FacetsParseElement.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/FacetsParseElement.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.facets;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.apache.lucene.search.Query;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/FacetsPhase.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/FacetsPhase.java
index 5a773590ec9..725f61e2050 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/FacetsPhase.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/FacetsPhase.java
@@ -19,8 +19,8 @@
package org.elasticsearch.search.facets;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.apache.lucene.search.*;
import org.apache.lucene.util.OpenBitSet;
import org.elasticsearch.ElasticSearchException;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java
index 226bd498789..4aa90967fb4 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.fetch;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import com.google.inject.Inject;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.FieldSelector;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java
index 880107f200a..a754e58d6f4 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.highlight;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.apache.lucene.search.vectorhighlight.*;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.index.mapper.DocumentMapper;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlighterParseElement.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlighterParseElement.java
index d2d81c773ec..5093af62ba1 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlighterParseElement.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlighterParseElement.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.highlight;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
import org.elasticsearch.search.SearchParseElement;
@@ -29,7 +29,7 @@ import org.elasticsearch.util.Booleans;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
*
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHit.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHit.java
index ad81fcacb3e..75925cf6cfd 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHit.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHit.java
@@ -19,20 +19,20 @@
package org.elasticsearch.search.internal;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.apache.lucene.search.Explanation;
import org.elasticsearch.ElasticSearchParseException;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHitField;
import org.elasticsearch.search.SearchShardTarget;
import org.elasticsearch.search.highlight.HighlightField;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.Unicode;
import org.elasticsearch.util.gnu.trove.TIntObjectHashMap;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
import org.elasticsearch.util.json.JsonBuilder;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHits.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHits.java
index e1d25194a14..8597defd312 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHits.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHits.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.internal;
-import com.google.common.collect.Iterators;
+import org.elasticsearch.util.gcommon.collect.Iterators;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.SearchShardTarget;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/query/QueryPhase.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/query/QueryPhase.java
index 91e9ea917c1..9898816ffd8 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/query/QueryPhase.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/query/QueryPhase.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.query;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import com.google.inject.Inject;
import org.apache.lucene.search.*;
import org.elasticsearch.index.mapper.DocumentMapper;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/query/SortParseElement.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/query/SortParseElement.java
index fe67ba99e15..fc93014ff42 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/query/SortParseElement.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/query/SortParseElement.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.query;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.SortField;
import org.codehaus.jackson.JsonParser;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/local/LocalTransport.java b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/local/LocalTransport.java
index 18630884c05..aa1b81cbc17 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/local/LocalTransport.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/local/LocalTransport.java
@@ -24,7 +24,6 @@ import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.*;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.component.AbstractLifecycleComponent;
import org.elasticsearch.util.io.ThrowableObjectInputStream;
import org.elasticsearch.util.io.stream.*;
@@ -34,6 +33,7 @@ import org.elasticsearch.util.transport.BoundTransportAddress;
import org.elasticsearch.util.transport.LocalTransportAddress;
import org.elasticsearch.util.transport.TransportAddress;
+import javax.annotation.Nullable;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentMap;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java
index 2a2a59f6b18..b48d5c1a414 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java
@@ -60,7 +60,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.transport.Transport.Helper.*;
import static org.elasticsearch.util.TimeValue.*;
import static org.elasticsearch.util.concurrent.ConcurrentMaps.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/MapBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/MapBuilder.java
index 41a28e030f2..4848d5e0610 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/MapBuilder.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/MapBuilder.java
@@ -19,11 +19,11 @@
package org.elasticsearch.util;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* @author kimchy (Shay Banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/Strings.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/Strings.java
index 76fd3e3a4d5..d143152140f 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/Strings.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/Strings.java
@@ -19,7 +19,7 @@
package org.elasticsearch.util;
-import com.google.common.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
import java.util.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/guice/ModulesFactory.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/guice/ModulesFactory.java
index 77e657e9695..a18f476a07e 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/guice/ModulesFactory.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/guice/ModulesFactory.java
@@ -21,9 +21,9 @@ package org.elasticsearch.util.guice;
import com.google.inject.Module;
import org.elasticsearch.ElasticSearchException;
-import org.elasticsearch.util.Nullable;
import org.elasticsearch.util.settings.Settings;
+import javax.annotation.Nullable;
import java.lang.reflect.Constructor;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/logging/Loggers.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/logging/Loggers.java
index 9aedcc8a298..056a89aee53 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/logging/Loggers.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/logging/Loggers.java
@@ -19,7 +19,7 @@
package org.elasticsearch.util.logging;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.util.Classes;
@@ -29,7 +29,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.List;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static java.util.Arrays.asList;
/**
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/logging/log4j/LogConfigurator.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/logging/log4j/LogConfigurator.java
index 58668cea11c..6ce621a30ed 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/logging/log4j/LogConfigurator.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/logging/log4j/LogConfigurator.java
@@ -19,7 +19,7 @@
package org.elasticsearch.util.logging.log4j;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.apache.log4j.PropertyConfigurator;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.FailedToResolveConfigException;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/lucene/all/AllEntries.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/lucene/all/AllEntries.java
index 3f9effaba4a..894c4e8751b 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/lucene/all/AllEntries.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/lucene/all/AllEntries.java
@@ -19,7 +19,7 @@
package org.elasticsearch.util.lucene.all;
-import com.google.common.collect.Lists;
+import org.elasticsearch.util.gcommon.collect.Lists;
import org.elasticsearch.ElasticSearchIllegalStateException;
import org.elasticsearch.util.io.CharSequenceReader;
import org.elasticsearch.util.io.FastCharArrayWriter;
@@ -31,7 +31,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
/**
* @author kimchy (shay.banon)
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/lucene/store/SwitchDirectory.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/lucene/store/SwitchDirectory.java
index 4a3af30dc3d..4cfd61ea344 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/lucene/store/SwitchDirectory.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/lucene/store/SwitchDirectory.java
@@ -19,7 +19,7 @@
package org.elasticsearch.util.lucene.store;
-import com.google.common.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.store.IndexOutput;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/path/PathTrie.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/path/PathTrie.java
index f8256ef3c11..c78fdc60861 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/path/PathTrie.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/path/PathTrie.java
@@ -19,7 +19,7 @@
package org.elasticsearch.util.path;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import java.util.Map;
import java.util.regex.Pattern;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/ImmutableSettings.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/ImmutableSettings.java
index 773ec2518e2..fb4bf5dc025 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/ImmutableSettings.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/ImmutableSettings.java
@@ -35,7 +35,7 @@ import java.net.URL;
import java.util.*;
import java.util.concurrent.TimeUnit;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.util.SizeValue.*;
import static org.elasticsearch.util.Strings.*;
import static org.elasticsearch.util.TimeValue.*;
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/JsonSettingsLoader.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/JsonSettingsLoader.java
index a3d0b3381d7..cfd4df277ac 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/JsonSettingsLoader.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/JsonSettingsLoader.java
@@ -30,8 +30,8 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* Settings loader that loads (parses) the settings in a json format by flattening them
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/PropertiesSettingsLoader.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/PropertiesSettingsLoader.java
index c95b3fdd11b..04fb5ba27b6 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/PropertiesSettingsLoader.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/PropertiesSettingsLoader.java
@@ -26,7 +26,7 @@ import java.io.IOException;
import java.util.Map;
import java.util.Properties;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* Settings loader that loads (parses) the settings in a properties format.
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/YamlSettingsLoader.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/YamlSettingsLoader.java
index ebd50944c4c..b87421e3e12 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/YamlSettingsLoader.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/loader/YamlSettingsLoader.java
@@ -26,8 +26,8 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
/**
* Settings loader that loads (parses) the settings in a yaml format by flattening them
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/TransportAddressSerializers.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/TransportAddressSerializers.java
index 05d7a8cc776..646fce67fa3 100644
--- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/TransportAddressSerializers.java
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/TransportAddressSerializers.java
@@ -19,7 +19,7 @@
package org.elasticsearch.util.transport;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import org.elasticsearch.ElasticSearchIllegalStateException;
import org.elasticsearch.util.io.stream.StreamInput;
import org.elasticsearch.util.io.stream.StreamOutput;
diff --git a/modules/elasticsearch/src/test/java/org/elasticsearch/cluster/routing/strategy/SingleShardNoBackupsRoutingStrategyTests.java b/modules/elasticsearch/src/test/java/org/elasticsearch/cluster/routing/strategy/SingleShardNoBackupsRoutingStrategyTests.java
index 1ef20830235..bd901dc02ff 100644
--- a/modules/elasticsearch/src/test/java/org/elasticsearch/cluster/routing/strategy/SingleShardNoBackupsRoutingStrategyTests.java
+++ b/modules/elasticsearch/src/test/java/org/elasticsearch/cluster/routing/strategy/SingleShardNoBackupsRoutingStrategyTests.java
@@ -35,8 +35,8 @@ import org.testng.annotations.Test;
import java.util.List;
import java.util.Set;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.cluster.ClusterState.*;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.elasticsearch.cluster.metadata.MetaData.*;
diff --git a/modules/elasticsearch/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingTests.java b/modules/elasticsearch/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingTests.java
index 19c39af0b6f..4a672223e2b 100644
--- a/modules/elasticsearch/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingTests.java
+++ b/modules/elasticsearch/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingTests.java
@@ -51,7 +51,7 @@ public class MulticastZenPingTests {
final TransportService transportServiceB = new TransportService(new LocalTransport(threadPool), threadPool, timerService).start();
final DiscoveryNode nodeB = new DiscoveryNode("B", transportServiceA.boundAddress().publishAddress());
- MulticastZenPing zenPingA = (MulticastZenPing) new MulticastZenPing(threadPool, transportServiceA, clusterName);
+ MulticastZenPing zenPingA = new MulticastZenPing(threadPool, transportServiceA, clusterName);
zenPingA.setNodesProvider(new DiscoveryNodesProvider() {
@Override public DiscoveryNodes nodes() {
return DiscoveryNodes.newNodesBuilder().put(nodeA).localNodeId("A").build();
@@ -59,7 +59,7 @@ public class MulticastZenPingTests {
});
zenPingA.start();
- MulticastZenPing zenPingB = (MulticastZenPing) new MulticastZenPing(threadPool, transportServiceB, clusterName);
+ MulticastZenPing zenPingB = new MulticastZenPing(threadPool, transportServiceB, clusterName);
zenPingB.setNodesProvider(new DiscoveryNodesProvider() {
@Override public DiscoveryNodes nodes() {
return DiscoveryNodes.newNodesBuilder().put(nodeB).localNodeId("B").build();
diff --git a/modules/elasticsearch/src/test/java/org/elasticsearch/rest/util/RestUtilsTests.java b/modules/elasticsearch/src/test/java/org/elasticsearch/rest/util/RestUtilsTests.java
index 17846f11d44..8aebf54d0df 100644
--- a/modules/elasticsearch/src/test/java/org/elasticsearch/rest/util/RestUtilsTests.java
+++ b/modules/elasticsearch/src/test/java/org/elasticsearch/rest/util/RestUtilsTests.java
@@ -24,7 +24,7 @@ import org.testng.annotations.Test;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
diff --git a/modules/elasticsearch/src/test/java/org/elasticsearch/util/path/PathTrieTests.java b/modules/elasticsearch/src/test/java/org/elasticsearch/util/path/PathTrieTests.java
index 082b9d9d525..aa4f39c97ed 100644
--- a/modules/elasticsearch/src/test/java/org/elasticsearch/util/path/PathTrieTests.java
+++ b/modules/elasticsearch/src/test/java/org/elasticsearch/util/path/PathTrieTests.java
@@ -23,7 +23,7 @@ import org.testng.annotations.Test;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
diff --git a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/AbstractNodesTests.java b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/AbstractNodesTests.java
index 438130f78c6..fe14b486470 100644
--- a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/AbstractNodesTests.java
+++ b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/AbstractNodesTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.Map;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.elasticsearch.node.NodeBuilder.*;
import static org.elasticsearch.util.settings.ImmutableSettings.Builder.*;
import static org.elasticsearch.util.settings.ImmutableSettings.*;
diff --git a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/SingleInstanceEmbeddedSearchTests.java b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/SingleInstanceEmbeddedSearchTests.java
index 49d187d941b..f835c199ea2 100644
--- a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/SingleInstanceEmbeddedSearchTests.java
+++ b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/SingleInstanceEmbeddedSearchTests.java
@@ -45,7 +45,7 @@ import org.testng.annotations.Test;
import java.util.Map;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
import static org.elasticsearch.client.Requests.*;
import static org.elasticsearch.index.query.json.JsonQueryBuilders.*;
import static org.elasticsearch.search.builder.SearchSourceBuilder.*;
diff --git a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TransportTwoServersSearchTests.java b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TransportTwoServersSearchTests.java
index 406acd6ac1f..839eb99cf2f 100644
--- a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TransportTwoServersSearchTests.java
+++ b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TransportTwoServersSearchTests.java
@@ -19,7 +19,7 @@
package org.elasticsearch.test.integration.search;
-import com.google.common.collect.Sets;
+import org.elasticsearch.util.gcommon.collect.Sets;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.action.search.SearchResponse;
diff --git a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TwoInstanceEmbeddedSearchTests.java b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TwoInstanceEmbeddedSearchTests.java
index b0c75aff3f1..fe46efbb7c4 100644
--- a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TwoInstanceEmbeddedSearchTests.java
+++ b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TwoInstanceEmbeddedSearchTests.java
@@ -19,8 +19,8 @@
package org.elasticsearch.test.integration.search;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Sets;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.Sets;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.Requests;
import org.elasticsearch.cluster.ClusterService;
@@ -55,8 +55,8 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.elasticsearch.client.Requests.*;
import static org.elasticsearch.index.query.json.JsonQueryBuilders.*;
import static org.elasticsearch.search.builder.SearchSourceBuilder.*;
diff --git a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TwoInstanceUnbalancedShardsEmbeddedSearchTests.java b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TwoInstanceUnbalancedShardsEmbeddedSearchTests.java
index ea392395d59..edf5520f0bf 100644
--- a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TwoInstanceUnbalancedShardsEmbeddedSearchTests.java
+++ b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/search/TwoInstanceUnbalancedShardsEmbeddedSearchTests.java
@@ -19,7 +19,7 @@
package org.elasticsearch.test.integration.search;
-import com.google.common.collect.ImmutableMap;
+import org.elasticsearch.util.gcommon.collect.ImmutableMap;
import com.google.inject.AbstractModule;
import com.google.inject.Inject;
import org.elasticsearch.client.Client;
@@ -60,8 +60,8 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
-import static com.google.common.collect.Lists.*;
-import static com.google.common.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
import static org.elasticsearch.client.Requests.*;
import static org.elasticsearch.index.query.json.JsonQueryBuilders.*;
import static org.elasticsearch.search.builder.SearchSourceBuilder.*;
diff --git a/plugins/discovery/jgroups/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java b/plugins/discovery/jgroups/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java
index 13d5f458c6d..7b9c22c8a70 100644
--- a/plugins/discovery/jgroups/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java
+++ b/plugins/discovery/jgroups/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java
@@ -47,8 +47,8 @@ import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
-import static com.google.common.collect.Maps.*;
-import static com.google.common.collect.Sets.*;
+import static org.elasticsearch.util.gcommon.collect.Maps.*;
+import static org.elasticsearch.util.gcommon.collect.Sets.*;
import static org.elasticsearch.cluster.ClusterState.*;
import static org.elasticsearch.cluster.node.DiscoveryNode.*;
diff --git a/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java b/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java
index 7965165adb6..4b5817eb7aa 100644
--- a/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java
+++ b/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java
@@ -24,7 +24,7 @@ import org.elasticsearch.plugins.AbstractPlugin;
import java.util.Collection;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java
index ec0d1f6b1be..2e347d0e2c6 100644
--- a/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java
+++ b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java
@@ -26,7 +26,7 @@ import org.elasticsearch.util.settings.Settings;
import java.util.Collection;
-import static com.google.common.collect.Lists.*;
+import static org.elasticsearch.util.gcommon.collect.Lists.*;
/**
* @author kimchy (shay.banon)
diff --git a/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedRestRequest.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedRestRequest.java
index de07ff58ed1..054de540886 100644
--- a/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedRestRequest.java
+++ b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedRestRequest.java
@@ -19,8 +19,8 @@
package org.elasticsearch.memcached;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
+import org.elasticsearch.util.gcommon.collect.ImmutableList;
+import org.elasticsearch.util.gcommon.collect.ImmutableSet;
import org.elasticsearch.rest.support.AbstractRestRequest;
import org.elasticsearch.rest.support.RestUtils;
import org.elasticsearch.util.Unicode;