From c06c10bbb06a72e80e0c22c3604bfb2a31ae8195 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Tue, 7 Oct 2014 08:35:11 -0700 Subject: [PATCH] Remove deprecations from master (follow up to #7922) --- docs/reference/indices/optimize.asciidoc | 2 -- rest-api-spec/api/indices.optimize.json | 4 ---- .../admin/indices/optimize/OptimizeRequest.java | 17 ----------------- .../indices/optimize/ShardOptimizeRequest.java | 2 +- .../admin/indices/upgrade/UpgradeTest.java | 8 -------- 5 files changed, 1 insertion(+), 32 deletions(-) diff --git a/docs/reference/indices/optimize.asciidoc b/docs/reference/indices/optimize.asciidoc index b3ea5d01069..98f09826090 100644 --- a/docs/reference/indices/optimize.asciidoc +++ b/docs/reference/indices/optimize.asciidoc @@ -37,8 +37,6 @@ deletes. Defaults to `false`. Note that this won't override the to `true`. Note, a merge can potentially be a very heavy operation, so it might make sense to run it set to `false`. -`force`:: deprecated[1.4.0, Use the upgrade API] - [float] [[optimize-multi-index]] === Multi Index diff --git a/rest-api-spec/api/indices.optimize.json b/rest-api-spec/api/indices.optimize.json index d92b8d8ab89..6e0292ec942 100644 --- a/rest-api-spec/api/indices.optimize.json +++ b/rest-api-spec/api/indices.optimize.json @@ -44,10 +44,6 @@ "wait_for_merge": { "type" : "boolean", "description" : "Specify whether the request should block until the merge process is finished (default: true)" - }, - "force": { - "type": "boolean", - "description": "Force a merge operation to run, even if there is a single segment in the index (default: false)" } } }, diff --git a/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java index b55ed580d3b..a167645ada9 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java @@ -133,23 +133,6 @@ public class OptimizeRequest extends BroadcastOperationRequest return this; } - /** - * @deprecated See {@link #upgrade()} - */ - @Deprecated - public boolean force() { - return upgrade; - } - - /** - * @deprecated Use {@link #upgrade(boolean)}. - */ - @Deprecated - public OptimizeRequest force(boolean force) { - this.upgrade = force; - return this; - } - /** * Should the merge upgrade all old segments to the current index format. * Defaults to false. diff --git a/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java index 2cf0e7dde38..e1e2d3e5005 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java @@ -48,7 +48,7 @@ class ShardOptimizeRequest extends BroadcastShardOperationRequest { maxNumSegments = request.maxNumSegments(); onlyExpungeDeletes = request.onlyExpungeDeletes(); flush = request.flush(); - upgrade = request.force() || request.upgrade(); + upgrade = request.upgrade(); } boolean waitForMerge() { diff --git a/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeTest.java b/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeTest.java index 2132ff90a47..49daf51f063 100644 --- a/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeTest.java +++ b/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeTest.java @@ -20,21 +20,13 @@ package org.elasticsearch.rest.action.admin.indices.upgrade; import com.google.common.base.Predicate; -import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.http.impl.client.HttpClients; -import org.apache.lucene.util.Version; import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.ListenableActionFuture; -import org.elasticsearch.action.admin.indices.segments.IndicesSegmentResponse; import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.node.internal.InternalNode; import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest; -import org.elasticsearch.test.rest.client.RestResponse; import org.elasticsearch.test.rest.client.http.HttpRequestBuilder; import org.elasticsearch.test.rest.client.http.HttpResponse; import org.elasticsearch.test.rest.json.JsonPath;