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
This commit is contained in:
Colin Goodheart-Smithe 2017-12-20 12:27:26 +00:00
parent b12f1a9526
commit 586065fca7
13 changed files with 13 additions and 17 deletions

View File

@ -56,7 +56,7 @@ public class AllocateAction implements LifecycleAction {
@Override @Override
public void execute(Index index, Client client, ClusterService clusterService, Listener listener) { public void execute(Index index, Client client, ClusterService clusterService, Listener listener) {
// nocommit: stub // NORELEASE: stub
listener.onSuccess(true); listener.onSuccess(true);
} }

View File

@ -56,7 +56,7 @@ public class ForceMergeAction implements LifecycleAction {
@Override @Override
public void execute(Index index, Client client, ClusterService clusterService, Listener listener) { public void execute(Index index, Client client, ClusterService clusterService, Listener listener) {
// nocommit: stub // NORELEASE: stub
listener.onSuccess(true); listener.onSuccess(true);
} }

View File

@ -20,7 +20,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ConstructingObjectParser;
import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.xpack.indexlifecycle.ObjectParserUtils;
import java.io.IOException; import java.io.IOException;
import java.util.Collections; import java.util.Collections;

View File

@ -13,7 +13,8 @@ import java.util.TreeMap;
import java.util.function.Function; 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 class ObjectParserUtils {
public static <V extends NamedWriteable> SortedMap<String, V> convertListToMapValues(Function<V, String> keyFunction, public static <V extends NamedWriteable> SortedMap<String, V> convertListToMapValues(Function<V, String> keyFunction,

View File

@ -26,7 +26,6 @@ import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.SortedMap;
import java.util.TreeMap; import java.util.TreeMap;
import static org.elasticsearch.xpack.indexlifecycle.ObjectParserUtils.convertListToMapValues; import static org.elasticsearch.xpack.indexlifecycle.ObjectParserUtils.convertListToMapValues;
@ -170,7 +169,7 @@ public class Phase implements ToXContentObject, Writeable {
@Override @Override
public void onFailure(Exception e) { public void onFailure(Exception e) {
// Something went wrong so log the error and hopefully it will succeed next time execute // 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); logger.error("Failed to initialised action [" + firstActionName + "] for index [" + indexName + "]", e);
} }
}); });

View File

@ -14,7 +14,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.common.logging.ESLoggerFactory;
import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ConstructingObjectParser;
import org.elasticsearch.common.xcontent.ObjectParser;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.Index; import org.elasticsearch.index.Index;
@ -73,7 +72,7 @@ public class ReplicasAction implements LifecycleAction {
@Override @Override
public void execute(Index index, Client client, ClusterService clusterService, Listener listener) { public void execute(Index index, Client client, ClusterService clusterService, Listener listener) {
// nocommit: stub // NORELEASE: stub
listener.onSuccess(true); listener.onSuccess(true);
} }

View File

@ -56,7 +56,7 @@ public class ShrinkAction implements LifecycleAction {
@Override @Override
public void execute(Index index, Client client, ClusterService clusterService, Listener listener) { public void execute(Index index, Client client, ClusterService clusterService, Listener listener) {
// nocommit: stub // NORELEASE: stub
listener.onSuccess(true); listener.onSuccess(true);
} }

View File

@ -117,7 +117,7 @@ public class TimeseriesLifecyclePolicy extends LifecyclePolicy {
* - {@link ForceMergeAction} * - {@link ForceMergeAction}
* - {@link ReplicasAction} (if action.number_of_replicas gt idxMeta.number_of_replicas) * - {@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 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 * @param phase the current phase for which to provide an action provider

View File

@ -23,11 +23,9 @@ import org.elasticsearch.xpack.XPackSettings;
import org.elasticsearch.xpack.indexlifecycle.action.PutLifecycleAction; import org.elasticsearch.xpack.indexlifecycle.action.PutLifecycleAction;
import org.junit.Before; import org.junit.Before;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List;
import java.util.Map; import java.util.Map;
import static org.elasticsearch.client.Requests.clusterHealthRequest; import static org.elasticsearch.client.Requests.clusterHealthRequest;

View File

@ -33,7 +33,7 @@ public class PhaseTests extends AbstractSerializingTestCase<Phase> {
List<NamedXContentRegistry.Entry> entries = Arrays List<NamedXContentRegistry.Entry> entries = Arrays
.asList(new NamedXContentRegistry.Entry(LifecycleAction.class, new ParseField(DeleteAction.NAME), DeleteAction::parse)); .asList(new NamedXContentRegistry.Entry(LifecycleAction.class, new ParseField(DeleteAction.NAME), DeleteAction::parse));
registry = new NamedXContentRegistry(entries); 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 // than use the same name for all instances
} }

View File

@ -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(RolloverAction.NAME), RolloverAction::parse),
new NamedXContentRegistry.Entry(LifecycleAction.class, new ParseField(ShrinkAction.NAME), ShrinkAction::parse)); new NamedXContentRegistry.Entry(LifecycleAction.class, new ParseField(ShrinkAction.NAME), ShrinkAction::parse));
registry = new NamedXContentRegistry(entries); 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 // than use the same name for all instances
} }
@ -303,7 +303,7 @@ public class TimeseriesLifecyclePolicyTests extends AbstractSerializingTestCase<
LifecycleAction current = provider.next(null); LifecycleAction current = provider.next(null);
assertThat(current, not(equalTo(TEST_REPLICAS_ACTION))); assertThat(current, not(equalTo(TEST_REPLICAS_ACTION)));
while (true) { 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 // also provider.next(current) never evaluates to null because
// when called with the replicas action it always returns a // when called with the replicas action it always returns a
// non-null action. We should avoid using while true here // non-null action. We should avoid using while true here

View File

@ -29,7 +29,7 @@ public class GetLifecycleResponseTests extends AbstractStreamableTestCase<GetLif
@Before @Before
public void setup() { public void setup() {
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 // than use the same name for all instances
} }

View File

@ -40,7 +40,7 @@ public class PutLifecycleRequestTests extends AbstractStreamableXContentTestCase
new NamedXContentRegistry.Entry(LifecyclePolicy.class, new NamedXContentRegistry.Entry(LifecyclePolicy.class,
new ParseField(TestLifecyclePolicy.TYPE), TestLifecyclePolicy::parse)); new ParseField(TestLifecyclePolicy.TYPE), TestLifecyclePolicy::parse));
registry = new NamedXContentRegistry(entries); 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 // than use the same name for all instances
} }