From 586065fca768956c4f0f80dbbe0f58961fb8b17b Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Wed, 20 Dec 2017 12:27:26 +0000 Subject: [PATCH] Changes to enable the build to run This includes changing NOCOMMIT comments to be NORELEASE comments so the build passes with them. We have tasks inGH for all these NORELEASE comments so they should be caught before merging to master --- .../elasticsearch/xpack/indexlifecycle/AllocateAction.java | 2 +- .../elasticsearch/xpack/indexlifecycle/ForceMergeAction.java | 2 +- .../xpack/indexlifecycle/IndexLifecycleMetadata.java | 1 - .../elasticsearch/xpack/indexlifecycle/ObjectParserUtils.java | 3 ++- .../java/org/elasticsearch/xpack/indexlifecycle/Phase.java | 3 +-- .../elasticsearch/xpack/indexlifecycle/ReplicasAction.java | 3 +-- .../org/elasticsearch/xpack/indexlifecycle/ShrinkAction.java | 2 +- .../xpack/indexlifecycle/TimeseriesLifecyclePolicy.java | 2 +- .../xpack/indexlifecycle/IndexLifecycleInitialisationIT.java | 2 -- .../org/elasticsearch/xpack/indexlifecycle/PhaseTests.java | 2 +- .../xpack/indexlifecycle/TimeseriesLifecyclePolicyTests.java | 4 ++-- .../indexlifecycle/action/GetLifecycleResponseTests.java | 2 +- .../xpack/indexlifecycle/action/PutLifecycleRequestTests.java | 2 +- 13 files changed, 13 insertions(+), 17 deletions(-) diff --git a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/AllocateAction.java b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/AllocateAction.java index 00aa4910ad7..1b8f5fa9300 100644 --- a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/AllocateAction.java +++ b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/AllocateAction.java @@ -56,7 +56,7 @@ public class AllocateAction implements LifecycleAction { @Override public void execute(Index index, Client client, ClusterService clusterService, Listener listener) { - // nocommit: stub + // NORELEASE: stub listener.onSuccess(true); } diff --git a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ForceMergeAction.java b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ForceMergeAction.java index 3beecbbb3a1..297783e331b 100644 --- a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ForceMergeAction.java +++ b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ForceMergeAction.java @@ -56,7 +56,7 @@ public class ForceMergeAction implements LifecycleAction { @Override public void execute(Index index, Client client, ClusterService clusterService, Listener listener) { - // nocommit: stub + // NORELEASE: stub listener.onSuccess(true); } diff --git a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleMetadata.java b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleMetadata.java index ba92d676a7a..eea456aa089 100644 --- a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleMetadata.java +++ b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleMetadata.java @@ -20,7 +20,6 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.indexlifecycle.ObjectParserUtils; import java.io.IOException; import java.util.Collections; diff --git a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ObjectParserUtils.java b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ObjectParserUtils.java index e1f5ddf3818..7f31b3af4d8 100644 --- a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ObjectParserUtils.java +++ b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ObjectParserUtils.java @@ -13,7 +13,8 @@ import java.util.TreeMap; import java.util.function.Function; /** - * NOCOMMIT: these utility methods should be brought into the core API for parsing namedWriteables + * NORELEASE: these utility methods should be brought into the core API for + * parsing namedWriteables */ public class ObjectParserUtils { public static SortedMap convertListToMapValues(Function keyFunction, diff --git a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/Phase.java b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/Phase.java index 98fd19030c5..c020fd2a613 100644 --- a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/Phase.java +++ b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/Phase.java @@ -26,7 +26,6 @@ import java.io.IOException; import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.SortedMap; import java.util.TreeMap; import static org.elasticsearch.xpack.indexlifecycle.ObjectParserUtils.convertListToMapValues; @@ -170,7 +169,7 @@ public class Phase implements ToXContentObject, Writeable { @Override public void onFailure(Exception e) { // Something went wrong so log the error and hopefully it will succeed next time execute - // is called. NOCOMMIT can we do better here? + // is called. NORELEASE can we do better here? logger.error("Failed to initialised action [" + firstActionName + "] for index [" + indexName + "]", e); } }); diff --git a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ReplicasAction.java b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ReplicasAction.java index 15161c58295..b00ccbbb443 100644 --- a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ReplicasAction.java +++ b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ReplicasAction.java @@ -14,7 +14,6 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.common.xcontent.ConstructingObjectParser; -import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.Index; @@ -73,7 +72,7 @@ public class ReplicasAction implements LifecycleAction { @Override public void execute(Index index, Client client, ClusterService clusterService, Listener listener) { - // nocommit: stub + // NORELEASE: stub listener.onSuccess(true); } diff --git a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ShrinkAction.java b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ShrinkAction.java index 2373d26322c..e6a351cb5c4 100644 --- a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ShrinkAction.java +++ b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/ShrinkAction.java @@ -56,7 +56,7 @@ public class ShrinkAction implements LifecycleAction { @Override public void execute(Index index, Client client, ClusterService clusterService, Listener listener) { - // nocommit: stub + // NORELEASE: stub listener.onSuccess(true); } diff --git a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeseriesLifecyclePolicy.java b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeseriesLifecyclePolicy.java index fa2ab7d05f0..6693d1f3f57 100644 --- a/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeseriesLifecyclePolicy.java +++ b/x-pack/plugin/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeseriesLifecyclePolicy.java @@ -117,7 +117,7 @@ public class TimeseriesLifecyclePolicy extends LifecyclePolicy { * - {@link ForceMergeAction} * - {@link ReplicasAction} (if action.number_of_replicas gt idxMeta.number_of_replicas) * - * NOCOMMIT: there may exist further optimizations to this when {@link ShrinkAction} is specified. + * NORELEASE: there may exist further optimizations to this when {@link ShrinkAction} is specified. * * @param context the index lifecycle context for this phase at the time of execution * @param phase the current phase for which to provide an action provider diff --git a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleInitialisationIT.java b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleInitialisationIT.java index 48aabba3884..7facbe6bdb5 100644 --- a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleInitialisationIT.java +++ b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleInitialisationIT.java @@ -23,11 +23,9 @@ import org.elasticsearch.xpack.XPackSettings; import org.elasticsearch.xpack.indexlifecycle.action.PutLifecycleAction; import org.junit.Before; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import java.util.List; import java.util.Map; import static org.elasticsearch.client.Requests.clusterHealthRequest; diff --git a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/PhaseTests.java b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/PhaseTests.java index 28081d53bfc..af527acd22a 100644 --- a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/PhaseTests.java +++ b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/PhaseTests.java @@ -33,7 +33,7 @@ public class PhaseTests extends AbstractSerializingTestCase { List entries = Arrays .asList(new NamedXContentRegistry.Entry(LifecycleAction.class, new ParseField(DeleteAction.NAME), DeleteAction::parse)); registry = new NamedXContentRegistry(entries); - phaseName = randomAlphaOfLength(20); // NOCOMMIT we need to randomise the phase name rather + phaseName = randomAlphaOfLength(20); // NORELEASE we need to randomise the phase name rather // than use the same name for all instances } diff --git a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeseriesLifecyclePolicyTests.java b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeseriesLifecyclePolicyTests.java index 14936a8bfc6..2d503610054 100644 --- a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeseriesLifecyclePolicyTests.java +++ b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeseriesLifecyclePolicyTests.java @@ -58,7 +58,7 @@ public class TimeseriesLifecyclePolicyTests extends AbstractSerializingTestCase< new NamedXContentRegistry.Entry(LifecycleAction.class, new ParseField(RolloverAction.NAME), RolloverAction::parse), new NamedXContentRegistry.Entry(LifecycleAction.class, new ParseField(ShrinkAction.NAME), ShrinkAction::parse)); registry = new NamedXContentRegistry(entries); - lifecycleName = randomAlphaOfLength(20); // NOCOMMIT we need to randomise the lifecycle name rather + lifecycleName = randomAlphaOfLength(20); // NORELEASE we need to randomise the lifecycle name rather // than use the same name for all instances } @@ -303,7 +303,7 @@ public class TimeseriesLifecyclePolicyTests extends AbstractSerializingTestCase< LifecycleAction current = provider.next(null); assertThat(current, not(equalTo(TEST_REPLICAS_ACTION))); while (true) { - // NOCOMMIT This loop never exits as there is no break condition + // NORELEASE This loop never exits as there is no break condition // also provider.next(current) never evaluates to null because // when called with the replicas action it always returns a // non-null action. We should avoid using while true here diff --git a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/action/GetLifecycleResponseTests.java b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/action/GetLifecycleResponseTests.java index a92f02ebebc..8fa1f329c85 100644 --- a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/action/GetLifecycleResponseTests.java +++ b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/indexlifecycle/action/GetLifecycleResponseTests.java @@ -29,7 +29,7 @@ public class GetLifecycleResponseTests extends AbstractStreamableTestCase