diff options
author | Simon Willnauer <simonw@apache.org> | 2017-04-10 09:37:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-10 09:37:52 +0200 |
commit | 1f40f8a2d23759f58ab53c24628c6f340edb5de9 (patch) | |
tree | c5b9a50db46011ecb35b1ea2f3ea5807d0143bcb /core/src/main/java/org/elasticsearch/common/util/concurrent/AtomicArray.java | |
parent | b636ca79d579dbef3965b578fa8253aa6189e263 (diff) |
Introduce incremental reduction of TopDocs (#23946)
This commit adds support for incremental top N reduction if the number of
expected shards in the search request is high enough. The changes here
also clean up more code in SearchPhaseController to make the separation
between values that are the same on each search result and values that
are per response. The reduced search phase result doesn't hold an arbitrary
result to obtain values like `from`, `size` or sort values which is now
cleanly encapsulated.
Diffstat (limited to 'core/src/main/java/org/elasticsearch/common/util/concurrent/AtomicArray.java')
-rw-r--r-- | core/src/main/java/org/elasticsearch/common/util/concurrent/AtomicArray.java | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/core/src/main/java/org/elasticsearch/common/util/concurrent/AtomicArray.java b/core/src/main/java/org/elasticsearch/common/util/concurrent/AtomicArray.java index 2bf5e50a1c..fa82aa0ac6 100644 --- a/core/src/main/java/org/elasticsearch/common/util/concurrent/AtomicArray.java +++ b/core/src/main/java/org/elasticsearch/common/util/concurrent/AtomicArray.java @@ -31,14 +31,6 @@ import java.util.concurrent.atomic.AtomicReferenceArray; * to get the concrete values as a list using {@link #asList()}. */ public class AtomicArray<E> { - - private static final AtomicArray EMPTY = new AtomicArray(0); - - @SuppressWarnings("unchecked") - public static <E> E empty() { - return (E) EMPTY; - } - private final AtomicReferenceArray<E> array; private volatile List<E> nonNullList; @@ -53,7 +45,6 @@ public class AtomicArray<E> { return array.length(); } - /** * Sets the element at position {@code i} to the given value. * |