diff --git a/buildSrc/src/main/resources/checkstyle_suppressions.xml b/buildSrc/src/main/resources/checkstyle_suppressions.xml index 3e002803213..9a550740fde 100644 --- a/buildSrc/src/main/resources/checkstyle_suppressions.xml +++ b/buildSrc/src/main/resources/checkstyle_suppressions.xml @@ -127,7 +127,6 @@ - diff --git a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/AbstractBulkByScrollRequest.java b/core/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByScrollRequest.java similarity index 99% rename from core/src/main/java/org/elasticsearch/action/bulk/byscroll/AbstractBulkByScrollRequest.java rename to core/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByScrollRequest.java index 44580875011..a582248af11 100644 --- a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/AbstractBulkByScrollRequest.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByScrollRequest.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequest; @@ -355,7 +355,7 @@ public abstract class AbstractBulkByScrollRequest bulkFailures; - private List searchFailures; + private List searchFailures; private boolean timedOut; public BulkByScrollResponse() { } public BulkByScrollResponse(TimeValue took, BulkByScrollTask.Status status, List bulkFailures, - List searchFailures, boolean timedOut) { + List searchFailures, boolean timedOut) { this.took = took; this.status = requireNonNull(status, "Null status not supported"); this.bulkFailures = bulkFailures; @@ -139,7 +138,7 @@ public class BulkByScrollResponse extends ActionResponse implements ToXContent { /** * All search failures. */ - public List getSearchFailures() { + public List getSearchFailures() { return searchFailures; } @@ -166,7 +165,7 @@ public class BulkByScrollResponse extends ActionResponse implements ToXContent { took = new TimeValue(in); status = new BulkByScrollTask.Status(in); bulkFailures = in.readList(Failure::new); - searchFailures = in.readList(SearchFailure::new); + searchFailures = in.readList(ScrollableHitSource.SearchFailure::new); timedOut = in.readBoolean(); } @@ -181,7 +180,7 @@ public class BulkByScrollResponse extends ActionResponse implements ToXContent { failure.toXContent(builder, params); builder.endObject(); } - for (SearchFailure failure: searchFailures) { + for (ScrollableHitSource.SearchFailure failure: searchFailures) { failure.toXContent(builder, params); } builder.endArray(); @@ -199,4 +198,4 @@ public class BulkByScrollResponse extends ActionResponse implements ToXContent { builder.append(",search_failures=").append(getSearchFailures().subList(0, min(3, getSearchFailures().size()))); return builder.append(']').toString(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollTask.java b/core/src/main/java/org/elasticsearch/index/reindex/BulkByScrollTask.java similarity index 99% rename from core/src/main/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollTask.java rename to core/src/main/java/org/elasticsearch/index/reindex/BulkByScrollTask.java index 7c9124057b3..18c6dac9206 100644 --- a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollTask.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/BulkByScrollTask.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.Version; diff --git a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/ClientScrollableHitSource.java b/core/src/main/java/org/elasticsearch/index/reindex/ClientScrollableHitSource.java similarity index 99% rename from core/src/main/java/org/elasticsearch/action/bulk/byscroll/ClientScrollableHitSource.java rename to core/src/main/java/org/elasticsearch/index/reindex/ClientScrollableHitSource.java index 3bacc187ebb..2f6775a1eae 100644 --- a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/ClientScrollableHitSource.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/ClientScrollableHitSource.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryAction.java b/core/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryAction.java similarity index 91% rename from modules/reindex/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryAction.java rename to core/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryAction.java index b55fe33340e..c1abb16ca39 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryAction.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryAction.java @@ -20,8 +20,6 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.action.Action; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; -import org.elasticsearch.action.bulk.byscroll.DeleteByQueryRequest; import org.elasticsearch.client.ElasticsearchClient; public class DeleteByQueryAction extends Action { diff --git a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/DeleteByQueryRequest.java b/core/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequest.java similarity index 97% rename from core/src/main/java/org/elasticsearch/action/bulk/byscroll/DeleteByQueryRequest.java rename to core/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequest.java index 2644d0d9496..ad70748f3e4 100644 --- a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/DeleteByQueryRequest.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequest.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; @@ -81,7 +81,7 @@ public class DeleteByQueryRequest extends AbstractBulkByScrollRequest listener, int sliceId, Exception e) { + public void onSliceFailure(ActionListener listener, int sliceId, Exception e) { results.setOnce(sliceId, new Result(sliceId, e)); recordSliceCompletionAndRespondIfAllDone(listener); // TODO cancel when a slice fails? diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java b/core/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java similarity index 97% rename from modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java rename to core/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java index 2fa513f9c57..76944c7b804 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java @@ -26,7 +26,6 @@ import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.lucene.uid.Versions; -import org.elasticsearch.index.reindex.remote.RemoteInfo; import org.elasticsearch.tasks.TaskId; import java.io.IOException; @@ -128,7 +127,7 @@ public class ReindexRequest extends AbstractBulkIndexByScrollRequest { diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteInfo.java b/core/src/main/java/org/elasticsearch/index/reindex/RemoteInfo.java similarity index 99% rename from modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteInfo.java rename to core/src/main/java/org/elasticsearch/index/reindex/RemoteInfo.java index 5fad275cde4..878a9c61e4c 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteInfo.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/RemoteInfo.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.index.reindex.remote; +package org.elasticsearch.index.reindex; import org.elasticsearch.Version; import org.elasticsearch.common.Nullable; diff --git a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/ScrollableHitSource.java b/core/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java similarity index 99% rename from core/src/main/java/org/elasticsearch/action/bulk/byscroll/ScrollableHitSource.java rename to core/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java index 6426bad592f..3d1eb582db8 100644 --- a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/ScrollableHitSource.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.apache.logging.log4j.Logger; import org.elasticsearch.ElasticsearchException; @@ -111,7 +111,7 @@ public abstract class ScrollableHitSource { /** * Set the id of the last scroll. Used for debugging. */ - final void setScroll(String scrollId) { + public final void setScroll(String scrollId) { this.scrollId.set(scrollId); } diff --git a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/SuccessfullyProcessed.java b/core/src/main/java/org/elasticsearch/index/reindex/SuccessfullyProcessed.java similarity index 96% rename from core/src/main/java/org/elasticsearch/action/bulk/byscroll/SuccessfullyProcessed.java rename to core/src/main/java/org/elasticsearch/index/reindex/SuccessfullyProcessed.java index a0176e35202..6547984900e 100644 --- a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/SuccessfullyProcessed.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/SuccessfullyProcessed.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; /** * Implemented by {@link BulkByScrollTask} and {@link BulkByScrollTask.Status} to consistently implement diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryAction.java b/core/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryAction.java similarity index 95% rename from modules/reindex/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryAction.java rename to core/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryAction.java index cb716e82248..1058f7f1307 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryAction.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryAction.java @@ -20,7 +20,6 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.action.Action; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; import org.elasticsearch.client.ElasticsearchClient; public class UpdateByQueryAction extends diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequest.java b/core/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequest.java similarity index 97% rename from modules/reindex/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequest.java rename to core/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequest.java index 3e7fac9d454..ad0123d76ce 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequest.java +++ b/core/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequest.java @@ -71,7 +71,7 @@ public class UpdateByQueryRequest extends AbstractBulkIndexByScrollRequest randomSearchFailures() { + private List randomSearchFailures() { if (randomBoolean()) { return emptyList(); } @@ -68,7 +67,7 @@ public class BulkByScrollResponseTests extends ESTestCase { shardId = randomInt(); nodeId = usually() ? randomAlphaOfLength(5) : null; } - return singletonList(new SearchFailure(new ElasticsearchException("foo"), index, shardId, nodeId)); + return singletonList(new ScrollableHitSource.SearchFailure(new ElasticsearchException("foo"), index, shardId, nodeId)); } private void assertResponseEquals(BulkByScrollResponse expected, BulkByScrollResponse actual) { @@ -86,8 +85,8 @@ public class BulkByScrollResponseTests extends ESTestCase { } assertEquals(expected.getSearchFailures().size(), actual.getSearchFailures().size()); for (int i = 0; i < expected.getSearchFailures().size(); i++) { - SearchFailure expectedFailure = expected.getSearchFailures().get(i); - SearchFailure actualFailure = actual.getSearchFailures().get(i); + ScrollableHitSource.SearchFailure expectedFailure = expected.getSearchFailures().get(i); + ScrollableHitSource.SearchFailure actualFailure = actual.getSearchFailures().get(i); assertEquals(expectedFailure.getIndex(), actualFailure.getIndex()); assertEquals(expectedFailure.getShardId(), actualFailure.getShardId()); assertEquals(expectedFailure.getNodeId(), actualFailure.getNodeId()); diff --git a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollTaskStatusTests.java b/core/src/test/java/org/elasticsearch/index/reindex/BulkByScrollTaskStatusTests.java similarity index 97% rename from core/src/test/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollTaskStatusTests.java rename to core/src/test/java/org/elasticsearch/index/reindex/BulkByScrollTaskStatusTests.java index 503fe1db7cd..982198c8fee 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollTaskStatusTests.java +++ b/core/src/test/java/org/elasticsearch/index/reindex/BulkByScrollTaskStatusTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.ElasticsearchException; @@ -26,6 +26,7 @@ import org.elasticsearch.common.Randomness; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; +import org.hamcrest.Matchers; import java.io.IOException; import java.util.List; @@ -75,7 +76,7 @@ public class BulkByScrollTaskStatusTests extends ESTestCase { assertEquals(expected.getReasonCancelled(), actual.getReasonCancelled()); assertEquals(expected.getThrottledUntil(), actual.getThrottledUntil()); if (version.onOrAfter(Version.V_5_1_1_UNRELEASED)) { - assertThat(actual.getSliceStatuses(), hasSize(expected.getSliceStatuses().size())); + assertThat(actual.getSliceStatuses(), Matchers.hasSize(expected.getSliceStatuses().size())); for (int i = 0; i < expected.getSliceStatuses().size(); i++) { BulkByScrollTask.StatusOrException sliceStatus = expected.getSliceStatuses().get(i); if (sliceStatus == null) { diff --git a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollTaskTests.java b/core/src/test/java/org/elasticsearch/index/reindex/BulkByScrollTaskTests.java similarity index 99% rename from core/src/test/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollTaskTests.java rename to core/src/test/java/org/elasticsearch/index/reindex/BulkByScrollTaskTests.java index ff0eae55520..f4d4ea790bc 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollTaskTests.java +++ b/core/src/test/java/org/elasticsearch/index/reindex/BulkByScrollTaskTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.ToXContent; diff --git a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/DeleteByQueryRequestTests.java b/core/src/test/java/org/elasticsearch/index/reindex/DeleteByQueryRequestTests.java similarity index 99% rename from core/src/test/java/org/elasticsearch/action/bulk/byscroll/DeleteByQueryRequestTests.java rename to core/src/test/java/org/elasticsearch/index/reindex/DeleteByQueryRequestTests.java index f5c00f63de9..8c84c8f3f56 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/DeleteByQueryRequestTests.java +++ b/core/src/test/java/org/elasticsearch/index/reindex/DeleteByQueryRequestTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.search.SearchRequest; diff --git a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/ParentBulkByScrollTaskTests.java b/core/src/test/java/org/elasticsearch/index/reindex/ParentBulkByScrollTaskTests.java similarity index 99% rename from core/src/test/java/org/elasticsearch/action/bulk/byscroll/ParentBulkByScrollTaskTests.java rename to core/src/test/java/org/elasticsearch/index/reindex/ParentBulkByScrollTaskTests.java index 715fcaaad54..6e2d44abed5 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/ParentBulkByScrollTaskTests.java +++ b/core/src/test/java/org/elasticsearch/index/reindex/ParentBulkByScrollTaskTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.elasticsearch.action.ActionListener; import org.elasticsearch.test.ESTestCase; diff --git a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexRequestTests.java b/core/src/test/java/org/elasticsearch/index/reindex/ReindexRequestTests.java similarity index 97% rename from modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexRequestTests.java rename to core/src/test/java/org/elasticsearch/index/reindex/ReindexRequestTests.java index d1bb6f6096c..32b01237375 100644 --- a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexRequestTests.java +++ b/core/src/test/java/org/elasticsearch/index/reindex/ReindexRequestTests.java @@ -20,11 +20,9 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.bulk.byscroll.AbstractBulkByScrollRequestTestCase; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.index.reindex.remote.RemoteInfo; import org.elasticsearch.search.slice.SliceBuilder; import static java.util.Collections.emptyMap; diff --git a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/UpdateByQueryRequestTests.java b/core/src/test/java/org/elasticsearch/index/reindex/UpdateByQueryRequestTests.java similarity index 97% rename from modules/reindex/src/test/java/org/elasticsearch/index/reindex/UpdateByQueryRequestTests.java rename to core/src/test/java/org/elasticsearch/index/reindex/UpdateByQueryRequestTests.java index 700f45b42c5..b30968cf056 100644 --- a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/UpdateByQueryRequestTests.java +++ b/core/src/test/java/org/elasticsearch/index/reindex/UpdateByQueryRequestTests.java @@ -19,7 +19,6 @@ package org.elasticsearch.index.reindex; -import org.elasticsearch.action.bulk.byscroll.AbstractBulkByScrollRequestTestCase; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.support.IndicesOptions; diff --git a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/WorkingBulkByScrollTaskTests.java b/core/src/test/java/org/elasticsearch/index/reindex/WorkingBulkByScrollTaskTests.java similarity index 98% rename from core/src/test/java/org/elasticsearch/action/bulk/byscroll/WorkingBulkByScrollTaskTests.java rename to core/src/test/java/org/elasticsearch/index/reindex/WorkingBulkByScrollTaskTests.java index 7356d626c10..5d594d080b8 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/WorkingBulkByScrollTaskTests.java +++ b/core/src/test/java/org/elasticsearch/index/reindex/WorkingBulkByScrollTaskTests.java @@ -17,10 +17,8 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollTask; -import org.elasticsearch.action.bulk.byscroll.WorkingBulkByScrollTask; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.AbstractRunnable; import org.elasticsearch.tasks.TaskId; diff --git a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/AbstractAsyncBulkByScrollAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollAction.java similarity index 98% rename from core/src/main/java/org/elasticsearch/action/bulk/byscroll/AbstractAsyncBulkByScrollAction.java rename to modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollAction.java index 3ba07ea5538..2a23823c858 100644 --- a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/AbstractAsyncBulkByScrollAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollAction.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.apache.logging.log4j.Logger; import org.elasticsearch.action.ActionListener; @@ -31,7 +31,7 @@ import org.elasticsearch.action.bulk.BulkItemResponse.Failure; import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.action.bulk.Retry; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource.SearchFailure; +import org.elasticsearch.index.reindex.ScrollableHitSource.SearchFailure; import org.elasticsearch.action.delete.DeleteRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.client.ParentTaskAssigningClient; @@ -77,7 +77,7 @@ import static java.lang.Math.min; import static java.util.Collections.emptyList; import static java.util.Collections.unmodifiableList; import static org.elasticsearch.action.bulk.BackoffPolicy.exponentialBackoff; -import static org.elasticsearch.action.bulk.byscroll.AbstractBulkByScrollRequest.SIZE_ALL_MATCHES; +import static org.elasticsearch.index.reindex.AbstractBulkByScrollRequest.SIZE_ALL_MATCHES; import static org.elasticsearch.common.unit.TimeValue.timeValueNanos; import static org.elasticsearch.rest.RestStatus.CONFLICT; import static org.elasticsearch.search.sort.SortBuilders.fieldSort; @@ -116,8 +116,8 @@ public abstract class AbstractAsyncBulkByScrollAction, ScrollableHitSource.Hit, RequestWrapper> scriptApplier; public AbstractAsyncBulkByScrollAction(WorkingBulkByScrollTask task, Logger logger, ParentTaskAssigningClient client, - ThreadPool threadPool, Request mainRequest, ScriptService scriptService, ClusterState clusterState, - ActionListener listener) { + ThreadPool threadPool, Request mainRequest, ScriptService scriptService, + ClusterState clusterState, ActionListener listener) { this(task, logger, client, threadPool, mainRequest, scriptService, clusterState, listener, client.settings()); } @@ -741,7 +741,7 @@ public abstract class AbstractAsyncBulkByScrollAction wrap(DeleteRequest request) { + public static RequestWrapper wrap(DeleteRequest request) { return new DeleteRequestWrapper(request); } diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractBaseReindexRestHandler.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractBaseReindexRestHandler.java index d70b3c9c4ce..64b02c4be81 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractBaseReindexRestHandler.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractBaseReindexRestHandler.java @@ -21,9 +21,6 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.GenericAction; -import org.elasticsearch.action.bulk.byscroll.AbstractBulkByScrollRequest; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollTask; import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.settings.Settings; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByQueryRestHandler.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByQueryRestHandler.java index 480ca80e2ee..32a252ccc4b 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByQueryRestHandler.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByQueryRestHandler.java @@ -21,8 +21,6 @@ package org.elasticsearch.index.reindex; import org.apache.lucene.util.IOUtils; import org.elasticsearch.action.GenericAction; -import org.elasticsearch.action.bulk.byscroll.AbstractBulkByScrollRequest; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -35,7 +33,7 @@ import java.io.IOException; import java.util.Map; import java.util.function.Consumer; -import static org.elasticsearch.action.bulk.byscroll.AbstractBulkByScrollRequest.SIZE_ALL_MATCHES; +import static org.elasticsearch.index.reindex.AbstractBulkByScrollRequest.SIZE_ALL_MATCHES; /** * Rest handler for reindex actions that accepts a search request like Update-By-Query or Delete-By-Query diff --git a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/AsyncDeleteByQueryAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AsyncDeleteByQueryAction.java similarity index 91% rename from core/src/main/java/org/elasticsearch/action/bulk/byscroll/AsyncDeleteByQueryAction.java rename to modules/reindex/src/main/java/org/elasticsearch/index/reindex/AsyncDeleteByQueryAction.java index cdcfb754fb6..2608f5715ba 100644 --- a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/AsyncDeleteByQueryAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AsyncDeleteByQueryAction.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.apache.logging.log4j.Logger; import org.elasticsearch.action.ActionListener; @@ -32,8 +32,8 @@ import org.elasticsearch.threadpool.ThreadPool; */ public class AsyncDeleteByQueryAction extends AbstractAsyncBulkByScrollAction { public AsyncDeleteByQueryAction(WorkingBulkByScrollTask task, Logger logger, ParentTaskAssigningClient client, - ThreadPool threadPool, DeleteByQueryRequest request, ScriptService scriptService, ClusterState clusterState, - ActionListener listener) { + ThreadPool threadPool, DeleteByQueryRequest request, ScriptService scriptService, + ClusterState clusterState, ActionListener listener) { super(task, logger, client, threadPool, request, scriptService, clusterState, listener); } diff --git a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollParallelizationHelper.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/BulkByScrollParallelizationHelper.java similarity index 88% rename from core/src/main/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollParallelizationHelper.java rename to modules/reindex/src/main/java/org/elasticsearch/index/reindex/BulkByScrollParallelizationHelper.java index f2bd62c2335..48f10306454 100644 --- a/core/src/main/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollParallelizationHelper.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/BulkByScrollParallelizationHelper.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionListener; @@ -32,13 +32,13 @@ import org.elasticsearch.tasks.TaskManager; /** * Helps parallelize reindex requests using sliced scrolls. */ -public class BulkByScrollParallelizationHelper { +class BulkByScrollParallelizationHelper { private BulkByScrollParallelizationHelper() {} - public static < - Request extends AbstractBulkByScrollRequest - > void startSlices(Client client, TaskManager taskManager, Action action, - String localNodeId, ParentBulkByScrollTask task, Request request, ActionListener listener) { + public static > void startSlices(Client client, TaskManager taskManager, + Action action, + String localNodeId, ParentBulkByScrollTask task, Request request, + ActionListener listener) { TaskId parentTaskId = new TaskId(localNodeId, task.getId()); for (final SearchRequest slice : sliceIntoSubRequests(request.getSearchRequest(), UidFieldMapper.NAME, request.getSlices())) { // TODO move the request to the correct node. maybe here or somehow do it as part of startup for reindex in general.... diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/BulkIndexByScrollResponseContentListener.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/BulkIndexByScrollResponseContentListener.java index a8d321a9fab..8e5dff170d4 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/BulkIndexByScrollResponseContentListener.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/BulkIndexByScrollResponseContentListener.java @@ -21,8 +21,7 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.bulk.BulkItemResponse.Failure; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource.SearchFailure; +import org.elasticsearch.index.reindex.ScrollableHitSource.SearchFailure; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.rest.BytesRestResponse; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexAction.java index 2c84cfc86be..1c53a925f0d 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexAction.java @@ -20,7 +20,6 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.action.Action; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; import org.elasticsearch.client.ElasticsearchClient; public class ReindexAction extends Action { diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexPlugin.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexPlugin.java index fb203ee5c6d..d601f5c06e7 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexPlugin.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexPlugin.java @@ -21,7 +21,6 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollTask; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RestDeleteByQueryAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RestDeleteByQueryAction.java index 0e11d64a405..f906ef7660d 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RestDeleteByQueryAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RestDeleteByQueryAction.java @@ -20,7 +20,6 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.action.bulk.byscroll.DeleteByQueryRequest; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.settings.Settings; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RestReindexAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RestReindexAction.java index 57d3213da92..6c16c31efb1 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RestReindexAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RestReindexAction.java @@ -36,7 +36,6 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.index.VersionType; import org.elasticsearch.index.query.QueryParseContext; -import org.elasticsearch.index.reindex.remote.RemoteInfo; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.script.Script; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportDeleteByQueryAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportDeleteByQueryAction.java index a17b2b81f91..99e1a9f166d 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportDeleteByQueryAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportDeleteByQueryAction.java @@ -20,12 +20,6 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.bulk.byscroll.AsyncDeleteByQueryAction; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollParallelizationHelper; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; -import org.elasticsearch.action.bulk.byscroll.DeleteByQueryRequest; -import org.elasticsearch.action.bulk.byscroll.ParentBulkByScrollTask; -import org.elasticsearch.action.bulk.byscroll.WorkingBulkByScrollTask; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.client.Client; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportReindexAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportReindexAction.java index b232c50c2b2..737d885443a 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportReindexAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportReindexAction.java @@ -37,13 +37,7 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.bulk.BackoffPolicy; import org.elasticsearch.action.bulk.BulkItemResponse.Failure; -import org.elasticsearch.action.bulk.byscroll.AbstractAsyncBulkByScrollAction; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollParallelizationHelper; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; -import org.elasticsearch.action.bulk.byscroll.ParentBulkByScrollTask; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource.SearchFailure; -import org.elasticsearch.action.bulk.byscroll.WorkingBulkByScrollTask; +import org.elasticsearch.index.reindex.ScrollableHitSource.SearchFailure; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.support.ActionFilters; @@ -68,7 +62,6 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.VersionType; import org.elasticsearch.index.mapper.VersionFieldMapper; -import org.elasticsearch.index.reindex.remote.RemoteInfo; import org.elasticsearch.index.reindex.remote.RemoteScrollableHitSource; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportRethrottleAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportRethrottleAction.java index 88329f5cb17..0901e5ade31 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportRethrottleAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportRethrottleAction.java @@ -24,7 +24,6 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.FailedNodeException; import org.elasticsearch.action.TaskOperationFailure; import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollTask; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.tasks.TransportTasksAction; import org.elasticsearch.client.Client; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportUpdateByQueryAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportUpdateByQueryAction.java index 12d8696319f..8924c7038c9 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportUpdateByQueryAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportUpdateByQueryAction.java @@ -21,12 +21,6 @@ package org.elasticsearch.index.reindex; import org.apache.logging.log4j.Logger; import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.bulk.byscroll.AbstractAsyncBulkByScrollAction; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; -import org.elasticsearch.action.bulk.byscroll.ParentBulkByScrollTask; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollParallelizationHelper; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource; -import org.elasticsearch.action.bulk.byscroll.WorkingBulkByScrollTask; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.HandledTransportAction; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteResponseParsers.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteResponseParsers.java index e9807bdfa5b..d9a897026d2 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteResponseParsers.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteResponseParsers.java @@ -20,10 +20,10 @@ package org.elasticsearch.index.reindex.remote; import org.elasticsearch.Version; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource.BasicHit; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource.Hit; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource.Response; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource.SearchFailure; +import org.elasticsearch.index.reindex.ScrollableHitSource.BasicHit; +import org.elasticsearch.index.reindex.ScrollableHitSource.Hit; +import org.elasticsearch.index.reindex.ScrollableHitSource.Response; +import org.elasticsearch.index.reindex.ScrollableHitSource.SearchFailure; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.ParsingException; import org.elasticsearch.common.collect.Tuple; diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteScrollableHitSource.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteScrollableHitSource.java index f3caeb004c4..85173b7d899 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteScrollableHitSource.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteScrollableHitSource.java @@ -30,7 +30,7 @@ import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.Version; import org.elasticsearch.action.bulk.BackoffPolicy; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource; +import org.elasticsearch.index.reindex.ScrollableHitSource; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.client.ResponseException; import org.elasticsearch.client.ResponseListener; diff --git a/test/framework/src/main/java/org/elasticsearch/action/bulk/byscroll/AbstractAsyncBulkByScrollActionMetadataTestCase.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollActionMetadataTestCase.java similarity index 96% rename from test/framework/src/main/java/org/elasticsearch/action/bulk/byscroll/AbstractAsyncBulkByScrollActionMetadataTestCase.java rename to modules/reindex/src/test/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollActionMetadataTestCase.java index b68797381d1..34da9f56b48 100644 --- a/test/framework/src/main/java/org/elasticsearch/action/bulk/byscroll/AbstractAsyncBulkByScrollActionMetadataTestCase.java +++ b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollActionMetadataTestCase.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; public abstract class AbstractAsyncBulkByScrollActionMetadataTestCase< Request extends AbstractBulkByScrollRequest, diff --git a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollActionScriptTestCase.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollActionScriptTestCase.java index fd41a6d25f3..6ddf6daa880 100644 --- a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollActionScriptTestCase.java +++ b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollActionScriptTestCase.java @@ -20,12 +20,8 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.action.ActionRequest; -import org.elasticsearch.action.bulk.byscroll.AbstractAsyncBulkByScrollAction; -import org.elasticsearch.action.bulk.byscroll.AbstractAsyncBulkByScrollAction.OpType; -import org.elasticsearch.action.bulk.byscroll.AbstractAsyncBulkByScrollAction.RequestWrapper; -import org.elasticsearch.action.bulk.byscroll.AbstractAsyncBulkByScrollActionTestCase; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource; +import org.elasticsearch.index.reindex.AbstractAsyncBulkByScrollAction.OpType; +import org.elasticsearch.index.reindex.AbstractAsyncBulkByScrollAction.RequestWrapper; import org.elasticsearch.action.delete.DeleteRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.script.CompiledScript; diff --git a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/AsyncBulkByScrollActionTests.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/AsyncBulkByScrollActionTests.java similarity index 99% rename from core/src/test/java/org/elasticsearch/action/bulk/byscroll/AsyncBulkByScrollActionTests.java rename to modules/reindex/src/test/java/org/elasticsearch/index/reindex/AsyncBulkByScrollActionTests.java index fa42573e439..5c437da3464 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/AsyncBulkByScrollActionTests.java +++ b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/AsyncBulkByScrollActionTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ExceptionsHelper; @@ -36,8 +36,8 @@ import org.elasticsearch.action.bulk.BulkItemResponse; import org.elasticsearch.action.bulk.BulkItemResponse.Failure; import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource.Hit; -import org.elasticsearch.action.bulk.byscroll.ScrollableHitSource.SearchFailure; +import org.elasticsearch.index.reindex.ScrollableHitSource.Hit; +import org.elasticsearch.index.reindex.ScrollableHitSource.SearchFailure; import org.elasticsearch.action.delete.DeleteRequest; import org.elasticsearch.action.delete.DeleteResponse; import org.elasticsearch.action.index.IndexRequest; @@ -696,7 +696,7 @@ public class AsyncBulkByScrollActionTests extends ESTestCase { } @Override - protected DummyAbstractBulkByScrollRequest forSlice(TaskId slicingTask, SearchRequest slice) { + public DummyAbstractBulkByScrollRequest forSlice(TaskId slicingTask, SearchRequest slice) { throw new UnsupportedOperationException(); } diff --git a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollParallelizationHelperTests.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/BulkByScrollParallelizationHelperTests.java similarity index 94% rename from core/src/test/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollParallelizationHelperTests.java rename to modules/reindex/src/test/java/org/elasticsearch/index/reindex/BulkByScrollParallelizationHelperTests.java index 498c6bf5286..a64415d08b1 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/byscroll/BulkByScrollParallelizationHelperTests.java +++ b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/BulkByScrollParallelizationHelperTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.index.mapper.IdFieldMapper; @@ -27,7 +27,7 @@ import org.elasticsearch.test.ESTestCase; import java.io.IOException; import static java.util.Collections.emptyList; -import static org.elasticsearch.action.bulk.byscroll.BulkByScrollParallelizationHelper.sliceIntoSubRequests; +import static org.elasticsearch.index.reindex.BulkByScrollParallelizationHelper.sliceIntoSubRequests; import static org.elasticsearch.search.RandomSearchRequestGenerator.randomSearchRequest; import static org.elasticsearch.search.RandomSearchRequestGenerator.randomSearchSourceBuilder; diff --git a/test/framework/src/main/java/org/elasticsearch/action/bulk/byscroll/BulkIndexByScrollResponseMatcher.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/BulkIndexByScrollResponseMatcher.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/action/bulk/byscroll/BulkIndexByScrollResponseMatcher.java rename to modules/reindex/src/test/java/org/elasticsearch/index/reindex/BulkIndexByScrollResponseMatcher.java index 2902e02a30c..cb2ff1a7ae2 100644 --- a/test/framework/src/main/java/org/elasticsearch/action/bulk/byscroll/BulkIndexByScrollResponseMatcher.java +++ b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/BulkIndexByScrollResponseMatcher.java @@ -17,9 +17,8 @@ * under the License. */ -package org.elasticsearch.action.bulk.byscroll; +package org.elasticsearch.index.reindex; -import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; @@ -155,4 +154,4 @@ public class BulkIndexByScrollResponseMatcher extends TypeSafeMatcher