From ad4bb464e8491acc2c0c9a384bad6729764c7058 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sun, 30 Jan 2011 00:05:56 +0200 Subject: [PATCH] upgraded to new trove, major upgrade, better perf, but damn, 2mb larger in size... --- .../MultiFieldQueryParserSettings.java | 8 +-- .../common/io/stream/HandlesStreamInput.java | 2 +- .../common/io/stream/HandlesStreamOutput.java | 6 +- .../elasticsearch/common/lucene/Lucene.java | 2 +- .../lucene/versioned/NativeVersionedMap.java | 9 +-- .../common/transport/PortsRange.java | 4 +- .../common/trove/ExtTIntArrayList.java | 2 + .../common/trove/ExtTIntIntHashMap.java | 63 ------------------- .../common/trove/ExtTObjectFloatHashMap.java | 61 ------------------ .../common/trove/ExtTObjectIntHasMap.java | 26 ++------ .../common/trove/TBytesHashingStrategy.java | 36 ----------- .../index/cache/id/simple/SimpleIdCache.java | 3 +- .../id/simple/SimpleIdReaderTypeCache.java | 2 +- .../index/field/data/bytes/ByteFieldData.java | 6 +- .../field/data/doubles/DoubleFieldData.java | 6 +- .../field/data/floats/FloatFieldData.java | 6 +- .../index/field/data/ints/IntFieldData.java | 6 +- .../index/field/data/longs/LongFieldData.java | 6 +- .../field/data/shorts/ShortFieldData.java | 6 +- .../xcontent/geo/GeoPointFieldData.java | 6 +- .../query/type/child/TopChildrenQuery.java | 4 +- .../xcontent/QueryStringQueryBuilder.java | 7 ++- .../xcontent/QueryStringQueryParser.java | 7 ++- .../index/search/geo/GeoHashUtils.java | 2 +- .../search/builder/SearchSourceBuilder.java | 4 +- .../controller/SearchPhaseController.java | 5 +- .../search/dfs/AggregatedDfs.java | 14 +++-- .../elasticsearch/search/dfs/DfsPhase.java | 2 +- .../CountDateHistogramFacetCollector.java | 2 +- .../DateHistogramFacetProcessor.java | 6 +- ...ternalCountAndTotalDateHistogramFacet.java | 8 +-- .../InternalCountDateHistogramFacet.java | 4 +- .../ValueDateHistogramFacetCollector.java | 4 +- ...alueScriptDateHistogramFacetCollector.java | 4 +- .../CountAndTotalHistogramFacetCollector.java | 4 +- .../CountHistogramFacetCollector.java | 2 +- .../InternalCountAndTotalHistogramFacet.java | 8 +-- .../InternalCountHistogramFacet.java | 4 +- .../KeyValueHistogramFacetCollector.java | 4 +- ...KeyValueScriptHistogramFacetCollector.java | 4 +- .../ScriptHistogramFacetCollector.java | 4 +- .../terms/bytes/InternalByteTermsFacet.java | 4 +- .../terms/bytes/TermsByteFacetCollector.java | 4 +- .../doubles/InternalDoubleTermsFacet.java | 4 +- .../doubles/TermsDoubleFacetCollector.java | 4 +- .../terms/floats/InternalFloatTermsFacet.java | 4 +- .../floats/TermsFloatFacetCollector.java | 4 +- .../terms/ints/InternalIntTermsFacet.java | 4 +- .../terms/ints/TermsIntFacetCollector.java | 4 +- .../terms/longs/InternalLongTermsFacet.java | 4 +- .../terms/longs/TermsLongFacetCollector.java | 4 +- .../terms/shorts/InternalShortTermsFacet.java | 4 +- .../shorts/TermsShortFacetCollector.java | 4 +- .../FieldsTermsStringFacetCollector.java | 4 +- .../strings/InternalStringTermsFacet.java | 4 +- .../ScriptTermsStringFieldFacetCollector.java | 4 +- .../strings/TermsStringFacetCollector.java | 4 +- .../search/internal/InternalSearchHits.java | 2 +- modules/jarjar/build.gradle | 2 +- 59 files changed, 134 insertions(+), 303 deletions(-) delete mode 100644 modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTIntIntHashMap.java delete mode 100644 modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTObjectFloatHashMap.java delete mode 100644 modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/TBytesHashingStrategy.java diff --git a/modules/elasticsearch/src/main/java/org/apache/lucene/queryParser/MultiFieldQueryParserSettings.java b/modules/elasticsearch/src/main/java/org/apache/lucene/queryParser/MultiFieldQueryParserSettings.java index 61c251b199c..24d93d3a600 100644 --- a/modules/elasticsearch/src/main/java/org/apache/lucene/queryParser/MultiFieldQueryParserSettings.java +++ b/modules/elasticsearch/src/main/java/org/apache/lucene/queryParser/MultiFieldQueryParserSettings.java @@ -19,7 +19,7 @@ package org.apache.lucene.queryParser; -import org.elasticsearch.common.trove.ExtTObjectFloatHashMap; +import org.elasticsearch.common.trove.map.hash.TObjectFloatHashMap; import java.util.List; @@ -29,7 +29,7 @@ import java.util.List; public class MultiFieldQueryParserSettings extends QueryParserSettings { List fields = null; - ExtTObjectFloatHashMap boosts = null; + TObjectFloatHashMap boosts = null; float tieBreaker = 0.0f; boolean useDisMax = true; @@ -41,11 +41,11 @@ public class MultiFieldQueryParserSettings extends QueryParserSettings { this.fields = fields; } - public ExtTObjectFloatHashMap boosts() { + public TObjectFloatHashMap boosts() { return boosts; } - public void boosts(ExtTObjectFloatHashMap boosts) { + public void boosts(TObjectFloatHashMap boosts) { this.boosts = boosts; } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/io/stream/HandlesStreamInput.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/io/stream/HandlesStreamInput.java index 46b3e136730..38b768fe663 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/io/stream/HandlesStreamInput.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/io/stream/HandlesStreamInput.java @@ -19,7 +19,7 @@ package org.elasticsearch.common.io.stream; -import org.elasticsearch.common.trove.TIntObjectHashMap; +import org.elasticsearch.common.trove.map.hash.TIntObjectHashMap; import java.io.IOException; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/io/stream/HandlesStreamOutput.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/io/stream/HandlesStreamOutput.java index 095d745b487..75ad78db087 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/io/stream/HandlesStreamOutput.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/io/stream/HandlesStreamOutput.java @@ -19,8 +19,8 @@ package org.elasticsearch.common.io.stream; -import org.elasticsearch.common.trove.ExtTObjectIntHasMap; -import org.elasticsearch.common.trove.TObjectIntHashMap; +import org.elasticsearch.common.trove.impl.Constants; +import org.elasticsearch.common.trove.map.hash.TObjectIntHashMap; import java.io.IOException; import java.util.Arrays; @@ -37,7 +37,7 @@ public class HandlesStreamOutput extends StreamOutput { private StreamOutput out; - private final TObjectIntHashMap handles = new ExtTObjectIntHasMap().defaultReturnValue(-1); + private final TObjectIntHashMap handles = new TObjectIntHashMap(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, -1); private final HandleTable identityHandles = new HandleTable(10, (float) 3.00); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/Lucene.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/Lucene.java index e06520d1cb9..a61b717de4a 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/Lucene.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/Lucene.java @@ -29,7 +29,7 @@ import org.apache.lucene.search.*; import org.apache.lucene.util.Version; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.trove.TIntArrayList; +import org.elasticsearch.common.trove.list.array.TIntArrayList; import org.elasticsearch.index.analysis.AnalyzerScope; import org.elasticsearch.index.analysis.NamedAnalyzer; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/versioned/NativeVersionedMap.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/versioned/NativeVersionedMap.java index b563310aef5..ba82b6e7c55 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/versioned/NativeVersionedMap.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/versioned/NativeVersionedMap.java @@ -19,14 +19,15 @@ package org.elasticsearch.common.lucene.versioned; -import org.elasticsearch.common.trove.ExtTIntIntHashMap; +import org.elasticsearch.common.trove.impl.Constants; +import org.elasticsearch.common.trove.map.hash.TIntIntHashMap; import org.elasticsearch.common.util.concurrent.ThreadSafe; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; /** - * An implementation of {@link VersionedMap} based on trove {@link org.elasticsearch.common.trove.TIntIntHashMap}. + * An implementation of {@link VersionedMap} based on trove. * * @author kimchy (Shay Banon) */ @@ -140,10 +141,10 @@ public class NativeVersionedMap implements VersionedMap { private static class Segment { final ReadWriteLock rwl = new ReentrantReadWriteLock(); - final ExtTIntIntHashMap map = new ExtTIntIntHashMap(); + final TIntIntHashMap map = new TIntIntHashMap(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, 0, -1); private Segment() { - map.defaultReturnValue(-1); + } } } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/transport/PortsRange.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/transport/PortsRange.java index fb9d9a8549b..24d02901891 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/transport/PortsRange.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/transport/PortsRange.java @@ -19,7 +19,7 @@ package org.elasticsearch.common.transport; -import org.elasticsearch.common.trove.TIntArrayList; +import org.elasticsearch.common.trove.list.array.TIntArrayList; import java.util.StringTokenizer; @@ -42,7 +42,7 @@ public class PortsRange { return false; } }); - return ports.toNativeArray(); + return ports.toArray(new int[ports.size()]); } public boolean iterate(PortCallback callback) throws NumberFormatException { diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTIntArrayList.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTIntArrayList.java index 74dae1f36a9..60be49a07c9 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTIntArrayList.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTIntArrayList.java @@ -19,6 +19,8 @@ package org.elasticsearch.common.trove; +import org.elasticsearch.common.trove.list.array.TIntArrayList; + /** * @author kimchy (Shay Banon) */ diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTIntIntHashMap.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTIntIntHashMap.java deleted file mode 100644 index 093e986364a..00000000000 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTIntIntHashMap.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to Elastic Search and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Elastic Search licenses this - * file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.common.trove; - -/** - * @author kimchy (Shay Banon) - */ -public class ExtTIntIntHashMap extends TIntIntHashMap { - - private int defaultReturnValue = 0; - - public ExtTIntIntHashMap() { - } - - public ExtTIntIntHashMap(int initialCapacity) { - super(initialCapacity); - } - - public ExtTIntIntHashMap(int initialCapacity, float loadFactor) { - super(initialCapacity, loadFactor); - } - - public ExtTIntIntHashMap(TIntHashingStrategy strategy) { - super(strategy); - } - - public ExtTIntIntHashMap(int initialCapacity, TIntHashingStrategy strategy) { - super(initialCapacity, strategy); - } - - public ExtTIntIntHashMap(int initialCapacity, float loadFactor, TIntHashingStrategy strategy) { - super(initialCapacity, loadFactor, strategy); - } - - public ExtTIntIntHashMap defaultReturnValue(int defaultReturnValue) { - this.defaultReturnValue = defaultReturnValue; - return this; - } - - @Override public int get(int key) { - int index = index(key); - return index < 0 ? defaultReturnValue : _values[index]; - } - - -} diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTObjectFloatHashMap.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTObjectFloatHashMap.java deleted file mode 100644 index c2138ddd284..00000000000 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTObjectFloatHashMap.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to Elastic Search and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Elastic Search licenses this - * file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.common.trove; - -/** - * @author kimchy (shay.banon) - */ -public class ExtTObjectFloatHashMap extends TObjectFloatHashMap { - - private float defaultReturnValue = 0; - - public ExtTObjectFloatHashMap() { - } - - public ExtTObjectFloatHashMap(int initialCapacity) { - super(initialCapacity); - } - - public ExtTObjectFloatHashMap(int initialCapacity, float loadFactor) { - super(initialCapacity, loadFactor); - } - - public ExtTObjectFloatHashMap(TObjectHashingStrategy ttObjectHashingStrategy) { - super(ttObjectHashingStrategy); - } - - public ExtTObjectFloatHashMap(int initialCapacity, TObjectHashingStrategy ttObjectHashingStrategy) { - super(initialCapacity, ttObjectHashingStrategy); - } - - public ExtTObjectFloatHashMap(int initialCapacity, float loadFactor, TObjectHashingStrategy ttObjectHashingStrategy) { - super(initialCapacity, loadFactor, ttObjectHashingStrategy); - } - - public ExtTObjectFloatHashMap defaultReturnValue(float defaultReturnValue) { - this.defaultReturnValue = defaultReturnValue; - return this; - } - - @Override public float get(T key) { - int index = index(key); - return index < 0 ? defaultReturnValue : _values[index]; - } -} diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTObjectIntHasMap.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTObjectIntHasMap.java index bbe48f52a15..911c347939f 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTObjectIntHasMap.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/ExtTObjectIntHasMap.java @@ -19,13 +19,13 @@ package org.elasticsearch.common.trove; +import org.elasticsearch.common.trove.map.hash.TObjectIntHashMap; + /** * @author kimchy (Shay Banon) */ public class ExtTObjectIntHasMap extends TObjectIntHashMap { - private int defaultReturnValue = 0; - public ExtTObjectIntHasMap() { } @@ -37,21 +37,8 @@ public class ExtTObjectIntHasMap extends TObjectIntHashMap { super(initialCapacity, loadFactor); } - public ExtTObjectIntHasMap(TObjectHashingStrategy ttObjectHashingStrategy) { - super(ttObjectHashingStrategy); - } - - public ExtTObjectIntHasMap(int initialCapacity, TObjectHashingStrategy ttObjectHashingStrategy) { - super(initialCapacity, ttObjectHashingStrategy); - } - - public ExtTObjectIntHasMap(int initialCapacity, float loadFactor, TObjectHashingStrategy ttObjectHashingStrategy) { - super(initialCapacity, loadFactor, ttObjectHashingStrategy); - } - - public ExtTObjectIntHasMap defaultReturnValue(int defaultReturnValue) { - this.defaultReturnValue = defaultReturnValue; - return this; + public ExtTObjectIntHasMap(int initialCapacity, float loadFactor, int noEntryValue) { + super(initialCapacity, loadFactor, noEntryValue); } /** @@ -61,9 +48,4 @@ public class ExtTObjectIntHasMap extends TObjectIntHashMap { int index = index(key); return index < 0 ? null : (T) _set[index]; } - - @Override public final int get(T key) { - int index = index(key); - return index < 0 ? defaultReturnValue : _values[index]; - } } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/TBytesHashingStrategy.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/TBytesHashingStrategy.java deleted file mode 100644 index 3ba235c7bf1..00000000000 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/trove/TBytesHashingStrategy.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to Elastic Search and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Elastic Search licenses this - * file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.common.trove; - -import java.util.Arrays; - -/** - * @author kimchy (shay.banon) - */ -public class TBytesHashingStrategy implements TObjectHashingStrategy { - - @Override public int computeHashCode(byte[] bytes) { - return Arrays.hashCode(bytes); - } - - @Override public boolean equals(byte[] bytes, byte[] bytes1) { - return Arrays.equals(bytes, bytes1); - } -} diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/id/simple/SimpleIdCache.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/id/simple/SimpleIdCache.java index c01d865ecb0..02bd5ea39e7 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/id/simple/SimpleIdCache.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/id/simple/SimpleIdCache.java @@ -31,6 +31,7 @@ import org.elasticsearch.common.collect.MapMaker; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.trove.ExtTObjectIntHasMap; +import org.elasticsearch.common.trove.impl.Constants; import org.elasticsearch.index.AbstractIndexComponent; import org.elasticsearch.index.Index; import org.elasticsearch.index.cache.id.IdCache; @@ -236,7 +237,7 @@ public class SimpleIdCache extends AbstractIndexComponent implements IdCache { } static class TypeBuilder { - final ExtTObjectIntHasMap idToDoc = new ExtTObjectIntHasMap().defaultReturnValue(-1); + final ExtTObjectIntHasMap idToDoc = new ExtTObjectIntHasMap(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, -1); final ArrayList parentIdsValues = new ArrayList(); final int[] parentIdsOrdinals; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/id/simple/SimpleIdReaderTypeCache.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/id/simple/SimpleIdReaderTypeCache.java index a450d35d800..941436b7f17 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/id/simple/SimpleIdReaderTypeCache.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/id/simple/SimpleIdReaderTypeCache.java @@ -39,7 +39,7 @@ public class SimpleIdReaderTypeCache implements IdReaderTypeCache { public SimpleIdReaderTypeCache(String type, ExtTObjectIntHasMap idToDoc, BytesWrap[] parentIdsValues, int[] parentIdsOrdinals) { this.type = type; - this.idToDoc = idToDoc.defaultReturnValue(-1); + this.idToDoc = idToDoc; this.idToDoc.trimToSize(); this.parentIdsValues = parentIdsValues; this.parentIdsOrdinals = parentIdsOrdinals; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/bytes/ByteFieldData.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/bytes/ByteFieldData.java index f825826a1e4..3aba9bf5563 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/bytes/ByteFieldData.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/bytes/ByteFieldData.java @@ -22,7 +22,7 @@ package org.elasticsearch.index.field.data.bytes; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.FieldCache; import org.elasticsearch.common.RamUsage; -import org.elasticsearch.common.trove.TByteArrayList; +import org.elasticsearch.common.trove.list.array.TByteArrayList; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; import org.elasticsearch.index.field.data.support.FieldDataLoader; @@ -134,11 +134,11 @@ public abstract class ByteFieldData extends NumericFieldData { } @Override public ByteFieldData buildSingleValue(String field, int[] ordinals) { - return new SingleValueByteFieldData(field, ordinals, terms.toNativeArray()); + return new SingleValueByteFieldData(field, ordinals, terms.toArray()); } @Override public ByteFieldData buildMultiValue(String field, int[][] ordinals) { - return new MultiValueByteFieldData(field, ordinals, terms.toNativeArray()); + return new MultiValueByteFieldData(field, ordinals, terms.toArray()); } } } \ No newline at end of file diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/doubles/DoubleFieldData.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/doubles/DoubleFieldData.java index acbaca9bf7f..ad210df004d 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/doubles/DoubleFieldData.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/doubles/DoubleFieldData.java @@ -22,7 +22,7 @@ package org.elasticsearch.index.field.data.doubles; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.FieldCache; import org.elasticsearch.common.RamUsage; -import org.elasticsearch.common.trove.TDoubleArrayList; +import org.elasticsearch.common.trove.list.array.TDoubleArrayList; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; import org.elasticsearch.index.field.data.support.FieldDataLoader; @@ -134,11 +134,11 @@ public abstract class DoubleFieldData extends NumericFieldData } @Override public FloatFieldData buildSingleValue(String field, int[] ordinals) { - return new SingleValueFloatFieldData(field, ordinals, terms.toNativeArray()); + return new SingleValueFloatFieldData(field, ordinals, terms.toArray()); } @Override public FloatFieldData buildMultiValue(String field, int[][] ordinals) { - return new MultiValueFloatFieldData(field, ordinals, terms.toNativeArray()); + return new MultiValueFloatFieldData(field, ordinals, terms.toArray()); } } } \ No newline at end of file diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/ints/IntFieldData.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/ints/IntFieldData.java index 37779b1b1ff..be0ef7d80c0 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/ints/IntFieldData.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/ints/IntFieldData.java @@ -22,7 +22,7 @@ package org.elasticsearch.index.field.data.ints; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.FieldCache; import org.elasticsearch.common.RamUsage; -import org.elasticsearch.common.trove.TIntArrayList; +import org.elasticsearch.common.trove.list.array.TIntArrayList; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; import org.elasticsearch.index.field.data.support.FieldDataLoader; @@ -134,11 +134,11 @@ public abstract class IntFieldData extends NumericFieldData { } @Override public IntFieldData buildSingleValue(String field, int[] ordinals) { - return new SingleValueIntFieldData(field, ordinals, terms.toNativeArray()); + return new SingleValueIntFieldData(field, ordinals, terms.toArray()); } @Override public IntFieldData buildMultiValue(String field, int[][] ordinals) { - return new MultiValueIntFieldData(field, ordinals, terms.toNativeArray()); + return new MultiValueIntFieldData(field, ordinals, terms.toArray()); } } } \ No newline at end of file diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/longs/LongFieldData.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/longs/LongFieldData.java index 575848c1261..d73db5bbb6b 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/longs/LongFieldData.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/longs/LongFieldData.java @@ -25,7 +25,7 @@ import org.elasticsearch.common.RamUsage; import org.elasticsearch.common.joda.time.DateTimeZone; import org.elasticsearch.common.joda.time.MutableDateTime; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TLongArrayList; +import org.elasticsearch.common.trove.list.array.TLongArrayList; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; import org.elasticsearch.index.field.data.support.FieldDataLoader; @@ -164,11 +164,11 @@ public abstract class LongFieldData extends NumericFieldData { } @Override public LongFieldData buildSingleValue(String field, int[] ordinals) { - return new SingleValueLongFieldData(field, ordinals, terms.toNativeArray()); + return new SingleValueLongFieldData(field, ordinals, terms.toArray()); } @Override public LongFieldData buildMultiValue(String field, int[][] ordinals) { - return new MultiValueLongFieldData(field, ordinals, terms.toNativeArray()); + return new MultiValueLongFieldData(field, ordinals, terms.toArray()); } } } \ No newline at end of file diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/shorts/ShortFieldData.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/shorts/ShortFieldData.java index c47f0dcadd2..9932ca100cc 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/shorts/ShortFieldData.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/data/shorts/ShortFieldData.java @@ -22,7 +22,7 @@ package org.elasticsearch.index.field.data.shorts; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.FieldCache; import org.elasticsearch.common.RamUsage; -import org.elasticsearch.common.trove.TShortArrayList; +import org.elasticsearch.common.trove.list.array.TShortArrayList; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; import org.elasticsearch.index.field.data.support.FieldDataLoader; @@ -134,11 +134,11 @@ public abstract class ShortFieldData extends NumericFieldData } @Override public ShortFieldData buildSingleValue(String field, int[] ordinals) { - return new SingleValueShortFieldData(field, ordinals, terms.toNativeArray()); + return new SingleValueShortFieldData(field, ordinals, terms.toArray()); } @Override public ShortFieldData buildMultiValue(String field, int[][] ordinals) { - return new MultiValueShortFieldData(field, ordinals, terms.toNativeArray()); + return new MultiValueShortFieldData(field, ordinals, terms.toArray()); } } } \ No newline at end of file diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/geo/GeoPointFieldData.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/geo/GeoPointFieldData.java index 98ddf20f4cf..fb553110f73 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/geo/GeoPointFieldData.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/geo/GeoPointFieldData.java @@ -22,7 +22,7 @@ package org.elasticsearch.index.mapper.xcontent.geo; import org.apache.lucene.index.IndexReader; import org.elasticsearch.common.RamUsage; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TDoubleArrayList; +import org.elasticsearch.common.trove.list.array.TDoubleArrayList; import org.elasticsearch.common.unit.DistanceUnit; import org.elasticsearch.index.field.data.FieldData; import org.elasticsearch.index.field.data.FieldDataType; @@ -166,11 +166,11 @@ public abstract class GeoPointFieldData extends FieldData } @Override public GeoPointFieldData buildSingleValue(String field, int[] ordinals) { - return new SingleValueGeoPointFieldData(field, ordinals, lat.toNativeArray(), lon.toNativeArray()); + return new SingleValueGeoPointFieldData(field, ordinals, lat.toArray(), lon.toArray()); } @Override public GeoPointFieldData buildMultiValue(String field, int[][] ordinals) { - return new MultiValueGeoPointFieldData(field, ordinals, lat.toNativeArray(), lon.toNativeArray()); + return new MultiValueGeoPointFieldData(field, ordinals, lat.toArray(), lon.toArray()); } } } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/type/child/TopChildrenQuery.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/type/child/TopChildrenQuery.java index 164cc03d0fb..a18e86e3e03 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/type/child/TopChildrenQuery.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/type/child/TopChildrenQuery.java @@ -27,7 +27,7 @@ import org.elasticsearch.ElasticSearchIllegalArgumentException; import org.elasticsearch.ElasticSearchIllegalStateException; import org.elasticsearch.common.BytesWrap; import org.elasticsearch.common.lucene.search.EmptyScorer; -import org.elasticsearch.common.trove.TIntObjectHashMap; +import org.elasticsearch.common.trove.map.hash.TIntObjectHashMap; import org.elasticsearch.search.internal.ScopePhase; import org.elasticsearch.search.internal.SearchContext; @@ -157,7 +157,7 @@ public class TopChildrenQuery extends Query implements ScopePhase.TopDocsPhase { this.parentDocs = new HashMap(); for (Map.Entry> entry : parentDocsPerReader.entrySet()) { - ParentDoc[] values = entry.getValue().getValues(new ParentDoc[entry.getValue().size()]); + ParentDoc[] values = entry.getValue().values(new ParentDoc[entry.getValue().size()]); Arrays.sort(values, PARENT_DOC_COMP); parentDocs.put(entry.getKey(), values); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryStringQueryBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryStringQueryBuilder.java index 2239dfbdcae..88df4805536 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryStringQueryBuilder.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryStringQueryBuilder.java @@ -19,7 +19,8 @@ package org.elasticsearch.index.query.xcontent; -import org.elasticsearch.common.trove.ExtTObjectFloatHashMap; +import org.elasticsearch.common.trove.impl.Constants; +import org.elasticsearch.common.trove.map.hash.TObjectFloatHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import java.io.IOException; @@ -67,7 +68,7 @@ public class QueryStringQueryBuilder extends BaseQueryBuilder { private List fields; - private ExtTObjectFloatHashMap fieldsBoosts; + private TObjectFloatHashMap fieldsBoosts; private Boolean useDisMax; @@ -106,7 +107,7 @@ public class QueryStringQueryBuilder extends BaseQueryBuilder { } fields.add(field); if (fieldsBoosts == null) { - fieldsBoosts = new ExtTObjectFloatHashMap().defaultReturnValue(-1); + fieldsBoosts = new TObjectFloatHashMap(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, -1); } fieldsBoosts.put(field, boost); return this; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryStringQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryStringQueryParser.java index 73e8dca8ac2..6deb79d04c8 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryStringQueryParser.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryStringQueryParser.java @@ -29,7 +29,8 @@ import org.elasticsearch.common.collect.Lists; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.regex.Regex; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.trove.ExtTObjectFloatHashMap; +import org.elasticsearch.common.trove.impl.Constants; +import org.elasticsearch.common.trove.map.hash.TObjectFloatHashMap; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.AbstractIndexComponent; import org.elasticsearch.index.Index; @@ -102,7 +103,7 @@ public class QueryStringQueryParser extends AbstractIndexComponent implements XC qpSettings.fields().add(field); if (fBoost != -1) { if (qpSettings.boosts() == null) { - qpSettings.boosts(new ExtTObjectFloatHashMap().defaultReturnValue(1.0f)); + qpSettings.boosts(new TObjectFloatHashMap(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, 1.0f)); } qpSettings.boosts().put(field, fBoost); } @@ -111,7 +112,7 @@ public class QueryStringQueryParser extends AbstractIndexComponent implements XC qpSettings.fields().add(fField); if (fBoost != -1) { if (qpSettings.boosts() == null) { - qpSettings.boosts(new ExtTObjectFloatHashMap().defaultReturnValue(1.0f)); + qpSettings.boosts(new TObjectFloatHashMap(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, 1.0f)); } qpSettings.boosts().put(fField, fBoost); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/search/geo/GeoHashUtils.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/search/geo/GeoHashUtils.java index 28917b08584..f54200e2f9c 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/search/geo/GeoHashUtils.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/search/geo/GeoHashUtils.java @@ -17,7 +17,7 @@ package org.elasticsearch.index.search.geo; -import org.elasticsearch.common.trove.TIntIntHashMap; +import org.elasticsearch.common.trove.map.hash.TIntIntHashMap; /** * Utilities for encoding and decoding geohashes. Based on 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 865eaaccfe0..e7bbffa25e6 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 @@ -24,8 +24,8 @@ import org.elasticsearch.common.Unicode; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.Lists; import org.elasticsearch.common.io.FastByteArrayOutputStream; -import org.elasticsearch.common.trove.TObjectFloatHashMap; -import org.elasticsearch.common.trove.TObjectFloatIterator; +import org.elasticsearch.common.trove.iterator.TObjectFloatIterator; +import org.elasticsearch.common.trove.map.hash.TObjectFloatHashMap; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; 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 a3010dffa82..3ee5858a2a7 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 @@ -29,7 +29,8 @@ import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.collect.Ordering; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.trove.ExtTIntArrayList; -import org.elasticsearch.common.trove.ExtTObjectIntHasMap; +import org.elasticsearch.common.trove.impl.Constants; +import org.elasticsearch.common.trove.map.hash.TObjectIntHashMap; import org.elasticsearch.search.SearchShardTarget; import org.elasticsearch.search.dfs.AggregatedDfs; import org.elasticsearch.search.dfs.DfsSearchResult; @@ -73,7 +74,7 @@ public class SearchPhaseController { } public AggregatedDfs aggregateDfs(Iterable results) { - ExtTObjectIntHasMap dfMap = new ExtTObjectIntHasMap().defaultReturnValue(-1); + TObjectIntHashMap dfMap = new TObjectIntHashMap(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, -1); long aggMaxDoc = 0; for (DfsSearchResult result : results) { for (int i = 0; i < result.freqs().length; i++) { diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/dfs/AggregatedDfs.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/dfs/AggregatedDfs.java index 01cc12268ef..069d71644d9 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/dfs/AggregatedDfs.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/dfs/AggregatedDfs.java @@ -24,7 +24,9 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Streamable; import org.elasticsearch.common.trove.ExtTObjectIntHasMap; -import org.elasticsearch.common.trove.TObjectIntIterator; +import org.elasticsearch.common.trove.impl.Constants; +import org.elasticsearch.common.trove.iterator.TObjectIntIterator; +import org.elasticsearch.common.trove.map.hash.TObjectIntHashMap; import java.io.IOException; @@ -33,7 +35,7 @@ import java.io.IOException; */ public class AggregatedDfs implements Streamable { - private ExtTObjectIntHasMap dfMap; + private TObjectIntHashMap dfMap; private long maxDoc; @@ -41,12 +43,12 @@ public class AggregatedDfs implements Streamable { } - public AggregatedDfs(ExtTObjectIntHasMap dfMap, long maxDoc) { - this.dfMap = dfMap.defaultReturnValue(-1); + public AggregatedDfs(TObjectIntHashMap dfMap, long maxDoc) { + this.dfMap = dfMap; this.maxDoc = maxDoc; } - public ExtTObjectIntHasMap dfMap() { + public TObjectIntHashMap dfMap() { return dfMap; } @@ -62,7 +64,7 @@ public class AggregatedDfs implements Streamable { @Override public void readFrom(StreamInput in) throws IOException { int size = in.readVInt(); - dfMap = new ExtTObjectIntHasMap(size).defaultReturnValue(-1); + dfMap = new ExtTObjectIntHasMap(size, Constants.DEFAULT_LOAD_FACTOR, -1); for (int i = 0; i < size; i++) { dfMap.put(new Term(in.readUTF(), in.readUTF()), in.readVInt()); } 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 33fb93a4536..8d8cf941120 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 @@ -22,7 +22,7 @@ package org.elasticsearch.search.dfs; import org.apache.lucene.index.Term; import org.elasticsearch.common.collect.ImmutableMap; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.THashSet; +import org.elasticsearch.common.trove.set.hash.THashSet; import org.elasticsearch.search.SearchParseElement; import org.elasticsearch.search.SearchPhase; import org.elasticsearch.search.internal.SearchContext; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/CountDateHistogramFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/CountDateHistogramFacetCollector.java index f274cf677a0..6d548349f8d 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/CountDateHistogramFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/CountDateHistogramFacetCollector.java @@ -21,7 +21,7 @@ package org.elasticsearch.search.facet.datehistogram; import org.apache.lucene.index.IndexReader; import org.elasticsearch.common.joda.time.MutableDateTime; -import org.elasticsearch.common.trove.TLongLongHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.longs.LongFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/DateHistogramFacetProcessor.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/DateHistogramFacetProcessor.java index 144d4f4b932..60264b1920d 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/DateHistogramFacetProcessor.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/DateHistogramFacetProcessor.java @@ -28,8 +28,8 @@ import org.elasticsearch.common.joda.time.DateTimeField; import org.elasticsearch.common.joda.time.DateTimeZone; import org.elasticsearch.common.joda.time.MutableDateTime; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.trove.ExtTObjectIntHasMap; -import org.elasticsearch.common.trove.TObjectIntHashMap; +import org.elasticsearch.common.trove.impl.Constants; +import org.elasticsearch.common.trove.map.hash.TObjectIntHashMap; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.field.data.FieldDataType; @@ -50,7 +50,7 @@ import java.util.Map; public class DateHistogramFacetProcessor extends AbstractComponent implements FacetProcessor { private final ImmutableMap dateFieldParsers; - private final TObjectIntHashMap rounding = new ExtTObjectIntHasMap().defaultReturnValue(MutableDateTime.ROUND_FLOOR); + private final TObjectIntHashMap rounding = new TObjectIntHashMap(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, MutableDateTime.ROUND_FLOOR); @Inject public DateHistogramFacetProcessor(Settings settings) { super(settings); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/InternalCountAndTotalDateHistogramFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/InternalCountAndTotalDateHistogramFacet.java index 0dd2f3c1b43..78ed582a7ff 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/InternalCountAndTotalDateHistogramFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/InternalCountAndTotalDateHistogramFacet.java @@ -22,10 +22,10 @@ package org.elasticsearch.search.facet.datehistogram; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.trove.TLongDoubleHashMap; -import org.elasticsearch.common.trove.TLongDoubleIterator; -import org.elasticsearch.common.trove.TLongLongHashMap; -import org.elasticsearch.common.trove.TLongLongIterator; +import org.elasticsearch.common.trove.iterator.TLongDoubleIterator; +import org.elasticsearch.common.trove.iterator.TLongLongIterator; +import org.elasticsearch.common.trove.map.hash.TLongDoubleHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/InternalCountDateHistogramFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/InternalCountDateHistogramFacet.java index 4c593260502..8be5dfe5a4b 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/InternalCountDateHistogramFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/InternalCountDateHistogramFacet.java @@ -22,8 +22,8 @@ package org.elasticsearch.search.facet.datehistogram; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.trove.TLongLongHashMap; -import org.elasticsearch.common.trove.TLongLongIterator; +import org.elasticsearch.common.trove.iterator.TLongLongIterator; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/ValueDateHistogramFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/ValueDateHistogramFacetCollector.java index ab43b4076ad..44e05b212bc 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/ValueDateHistogramFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/ValueDateHistogramFacetCollector.java @@ -21,8 +21,8 @@ package org.elasticsearch.search.facet.datehistogram; import org.apache.lucene.index.IndexReader; import org.elasticsearch.common.joda.time.MutableDateTime; -import org.elasticsearch.common.trove.TLongDoubleHashMap; -import org.elasticsearch.common.trove.TLongLongHashMap; +import org.elasticsearch.common.trove.map.hash.TLongDoubleHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/ValueScriptDateHistogramFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/ValueScriptDateHistogramFacetCollector.java index b983e5ab609..b2095bb93b4 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/ValueScriptDateHistogramFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/datehistogram/ValueScriptDateHistogramFacetCollector.java @@ -21,8 +21,8 @@ package org.elasticsearch.search.facet.datehistogram; import org.apache.lucene.index.IndexReader; import org.elasticsearch.common.joda.time.MutableDateTime; -import org.elasticsearch.common.trove.TLongDoubleHashMap; -import org.elasticsearch.common.trove.TLongLongHashMap; +import org.elasticsearch.common.trove.map.hash.TLongDoubleHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.longs.LongFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/CountAndTotalHistogramFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/CountAndTotalHistogramFacetCollector.java index 9f676c499aa..335a9f96cbb 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/CountAndTotalHistogramFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/CountAndTotalHistogramFacetCollector.java @@ -20,8 +20,8 @@ package org.elasticsearch.search.facet.histogram; import org.apache.lucene.index.IndexReader; -import org.elasticsearch.common.trove.TLongDoubleHashMap; -import org.elasticsearch.common.trove.TLongLongHashMap; +import org.elasticsearch.common.trove.map.hash.TLongDoubleHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/CountHistogramFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/CountHistogramFacetCollector.java index 97885c4ccab..0749c4e655c 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/CountHistogramFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/CountHistogramFacetCollector.java @@ -20,7 +20,7 @@ package org.elasticsearch.search.facet.histogram; import org.apache.lucene.index.IndexReader; -import org.elasticsearch.common.trove.TLongLongHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/InternalCountAndTotalHistogramFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/InternalCountAndTotalHistogramFacet.java index 76efcd9e78a..bcc74b8050d 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/InternalCountAndTotalHistogramFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/InternalCountAndTotalHistogramFacet.java @@ -22,10 +22,10 @@ package org.elasticsearch.search.facet.histogram; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.trove.TLongDoubleHashMap; -import org.elasticsearch.common.trove.TLongDoubleIterator; -import org.elasticsearch.common.trove.TLongLongHashMap; -import org.elasticsearch.common.trove.TLongLongIterator; +import org.elasticsearch.common.trove.iterator.TLongDoubleIterator; +import org.elasticsearch.common.trove.iterator.TLongLongIterator; +import org.elasticsearch.common.trove.map.hash.TLongDoubleHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/InternalCountHistogramFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/InternalCountHistogramFacet.java index 1e305d752c9..9fb5cce6f92 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/InternalCountHistogramFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/InternalCountHistogramFacet.java @@ -22,8 +22,8 @@ package org.elasticsearch.search.facet.histogram; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.trove.TLongLongHashMap; -import org.elasticsearch.common.trove.TLongLongIterator; +import org.elasticsearch.common.trove.iterator.TLongLongIterator; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueHistogramFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueHistogramFacetCollector.java index f4869d8110f..84cae0d8a7a 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueHistogramFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueHistogramFacetCollector.java @@ -20,8 +20,8 @@ package org.elasticsearch.search.facet.histogram; import org.apache.lucene.index.IndexReader; -import org.elasticsearch.common.trove.TLongDoubleHashMap; -import org.elasticsearch.common.trove.TLongLongHashMap; +import org.elasticsearch.common.trove.map.hash.TLongDoubleHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueScriptHistogramFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueScriptHistogramFacetCollector.java index 83fda5bfa22..400fc1a96e1 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueScriptHistogramFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueScriptHistogramFacetCollector.java @@ -20,8 +20,8 @@ package org.elasticsearch.search.facet.histogram; import org.apache.lucene.index.IndexReader; -import org.elasticsearch.common.trove.TLongDoubleHashMap; -import org.elasticsearch.common.trove.TLongLongHashMap; +import org.elasticsearch.common.trove.map.hash.TLongDoubleHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.NumericFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/ScriptHistogramFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/ScriptHistogramFacetCollector.java index c697afa41d0..04a287e95cb 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/ScriptHistogramFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/ScriptHistogramFacetCollector.java @@ -20,8 +20,8 @@ package org.elasticsearch.search.facet.histogram; import org.apache.lucene.index.IndexReader; -import org.elasticsearch.common.trove.TLongDoubleHashMap; -import org.elasticsearch.common.trove.TLongLongHashMap; +import org.elasticsearch.common.trove.map.hash.TLongDoubleHashMap; +import org.elasticsearch.common.trove.map.hash.TLongLongHashMap; import org.elasticsearch.script.search.SearchScript; import org.elasticsearch.search.facet.AbstractFacetCollector; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/bytes/InternalByteTermsFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/bytes/InternalByteTermsFacet.java index 8a7a934b15f..0380ba5531a 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/bytes/InternalByteTermsFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/bytes/InternalByteTermsFacet.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TByteIntHashMap; -import org.elasticsearch.common.trove.TByteIntIterator; +import org.elasticsearch.common.trove.iterator.TByteIntIterator; +import org.elasticsearch.common.trove.map.hash.TByteIntHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/bytes/TermsByteFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/bytes/TermsByteFacetCollector.java index 5a47cc80920..73e10a46a64 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/bytes/TermsByteFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/bytes/TermsByteFacetCollector.java @@ -25,8 +25,8 @@ import org.elasticsearch.common.collect.BoundedTreeSet; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TByteIntHashMap; -import org.elasticsearch.common.trove.TByteIntIterator; +import org.elasticsearch.common.trove.iterator.TByteIntIterator; +import org.elasticsearch.common.trove.map.hash.TByteIntHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.bytes.ByteFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/doubles/InternalDoubleTermsFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/doubles/InternalDoubleTermsFacet.java index 6e56629dd1e..10832338fc9 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/doubles/InternalDoubleTermsFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/doubles/InternalDoubleTermsFacet.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TDoubleIntHashMap; -import org.elasticsearch.common.trove.TDoubleIntIterator; +import org.elasticsearch.common.trove.iterator.TDoubleIntIterator; +import org.elasticsearch.common.trove.map.hash.TDoubleIntHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/doubles/TermsDoubleFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/doubles/TermsDoubleFacetCollector.java index 514bd5f7d5a..a809f839a45 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/doubles/TermsDoubleFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/doubles/TermsDoubleFacetCollector.java @@ -25,8 +25,8 @@ import org.elasticsearch.common.collect.BoundedTreeSet; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TDoubleIntHashMap; -import org.elasticsearch.common.trove.TDoubleIntIterator; +import org.elasticsearch.common.trove.iterator.TDoubleIntIterator; +import org.elasticsearch.common.trove.map.hash.TDoubleIntHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.doubles.DoubleFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/floats/InternalFloatTermsFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/floats/InternalFloatTermsFacet.java index fc075c45827..8d257733ca1 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/floats/InternalFloatTermsFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/floats/InternalFloatTermsFacet.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TFloatIntHashMap; -import org.elasticsearch.common.trove.TFloatIntIterator; +import org.elasticsearch.common.trove.iterator.TFloatIntIterator; +import org.elasticsearch.common.trove.map.hash.TFloatIntHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/floats/TermsFloatFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/floats/TermsFloatFacetCollector.java index f7d1275b967..1d463dd3edf 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/floats/TermsFloatFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/floats/TermsFloatFacetCollector.java @@ -25,8 +25,8 @@ import org.elasticsearch.common.collect.BoundedTreeSet; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TFloatIntHashMap; -import org.elasticsearch.common.trove.TFloatIntIterator; +import org.elasticsearch.common.trove.iterator.TFloatIntIterator; +import org.elasticsearch.common.trove.map.hash.TFloatIntHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.floats.FloatFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/ints/InternalIntTermsFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/ints/InternalIntTermsFacet.java index 06144544173..6a50bddb134 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/ints/InternalIntTermsFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/ints/InternalIntTermsFacet.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TIntIntHashMap; -import org.elasticsearch.common.trove.TIntIntIterator; +import org.elasticsearch.common.trove.iterator.TIntIntIterator; +import org.elasticsearch.common.trove.map.hash.TIntIntHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/ints/TermsIntFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/ints/TermsIntFacetCollector.java index 7a07b36fa1c..23972da5383 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/ints/TermsIntFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/ints/TermsIntFacetCollector.java @@ -25,8 +25,8 @@ import org.elasticsearch.common.collect.BoundedTreeSet; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TIntIntHashMap; -import org.elasticsearch.common.trove.TIntIntIterator; +import org.elasticsearch.common.trove.iterator.TIntIntIterator; +import org.elasticsearch.common.trove.map.hash.TIntIntHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.ints.IntFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/longs/InternalLongTermsFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/longs/InternalLongTermsFacet.java index 080e1231579..87d1b45b6c7 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/longs/InternalLongTermsFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/longs/InternalLongTermsFacet.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TLongIntHashMap; -import org.elasticsearch.common.trove.TLongIntIterator; +import org.elasticsearch.common.trove.iterator.TLongIntIterator; +import org.elasticsearch.common.trove.map.hash.TLongIntHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/longs/TermsLongFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/longs/TermsLongFacetCollector.java index 63687dca343..422d7bf1d8d 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/longs/TermsLongFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/longs/TermsLongFacetCollector.java @@ -25,8 +25,8 @@ import org.elasticsearch.common.collect.BoundedTreeSet; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TLongIntHashMap; -import org.elasticsearch.common.trove.TLongIntIterator; +import org.elasticsearch.common.trove.iterator.TLongIntIterator; +import org.elasticsearch.common.trove.map.hash.TLongIntHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.longs.LongFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/shorts/InternalShortTermsFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/shorts/InternalShortTermsFacet.java index 5a539a6f2f5..83f4518c850 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/shorts/InternalShortTermsFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/shorts/InternalShortTermsFacet.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TShortIntHashMap; -import org.elasticsearch.common.trove.TShortIntIterator; +import org.elasticsearch.common.trove.iterator.TShortIntIterator; +import org.elasticsearch.common.trove.map.hash.TShortIntHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/shorts/TermsShortFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/shorts/TermsShortFacetCollector.java index 6c348bb0b7e..c4a0c64b862 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/shorts/TermsShortFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/shorts/TermsShortFacetCollector.java @@ -25,8 +25,8 @@ import org.elasticsearch.common.collect.BoundedTreeSet; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TShortIntHashMap; -import org.elasticsearch.common.trove.TShortIntIterator; +import org.elasticsearch.common.trove.iterator.TShortIntIterator; +import org.elasticsearch.common.trove.map.hash.TShortIntHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldDataType; import org.elasticsearch.index.field.data.shorts.ShortFieldData; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/FieldsTermsStringFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/FieldsTermsStringFacetCollector.java index f71a2bd0c65..ea33cbab095 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/FieldsTermsStringFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/FieldsTermsStringFacetCollector.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.collect.BoundedTreeSet; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.ImmutableSet; import org.elasticsearch.common.collect.Maps; -import org.elasticsearch.common.trove.TObjectIntHashMap; -import org.elasticsearch.common.trove.TObjectIntIterator; +import org.elasticsearch.common.trove.iterator.TObjectIntIterator; +import org.elasticsearch.common.trove.map.hash.TObjectIntHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldData; import org.elasticsearch.index.field.data.FieldDataType; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/InternalStringTermsFacet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/InternalStringTermsFacet.java index a4fbc09bb8f..8d20f27e8c3 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/InternalStringTermsFacet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/InternalStringTermsFacet.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TObjectIntHashMap; -import org.elasticsearch.common.trove.TObjectIntIterator; +import org.elasticsearch.common.trove.iterator.TObjectIntIterator; +import org.elasticsearch.common.trove.map.hash.TObjectIntHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/ScriptTermsStringFieldFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/ScriptTermsStringFieldFacetCollector.java index 34fae43aa0d..1fcaaafaca2 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/ScriptTermsStringFieldFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/ScriptTermsStringFieldFacetCollector.java @@ -23,8 +23,8 @@ import org.apache.lucene.index.IndexReader; import org.elasticsearch.common.collect.BoundedTreeSet; import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.ImmutableSet; -import org.elasticsearch.common.trove.TObjectIntHashMap; -import org.elasticsearch.common.trove.TObjectIntIterator; +import org.elasticsearch.common.trove.iterator.TObjectIntIterator; +import org.elasticsearch.common.trove.map.hash.TObjectIntHashMap; import org.elasticsearch.script.search.SearchScript; import org.elasticsearch.search.facet.AbstractFacetCollector; import org.elasticsearch.search.facet.Facet; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/TermsStringFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/TermsStringFacetCollector.java index 5e9f40b62e2..9f46a9fe324 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/TermsStringFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/terms/strings/TermsStringFacetCollector.java @@ -25,8 +25,8 @@ import org.elasticsearch.common.collect.ImmutableList; import org.elasticsearch.common.collect.ImmutableSet; import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TObjectIntHashMap; -import org.elasticsearch.common.trove.TObjectIntIterator; +import org.elasticsearch.common.trove.iterator.TObjectIntIterator; +import org.elasticsearch.common.trove.map.hash.TObjectIntHashMap; import org.elasticsearch.index.cache.field.data.FieldDataCache; import org.elasticsearch.index.field.data.FieldData; import org.elasticsearch.index.field.data.FieldDataType; 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 bdf53a7db3f..8c34464aaa7 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 @@ -23,7 +23,7 @@ import org.elasticsearch.common.collect.Iterators; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.thread.ThreadLocals; -import org.elasticsearch.common.trove.TIntObjectHashMap; +import org.elasticsearch.common.trove.map.hash.TIntObjectHashMap; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.search.SearchHit; diff --git a/modules/jarjar/build.gradle b/modules/jarjar/build.gradle index d33e10432f2..9babf892252 100644 --- a/modules/jarjar/build.gradle +++ b/modules/jarjar/build.gradle @@ -10,7 +10,7 @@ dependencies { runtime 'com.google.inject.extensions:guice-multibindings:3.0-rc2' runtime 'com.google.guava:guava:r07' - runtime 'org.elasticsearch:es-trove:2.1.0' + runtime 'org.elasticsearch:es-trove:3.0.0rc1' runtime 'org.elasticsearch:es-jsr166y:20100615' runtime 'commons-codec:commons-codec:1.4'