From 1a34568a8bc2edaf90d2f0cddf761f10c1ecef10 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Tue, 27 Jun 2023 13:08:13 +0200 Subject: [PATCH] Remove remaining redundant overrides (#97134) Follow-up to #97130, removing all remaining redundant overrides outside the server package. --- .../ingest/geoip/GeoIpDownloaderIT.java | 5 --- .../rankeval/RankEvalRequestBuilder.java | 5 --- .../url/http/HttpResponseInputStream.java | 3 -- .../http/ResponseHeaderPluginIT.java | 5 --- .../cluster/service/ClusterServiceIT.java | 7 ----- .../indices/settings/UpdateSettingsIT.java | 3 -- .../aggregations/bucket/DoubleTermsIT.java | 8 ----- .../aggregations/bucket/LongTermsIT.java | 8 ----- .../search/aggregations/bucket/RangeIT.java | 8 ----- .../bucket/terms/StringTermsIT.java | 8 ----- .../test/seektracker/SeekStatsRequest.java | 5 --- .../script/MockScriptEngine.java | 4 --- .../search/geo/GeoShapeIntegTestCase.java | 7 ----- .../multiterms/InternalMultiTerms.java | 5 --- .../storage/ReactiveStorageIT.java | 6 ---- .../PutAutoFollowPatternRequestTests.java | 5 --- .../action/PutFollowActionRequestTests.java | 4 --- .../ResumeFollowActionRequestTests.java | 5 --- .../core/ccr/action/ForgetFollowerAction.java | 6 ---- .../downsample/DownsampleIndexerAction.java | 6 ---- .../core/ml/action/GetCalendarsAction.java | 6 ---- .../core/ml/action/GetFiltersAction.java | 6 ---- .../action/TrainedModelCacheInfoAction.java | 6 ---- .../termsenum/action/TermsEnumRequest.java | 5 --- .../actions/stats/WatcherStatsRequest.java | 6 ---- ...lusterStateLicenseServiceClusterTests.java | 10 ------ .../SetResetModeActionRequestTests.java | 5 --- ...usterStateWaitUntilThresholdStepTests.java | 5 --- .../ilm/ExplainLifecycleResponseTests.java | 5 --- .../ilm/action/MoveToStepRequestTests.java | 5 --- .../ilm/action/PutLifecycleRequestTests.java | 4 --- ...moveIndexLifecyclePolicyResponseTests.java | 5 --- ...odelSnapshotUpgradeActionRequestTests.java | 5 --- .../ml/action/CloseJobActionRequestTests.java | 5 --- .../EvaluateDataFrameActionRequestTests.java | 5 --- .../action/ForecastJobActionRequestTests.java | 5 --- .../action/GetBucketActionRequestTests.java | 5 --- .../GetCalendarEventsActionRequestTests.java | 5 --- .../GetCalendarsActionRequestTests.java | 4 --- .../ml/action/GetCategoriesRequestTests.java | 5 --- .../GetInfluencersActionRequestTests.java | 4 --- .../GetModelSnapshotsActionRequestTests.java | 4 --- .../GetOverallBucketsActionRequestTests.java | 5 --- .../action/GetRecordsActionRequestTests.java | 4 --- .../ml/action/OpenJobActionRequestTests.java | 5 --- .../action/PutCalendarActionRequestTests.java | 5 --- ...tDataFrameAnalyticsActionRequestTests.java | 5 --- .../action/PutDatafeedActionRequestTests.java | 5 --- .../action/PutFilterActionRequestTests.java | 5 --- ...RevertModelSnapshotActionRequestTests.java | 5 --- .../SetUpgradeModeActionRequestTests.java | 5 --- .../StartDatafeedActionRequestTests.java | 5 --- .../StopDatafeedActionRequestTests.java | 5 --- .../UpdateDatafeedActionRequestTests.java | 5 --- .../UpdateFilterActionRequestTests.java | 5 --- ...UpdateModelSnapshotActionRequestTests.java | 4 --- .../UpgradeJobModelSnapshotRequestTests.java | 5 --- .../UpgradeJobModelSnapshotResponseTests.java | 5 --- .../ValidateDetectorActionRequestTests.java | 5 --- .../inference/preprocessing/MultiTests.java | 6 ---- .../QuestionAnsweringConfigUpdateTests.java | 5 --- .../TextSimilarityConfigUpdateTests.java | 5 --- ...roShotClassificationConfigUpdateTests.java | 5 --- .../job/RollupIndexerJobStatsTests.java | 4 --- .../PreviewTransformActionRequestTests.java | 5 --- .../PreviewTransformsActionResponseTests.java | 4 --- .../analytics/event/AnalyticsEvent.java | 5 --- .../xpack/ilm/IndexLifecycle.java | 7 ----- .../ml/integration/ClassificationIT.java | 13 -------- .../DataFrameAnalysisCustomFeatureIT.java | 14 --------- .../process/NativeAnalyticsProcess.java | 13 -------- .../monitoring/MonitoringServiceTests.java | 10 ------ .../xpack/ql/expression/Literal.java | 5 --- .../xpack/ql/expression/Order.java | 5 --- .../rrf/RRFRankCoordinatorCanMatchIT.java | 5 --- .../xpack/rank/rrf/RRFRankMultiShardIT.java | 5 --- .../rank/rrf/RRFRankShardCanMatchIT.java | 5 --- .../elasticsearch/xpack/rollup/Rollup.java | 31 ------------------- .../action/PutJobActionRequestTests.java | 5 --- .../integration/ClearRolesCacheTests.java | 5 --- .../FileSettingsRoleMappingsStartupIT.java | 4 --- .../esnative/ReservedRealmIntegTests.java | 5 --- .../esnative/tool/SetupPasswordToolTests.java | 14 +-------- .../blobstore/testkit/BlobAnalyzeAction.java | 7 +---- .../search/aggregations/InternalGeoLine.java | 6 ---- ...GeoShapeWithDocValuesFieldMapperTests.java | 5 --- .../sql/qa/single_node/JdbcDocCsvSpecIT.java | 5 --- .../expression/function/aggregate/Avg.java | 6 ---- .../aggregate/MedianAbsoluteDeviation.java | 7 ----- .../aggregate/PercentileAggregate.java | 5 --- .../scalar/datetime/BaseDateTimeFunction.java | 5 --- .../search/SearchHitCursorTests.java | 6 ---- .../xpack/sql/session/ListCursorTests.java | 6 ---- .../continuous/TransformContinuousIT.java | 10 ------ .../TransformIndexerFailureHandlingTests.java | 5 --- .../trigger/ScheduleTriggerEngineMock.java | 6 ---- 96 files changed, 2 insertions(+), 573 deletions(-) diff --git a/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderIT.java b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderIT.java index edb572e988fe..5da61a9b81ea 100644 --- a/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderIT.java +++ b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderIT.java @@ -751,11 +751,6 @@ public class GeoIpDownloaderIT extends AbstractGeoIpIT { return NON_GEO_PROCESSOR_TYPE; } - @Override - public boolean isAsync() { - return false; - } - }); return procMap; } diff --git a/modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RankEvalRequestBuilder.java b/modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RankEvalRequestBuilder.java index 5a4269a69604..0f56261f42c0 100644 --- a/modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RankEvalRequestBuilder.java +++ b/modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RankEvalRequestBuilder.java @@ -18,11 +18,6 @@ public class RankEvalRequestBuilder extends ActionRequestBuilder> nodePlugins() { return CollectionUtils.appendToCopy(super.nodePlugins(), TestResponseHeaderPlugin.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/service/ClusterServiceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/service/ClusterServiceIT.java index 24950fe160e8..873f8083f4e0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/service/ClusterServiceIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/cluster/service/ClusterServiceIT.java @@ -51,10 +51,6 @@ public class ClusterServiceIT extends ESIntegTestCase { clusterService.submitUnbatchedStateUpdateTask( "test", new AckedClusterStateUpdateTask(MasterServiceTests.ackedRequest(TEN_SECONDS, TEN_SECONDS), null) { - @Override - public boolean mustAck(DiscoveryNode discoveryNode) { - return true; - } @Override public void onAllNodesAcked() { @@ -207,9 +203,6 @@ public class ClusterServiceIT extends ESIntegTestCase { latch.countDown(); } - @Override - public void clusterStateProcessed(ClusterState oldState, ClusterState newState) {} - @Override public ClusterState execute(ClusterState currentState) throws Exception { executed.set(true); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java index ac78855d3170..c1851eb9924c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java @@ -128,9 +128,6 @@ public class UpdateSettingsIT extends ESIntegTestCase { Setting.Property.Final ); - @Override - public void onIndexModule(IndexModule indexModule) {} - @Override public List> getSettings() { return Collections.singletonList(FINAL_SETTING); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java index f6ca67e81485..1e4cfb444d47 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java @@ -102,14 +102,6 @@ public class DoubleTermsIT extends AbstractTermsTestCase { return scripts; } - @Override - protected Map, Object>> nonDeterministicPluginScripts() { - Map, Object>> scripts = new HashMap<>(); - - scripts.put("Math.random()", vars -> DoubleTermsIT.randomDouble()); - - return scripts; - } } private static final int NUM_DOCS = 5; // TODO: randomize the size? diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java index 8fefb70269b1..fa5a23ecb322 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java @@ -90,14 +90,6 @@ public class LongTermsIT extends AbstractTermsTestCase { return scripts; } - @Override - protected Map, Object>> nonDeterministicPluginScripts() { - Map, Object>> scripts = new HashMap<>(); - - scripts.put("Math.random()", vars -> LongTermsIT.randomDouble()); - - return scripts; - } } private static final int NUM_DOCS = 5; // TODO randomize the size? diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java index a3a0f337aa42..95f60df960ab 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java @@ -82,14 +82,6 @@ public class RangeIT extends ESIntegTestCase { return scripts; } - @Override - protected Map, Object>> nonDeterministicPluginScripts() { - Map, Object>> scripts = new HashMap<>(); - - scripts.put("Math.random()", vars -> RangeIT.randomDouble()); - - return scripts; - } } @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java index 8bbb234a7575..60af5cfad000 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java @@ -115,14 +115,6 @@ public class StringTermsIT extends AbstractTermsTestCase { return scripts; } - @Override - protected Map, Object>> nonDeterministicPluginScripts() { - Map, Object>> scripts = new HashMap<>(); - - scripts.put("Math.random()", vars -> StringTermsIT.randomDouble()); - - return scripts; - } } @Override diff --git a/test/external-modules/seek-tracking-directory/src/main/java/org/elasticsearch/test/seektracker/SeekStatsRequest.java b/test/external-modules/seek-tracking-directory/src/main/java/org/elasticsearch/test/seektracker/SeekStatsRequest.java index be79a5178cdf..86dc35cc3cd4 100644 --- a/test/external-modules/seek-tracking-directory/src/main/java/org/elasticsearch/test/seektracker/SeekStatsRequest.java +++ b/test/external-modules/seek-tracking-directory/src/main/java/org/elasticsearch/test/seektracker/SeekStatsRequest.java @@ -8,7 +8,6 @@ package org.elasticsearch.test.seektracker; -import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.nodes.BaseNodesRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; @@ -40,8 +39,4 @@ public class SeekStatsRequest extends BaseNodesRequest { return indices; } - @Override - public ActionRequestValidationException validate() { - return null; - } } diff --git a/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java b/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java index 811d7ed1d6f7..bd313a7d9e0e 100644 --- a/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java +++ b/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java @@ -484,10 +484,6 @@ public class MockScriptEngine implements ScriptEngine { return (boolean) script.apply(ctx); } - @Override - public void setDocument(int doc) { - docReader.setDocument(doc); - } }; } } diff --git a/test/framework/src/main/java/org/elasticsearch/search/geo/GeoShapeIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/search/geo/GeoShapeIntegTestCase.java index bc8186e8b700..d451689350a4 100644 --- a/test/framework/src/main/java/org/elasticsearch/search/geo/GeoShapeIntegTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/search/geo/GeoShapeIntegTestCase.java @@ -17,8 +17,6 @@ import org.elasticsearch.xcontent.XContentBuilder; import org.elasticsearch.xcontent.XContentFactory; import org.elasticsearch.xcontent.XContentType; -import java.io.ByteArrayOutputStream; - import static org.elasticsearch.index.query.QueryBuilders.geoBoundingBoxQuery; import static org.elasticsearch.index.query.QueryBuilders.geoDistanceQuery; import static org.elasticsearch.index.query.QueryBuilders.geoShapeQuery; @@ -101,11 +99,6 @@ public abstract class GeoShapeIntegTestCase extends BaseShapeIntegTestCase { - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected PutAutoFollowPatternAction.Request doParseInstance(XContentParser parser) throws IOException { return PutAutoFollowPatternAction.Request.fromXContent(parser, null); diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/PutFollowActionRequestTests.java b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/PutFollowActionRequestTests.java index aed5b43d7ca4..27aaf1dea7db 100644 --- a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/PutFollowActionRequestTests.java +++ b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/PutFollowActionRequestTests.java @@ -98,8 +98,4 @@ public class PutFollowActionRequestTests extends AbstractXContentSerializingTest return request; } - @Override - protected boolean supportsUnknownFields() { - return false; - } } diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/ResumeFollowActionRequestTests.java b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/ResumeFollowActionRequestTests.java index 4df1da7d11eb..8a835a4d1f71 100644 --- a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/ResumeFollowActionRequestTests.java +++ b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/ResumeFollowActionRequestTests.java @@ -58,11 +58,6 @@ public class ResumeFollowActionRequestTests extends AbstractXContentSerializingT return ResumeFollowAction.Request.fromXContent(parser, null); } - @Override - protected boolean supportsUnknownFields() { - return false; - } - static void generateFollowParameters(FollowParameters followParameters) { if (randomBoolean()) { followParameters.setMaxReadRequestOperationCount(randomIntBetween(1, Integer.MAX_VALUE)); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/ForgetFollowerAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/ForgetFollowerAction.java index 0bcc88d02468..ed36f3cef5f5 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/ForgetFollowerAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/ForgetFollowerAction.java @@ -7,7 +7,6 @@ package org.elasticsearch.xpack.core.ccr.action; -import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ActionType; import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.action.support.broadcast.BroadcastResponse; @@ -152,11 +151,6 @@ public class ForgetFollowerAction extends ActionType { out.writeString(followerIndexUUID); } - @Override - public ActionRequestValidationException validate() { - return null; - } - @Override public boolean includeDataStreams() { return false; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/downsample/DownsampleIndexerAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/downsample/DownsampleIndexerAction.java index a2c232ff6bed..22805ae8b6ca 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/downsample/DownsampleIndexerAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/downsample/DownsampleIndexerAction.java @@ -6,7 +6,6 @@ */ package org.elasticsearch.xpack.core.downsample; -import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ActionType; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; @@ -115,11 +114,6 @@ public class DownsampleIndexerAction extends ActionType super(in); } - @Override - public RestStatus status() { - return RestStatus.OK; - } - public QueryPage getCalendars() { return getResources(); } diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetFiltersAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetFiltersAction.java index 560c75ffc8f6..32e913cbf1eb 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetFiltersAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetFiltersAction.java @@ -9,7 +9,6 @@ package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.ActionType; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.xcontent.StatusToXContentObject; -import org.elasticsearch.rest.RestStatus; import org.elasticsearch.xpack.core.action.AbstractGetResourcesRequest; import org.elasticsearch.xpack.core.action.AbstractGetResourcesResponse; import org.elasticsearch.xpack.core.action.util.QueryPage; @@ -68,11 +67,6 @@ public class GetFiltersAction extends ActionType { return getResources(); } - @Override - public RestStatus status() { - return RestStatus.OK; - } - @Override protected Reader getReader() { return MlFilter::new; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/TrainedModelCacheInfoAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/TrainedModelCacheInfoAction.java index ac1b234edc73..b14d42088a26 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/TrainedModelCacheInfoAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/TrainedModelCacheInfoAction.java @@ -7,7 +7,6 @@ package org.elasticsearch.xpack.core.ml.action; -import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ActionType; import org.elasticsearch.action.FailedNodeException; import org.elasticsearch.action.support.nodes.BaseNodeResponse; @@ -49,11 +48,6 @@ public class TrainedModelCacheInfoAction extends ActionType impleme return true; } - @Override - public boolean includeDataStreams() { - return true; - } - /** * The field to look inside for values */ diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequest.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequest.java index af2d5ebc8c3d..10b658456aab 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequest.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequest.java @@ -6,7 +6,6 @@ */ package org.elasticsearch.xpack.core.watcher.transport.actions.stats; -import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.nodes.BaseNodesRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -58,11 +57,6 @@ public class WatcherStatsRequest extends BaseNodesRequest { this.includeStats = includeStats; } - @Override - public ActionRequestValidationException validate() { - return null; - } - @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/license/ClusterStateLicenseServiceClusterTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/license/ClusterStateLicenseServiceClusterTests.java index 7110e3fe0c79..5890434f88e6 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/license/ClusterStateLicenseServiceClusterTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/license/ClusterStateLicenseServiceClusterTests.java @@ -6,16 +6,11 @@ */ package org.elasticsearch.license; -import org.elasticsearch.analysis.common.CommonAnalysisPlugin; import org.elasticsearch.cluster.node.DiscoveryNodeRole; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.core.TimeValue; -import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; -import java.util.Arrays; -import java.util.Collection; import java.util.Set; import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST; @@ -34,11 +29,6 @@ public class ClusterStateLicenseServiceClusterTests extends AbstractLicensesInte return Settings.builder().put(addRoles(super.nodeSettings(nodeOrdinal, otherSettings), Set.of(DiscoveryNodeRole.DATA_ROLE))); } - @Override - protected Collection> nodePlugins() { - return Arrays.asList(LocalStateCompositeXPackPlugin.class, CommonAnalysisPlugin.class); - } - public void testClusterRestartWithLicense() throws Exception { wipeAllLicenses(); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/action/SetResetModeActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/action/SetResetModeActionRequestTests.java index f7d7b3a1fa21..9f5716ef49ab 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/action/SetResetModeActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/action/SetResetModeActionRequestTests.java @@ -23,11 +23,6 @@ public class SetResetModeActionRequestTests extends AbstractXContentSerializingT return null;// TODO implement https://github.com/elastic/elasticsearch/issues/25929 } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Writeable.Reader instanceReader() { return SetResetModeActionRequest::new; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/ClusterStateWaitUntilThresholdStepTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/ClusterStateWaitUntilThresholdStepTests.java index 01f4b0ad22ca..5bf24e52d2e6 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/ClusterStateWaitUntilThresholdStepTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/ClusterStateWaitUntilThresholdStepTests.java @@ -259,11 +259,6 @@ public class ClusterStateWaitUntilThresholdStepTests extends AbstractStepTestCas return new Result(false, new SingleMessageFieldInfo("")); } - @Override - public boolean isCompletable() { - return true; - } - @Override public boolean isRetryable() { return true; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/ExplainLifecycleResponseTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/ExplainLifecycleResponseTests.java index e140e6f2d111..aee70842cb45 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/ExplainLifecycleResponseTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/ExplainLifecycleResponseTests.java @@ -51,11 +51,6 @@ public class ExplainLifecycleResponseTests extends AbstractXContentSerializingTe return ExplainLifecycleResponse.fromXContent(parser); } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected boolean assertToXContentEquivalence() { return false; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/MoveToStepRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/MoveToStepRequestTests.java index 0e01e85fb874..bbfc6221a41e 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/MoveToStepRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/MoveToStepRequestTests.java @@ -40,11 +40,6 @@ public class MoveToStepRequestTests extends AbstractXContentSerializingTestCase< return Request.parseRequest(index, parser); } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request mutateInstance(Request request) { String indexName = request.getIndex(); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/PutLifecycleRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/PutLifecycleRequestTests.java index 881d76e1bb45..dd37e907f7a9 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/PutLifecycleRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/PutLifecycleRequestTests.java @@ -124,10 +124,6 @@ public class PutLifecycleRequestTests extends AbstractXContentSerializingTestCas return new NamedXContentRegistry(entries); } - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request mutateInstance(Request request) { String name = randomBoolean() ? lifecycleName : randomAlphaOfLength(5); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/RemoveIndexLifecyclePolicyResponseTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/RemoveIndexLifecyclePolicyResponseTests.java index 0ab431b57449..76f4d732f4ae 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/RemoveIndexLifecyclePolicyResponseTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/action/RemoveIndexLifecyclePolicyResponseTests.java @@ -45,11 +45,6 @@ public class RemoveIndexLifecyclePolicyResponseTests extends AbstractXContentSer return Response.PARSER.apply(parser, null); } - @Override - protected boolean supportsUnknownFields() { - return false; - } - public void testNullFailedIndices() { IllegalArgumentException exception = expectThrows(IllegalArgumentException.class, () -> new Response((List) null)); assertEquals("failed_indexes cannot be null", exception.getMessage()); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/CancelJobModelSnapshotUpgradeActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/CancelJobModelSnapshotUpgradeActionRequestTests.java index 172ddf52bb3f..af79a5782623 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/CancelJobModelSnapshotUpgradeActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/CancelJobModelSnapshotUpgradeActionRequestTests.java @@ -28,11 +28,6 @@ public class CancelJobModelSnapshotUpgradeActionRequestTests extends AbstractXCo return null;// TODO implement https://github.com/elastic/elasticsearch/issues/25929 } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Writeable.Reader instanceReader() { return Request::new; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/CloseJobActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/CloseJobActionRequestTests.java index bbca67383ddb..21a1843e1461 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/CloseJobActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/CloseJobActionRequestTests.java @@ -34,11 +34,6 @@ public class CloseJobActionRequestTests extends AbstractXContentSerializingTestC return null;// TODO implement https://github.com/elastic/elasticsearch/issues/25929 } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Writeable.Reader instanceReader() { return Request::new; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/EvaluateDataFrameActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/EvaluateDataFrameActionRequestTests.java index 4cb4879c7f8f..e2cd0ff169dc 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/EvaluateDataFrameActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/EvaluateDataFrameActionRequestTests.java @@ -80,11 +80,6 @@ public class EvaluateDataFrameActionRequestTests extends AbstractXContentSeriali return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/ForecastJobActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/ForecastJobActionRequestTests.java index e8d8cd0300af..efb165757c5d 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/ForecastJobActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/ForecastJobActionRequestTests.java @@ -23,11 +23,6 @@ public class ForecastJobActionRequestTests extends AbstractXContentSerializingTe return Request.parseRequest(null, parser); } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request createTestInstance() { Request request = new Request(randomAlphaOfLengthBetween(1, 20)); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetBucketActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetBucketActionRequestTests.java index 890693e33c48..8491f95b20f2 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetBucketActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetBucketActionRequestTests.java @@ -62,11 +62,6 @@ public class GetBucketActionRequestTests extends AbstractXContentSerializingTest return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return GetBucketsAction.Request.parseRequest(null, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCalendarEventsActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCalendarEventsActionRequestTests.java index 428a3d33aa74..f439e6be9f42 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCalendarEventsActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCalendarEventsActionRequestTests.java @@ -48,11 +48,6 @@ public class GetCalendarEventsActionRequestTests extends AbstractXContentSeriali return GetCalendarEventsAction.Request.parseRequest(null, parser); } - @Override - protected boolean supportsUnknownFields() { - return false; - } - public void testValidate() { GetCalendarEventsAction.Request request = new GetCalendarEventsAction.Request("cal-name"); request.setJobId("foo"); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCalendarsActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCalendarsActionRequestTests.java index 1f330312a35d..0ecf969bd2a4 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCalendarsActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCalendarsActionRequestTests.java @@ -40,8 +40,4 @@ public class GetCalendarsActionRequestTests extends AbstractXContentSerializingT return GetCalendarsAction.Request.parseRequest(null, parser); } - @Override - protected boolean supportsUnknownFields() { - return false; - } } diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCategoriesRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCategoriesRequestTests.java index eea1fce83dee..d3897b34f5a4 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCategoriesRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetCategoriesRequestTests.java @@ -40,11 +40,6 @@ public class GetCategoriesRequestTests extends AbstractXContentSerializingTestCa return GetCategoriesAction.Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected GetCategoriesAction.Request doParseInstance(XContentParser parser) { return GetCategoriesAction.Request.parseRequest(null, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetInfluencersActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetInfluencersActionRequestTests.java index d747c0cfb75d..c5c434a6a927 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetInfluencersActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetInfluencersActionRequestTests.java @@ -60,8 +60,4 @@ public class GetInfluencersActionRequestTests extends AbstractXContentSerializin return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } } diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetModelSnapshotsActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetModelSnapshotsActionRequestTests.java index e6d948313e18..8eee2a0b8a85 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetModelSnapshotsActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetModelSnapshotsActionRequestTests.java @@ -52,8 +52,4 @@ public class GetModelSnapshotsActionRequestTests extends AbstractXContentSeriali return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } } diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetOverallBucketsActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetOverallBucketsActionRequestTests.java index 7eb956a027cc..309261cc07b6 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetOverallBucketsActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetOverallBucketsActionRequestTests.java @@ -50,11 +50,6 @@ public class GetOverallBucketsActionRequestTests extends AbstractXContentSeriali return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(null, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetRecordsActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetRecordsActionRequestTests.java index c64a3bb4abf4..d3c8258f7296 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetRecordsActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/GetRecordsActionRequestTests.java @@ -60,8 +60,4 @@ public class GetRecordsActionRequestTests extends AbstractXContentSerializingTes return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } } diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/OpenJobActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/OpenJobActionRequestTests.java index a80d07d7ee50..1a96aa8fd217 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/OpenJobActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/OpenJobActionRequestTests.java @@ -28,11 +28,6 @@ public class OpenJobActionRequestTests extends AbstractXContentSerializingTestCa return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(null, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutCalendarActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutCalendarActionRequestTests.java index e087fbf5ce04..88082e435a77 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutCalendarActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutCalendarActionRequestTests.java @@ -31,11 +31,6 @@ public class PutCalendarActionRequestTests extends AbstractXContentSerializingTe return PutCalendarAction.Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected PutCalendarAction.Request doParseInstance(XContentParser parser) { return PutCalendarAction.Request.parseRequest(calendarId, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutDataFrameAnalyticsActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutDataFrameAnalyticsActionRequestTests.java index 8a97e0806e62..f5c5be73f2b7 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutDataFrameAnalyticsActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutDataFrameAnalyticsActionRequestTests.java @@ -74,11 +74,6 @@ public class PutDataFrameAnalyticsActionRequestTests extends AbstractXContentSer return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(id, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutDatafeedActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutDatafeedActionRequestTests.java index 27ea6847d4c7..09fbc4ae2a47 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutDatafeedActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutDatafeedActionRequestTests.java @@ -44,11 +44,6 @@ public class PutDatafeedActionRequestTests extends AbstractXContentSerializingTe return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(datafeedId, SearchRequest.DEFAULT_INDICES_OPTIONS, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutFilterActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutFilterActionRequestTests.java index e59ccfb9eb81..d71a58e2ceb7 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutFilterActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/PutFilterActionRequestTests.java @@ -31,11 +31,6 @@ public class PutFilterActionRequestTests extends AbstractXContentSerializingTest return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return PutFilterAction.Request.parseRequest(filterId, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/RevertModelSnapshotActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/RevertModelSnapshotActionRequestTests.java index 13ce3620b369..eabb4cd43b23 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/RevertModelSnapshotActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/RevertModelSnapshotActionRequestTests.java @@ -38,11 +38,6 @@ public class RevertModelSnapshotActionRequestTests extends AbstractXContentSeria return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return RevertModelSnapshotAction.Request.parseRequest(null, null, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/SetUpgradeModeActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/SetUpgradeModeActionRequestTests.java index 896ddcc8f884..3b09fd60311e 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/SetUpgradeModeActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/SetUpgradeModeActionRequestTests.java @@ -23,11 +23,6 @@ public class SetUpgradeModeActionRequestTests extends AbstractXContentSerializin return null;// TODO implement https://github.com/elastic/elasticsearch/issues/25929 } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Writeable.Reader instanceReader() { return Request::new; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedActionRequestTests.java index 9cd123fd5c66..2677796ed702 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedActionRequestTests.java @@ -31,11 +31,6 @@ public class StartDatafeedActionRequestTests extends AbstractXContentSerializing return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(null, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StopDatafeedActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StopDatafeedActionRequestTests.java index 183f2613770b..166ee157d855 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StopDatafeedActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StopDatafeedActionRequestTests.java @@ -37,11 +37,6 @@ public class StopDatafeedActionRequestTests extends AbstractXContentSerializingT return null;// TODO implement https://github.com/elastic/elasticsearch/issues/25929 } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Writeable.Reader instanceReader() { return Request::new; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateDatafeedActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateDatafeedActionRequestTests.java index bfc78fb69ccb..e71ab8ebc3dd 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateDatafeedActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateDatafeedActionRequestTests.java @@ -44,11 +44,6 @@ public class UpdateDatafeedActionRequestTests extends AbstractXContentSerializin return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(datafeedId, null, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateFilterActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateFilterActionRequestTests.java index f5c1453e90f7..1f023736a0d3 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateFilterActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateFilterActionRequestTests.java @@ -53,11 +53,6 @@ public class UpdateFilterActionRequestTests extends AbstractXContentSerializingT return strings; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(filterId, parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateModelSnapshotActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateModelSnapshotActionRequestTests.java index 137225983a7f..34cabb11e6d5 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateModelSnapshotActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateModelSnapshotActionRequestTests.java @@ -40,8 +40,4 @@ public class UpdateModelSnapshotActionRequestTests extends AbstractXContentSeria return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } } diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpgradeJobModelSnapshotRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpgradeJobModelSnapshotRequestTests.java index ec9ad15e9e99..290871a65155 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpgradeJobModelSnapshotRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpgradeJobModelSnapshotRequestTests.java @@ -33,11 +33,6 @@ public class UpgradeJobModelSnapshotRequestTests extends AbstractXContentSeriali return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpgradeJobModelSnapshotResponseTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpgradeJobModelSnapshotResponseTests.java index adf9036c0cb8..2f5e84e13fa6 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpgradeJobModelSnapshotResponseTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpgradeJobModelSnapshotResponseTests.java @@ -28,11 +28,6 @@ public class UpgradeJobModelSnapshotResponseTests extends AbstractXContentSerial return Response::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Response doParseInstance(XContentParser parser) { return Response.parseRequest(parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/ValidateDetectorActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/ValidateDetectorActionRequestTests.java index eea7cd334afb..a9d847e6bef5 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/ValidateDetectorActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/ValidateDetectorActionRequestTests.java @@ -35,11 +35,6 @@ public class ValidateDetectorActionRequestTests extends AbstractXContentSerializ return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) { return Request.parseRequest(parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/preprocessing/MultiTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/preprocessing/MultiTests.java index 1eb8cacc4015..ddbd815e67f7 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/preprocessing/MultiTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/preprocessing/MultiTests.java @@ -14,7 +14,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.function.Predicate; import java.util.stream.Stream; import static org.hamcrest.Matchers.allOf; @@ -31,11 +30,6 @@ public class MultiTests extends PreProcessingTests { : Multi.fromXContentStrict(parser, PreProcessor.PreProcessorParseContext.DEFAULT); } - @Override - protected Predicate getRandomFieldsExcludeFilter() { - return field -> field.isEmpty() == false; - } - @Override protected Multi createTestInstance() { return createRandom(); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/QuestionAnsweringConfigUpdateTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/QuestionAnsweringConfigUpdateTests.java index 1bbfc888df75..52b6aec079e6 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/QuestionAnsweringConfigUpdateTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/QuestionAnsweringConfigUpdateTests.java @@ -47,11 +47,6 @@ public class QuestionAnsweringConfigUpdateTests extends AbstractNlpConfigUpdateT return instance; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected QuestionAnsweringConfigUpdate doParseInstance(XContentParser parser) throws IOException { return QuestionAnsweringConfigUpdate.fromXContentStrict(parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/TextSimilarityConfigUpdateTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/TextSimilarityConfigUpdateTests.java index 2d38e581b349..23bb6e1e1545 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/TextSimilarityConfigUpdateTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/TextSimilarityConfigUpdateTests.java @@ -46,11 +46,6 @@ public class TextSimilarityConfigUpdateTests extends AbstractNlpConfigUpdateTest return instance; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected TextSimilarityConfigUpdate doParseInstance(XContentParser parser) throws IOException { return TextSimilarityConfigUpdate.fromXContentStrict(parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/ZeroShotClassificationConfigUpdateTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/ZeroShotClassificationConfigUpdateTests.java index 0bebc849beb8..0fadd891cb02 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/ZeroShotClassificationConfigUpdateTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/ZeroShotClassificationConfigUpdateTests.java @@ -43,11 +43,6 @@ public class ZeroShotClassificationConfigUpdateTests extends AbstractNlpConfigUp return instance; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected ZeroShotClassificationConfigUpdate doParseInstance(XContentParser parser) throws IOException { return ZeroShotClassificationConfigUpdate.fromXContentStrict(parser); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/rollup/job/RollupIndexerJobStatsTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/rollup/job/RollupIndexerJobStatsTests.java index 980c18676bb3..b7003749d1ac 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/rollup/job/RollupIndexerJobStatsTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/rollup/job/RollupIndexerJobStatsTests.java @@ -49,8 +49,4 @@ public class RollupIndexerJobStatsTests extends AbstractXContentSerializingTestC ); } - @Override - protected boolean supportsUnknownFields() { - return false; - } } diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformActionRequestTests.java index 4e9cd9ab9eb1..156431d0c62e 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformActionRequestTests.java @@ -45,11 +45,6 @@ public class PreviewTransformActionRequestTests extends AbstractSerializingTrans return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request createTestInstance() { TransformConfig config = new TransformConfig( diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformsActionResponseTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformsActionResponseTests.java index 5e570abafb7e..9613fc83efd5 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformsActionResponseTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformsActionResponseTests.java @@ -50,8 +50,4 @@ public class PreviewTransformsActionResponseTests extends AbstractXContentSerial return null;// TODO implement https://github.com/elastic/elasticsearch/issues/25929 } - @Override - protected boolean supportsUnknownFields() { - return false; - } } diff --git a/x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/analytics/event/AnalyticsEvent.java b/x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/analytics/event/AnalyticsEvent.java index bd98d5791ff6..3bf8c372cd30 100644 --- a/x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/analytics/event/AnalyticsEvent.java +++ b/x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/analytics/event/AnalyticsEvent.java @@ -167,11 +167,6 @@ public class AnalyticsEvent implements Writeable, ToXContentObject { && payloadAsMap().equals(that.payloadAsMap()); } - @Override - public boolean isFragment() { - return false; - } - @Override public int hashCode() { return Objects.hash(eventCollectionName, eventTime, xContentType, payloadAsMap()); diff --git a/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/IndexLifecycle.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/IndexLifecycle.java index 8ba2f12f338b..1e70f3201c9d 100644 --- a/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/IndexLifecycle.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/IndexLifecycle.java @@ -18,7 +18,6 @@ import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.cluster.routing.allocation.AllocationService; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry; import org.elasticsearch.common.settings.ClusterSettings; import org.elasticsearch.common.settings.IndexScopedSettings; import org.elasticsearch.common.settings.Setting; @@ -145,7 +144,6 @@ import java.time.Clock; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.function.LongSupplier; import java.util.function.Supplier; @@ -292,11 +290,6 @@ public class IndexLifecycle extends Plugin implements ActionPlugin, HealthPlugin return components; } - @Override - public List getNamedWriteables() { - return Collections.emptyList(); - } - @Override public List getNamedXContent() { return NAMED_X_CONTENT_ENTRIES; diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/ClassificationIT.java b/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/ClassificationIT.java index 07adff4f90b7..3ddb05fd0218 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/ClassificationIT.java +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/ClassificationIT.java @@ -24,9 +24,7 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchModule; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; -import org.elasticsearch.xcontent.NamedXContentRegistry; import org.elasticsearch.xpack.core.ml.action.EvaluateDataFrameAction; import org.elasticsearch.xpack.core.ml.action.GetDataFrameAnalyticsStatsAction; import org.elasticsearch.xpack.core.ml.action.GetTrainedModelsAction; @@ -37,14 +35,12 @@ import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsDest; import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsSource; import org.elasticsearch.xpack.core.ml.dataframe.analyses.BoostedTreeParams; import org.elasticsearch.xpack.core.ml.dataframe.analyses.Classification; -import org.elasticsearch.xpack.core.ml.dataframe.analyses.MlDataFrameAnalysisNamedXContentProvider; import org.elasticsearch.xpack.core.ml.dataframe.evaluation.classification.Accuracy; import org.elasticsearch.xpack.core.ml.dataframe.evaluation.classification.AucRoc; import org.elasticsearch.xpack.core.ml.dataframe.evaluation.classification.MulticlassConfusionMatrix; import org.elasticsearch.xpack.core.ml.dataframe.evaluation.classification.PerClassSingleValue; import org.elasticsearch.xpack.core.ml.dataframe.evaluation.classification.Precision; import org.elasticsearch.xpack.core.ml.dataframe.evaluation.classification.Recall; -import org.elasticsearch.xpack.core.ml.inference.MlInferenceNamedXContentProvider; import org.elasticsearch.xpack.core.ml.inference.TrainedModelConfig; import org.elasticsearch.xpack.core.ml.inference.preprocessing.OneHotEncoding; import org.elasticsearch.xpack.core.ml.inference.preprocessing.PreProcessor; @@ -118,15 +114,6 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase { cleanUp(); } - @Override - protected NamedXContentRegistry xContentRegistry() { - SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList()); - List entries = new ArrayList<>(searchModule.getNamedXContents()); - entries.addAll(new MlInferenceNamedXContentProvider().getNamedXContentParsers()); - entries.addAll(new MlDataFrameAnalysisNamedXContentProvider().getNamedXContentParsers()); - return new NamedXContentRegistry(entries); - } - public void testSingleNumericFeatureAndMixedTrainingAndNonTrainingRows() throws Exception { initialize("classification_single_numeric_feature_and_mixed_data_set"); String predictedClassField = KEYWORD_FIELD + "_prediction"; diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/DataFrameAnalysisCustomFeatureIT.java b/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/DataFrameAnalysisCustomFeatureIT.java index 459faadb6dc4..91d302c381f5 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/DataFrameAnalysisCustomFeatureIT.java +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/DataFrameAnalysisCustomFeatureIT.java @@ -19,16 +19,12 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.core.Strings; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchModule; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; -import org.elasticsearch.xcontent.NamedXContentRegistry; import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsConfig; import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsDest; import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsSource; import org.elasticsearch.xpack.core.ml.dataframe.analyses.BoostedTreeParams; -import org.elasticsearch.xpack.core.ml.dataframe.analyses.MlDataFrameAnalysisNamedXContentProvider; import org.elasticsearch.xpack.core.ml.dataframe.analyses.Regression; -import org.elasticsearch.xpack.core.ml.inference.MlInferenceNamedXContentProvider; import org.elasticsearch.xpack.core.ml.inference.preprocessing.FrequencyEncoding; import org.elasticsearch.xpack.core.ml.inference.preprocessing.Multi; import org.elasticsearch.xpack.core.ml.inference.preprocessing.NGram; @@ -41,7 +37,6 @@ import org.junit.Before; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -91,15 +86,6 @@ public class DataFrameAnalysisCustomFeatureIT extends MlNativeDataFrameAnalytics ); } - @Override - protected NamedXContentRegistry xContentRegistry() { - SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList()); - List entries = new ArrayList<>(searchModule.getNamedXContents()); - entries.addAll(new MlInferenceNamedXContentProvider().getNamedXContentParsers()); - entries.addAll(new MlDataFrameAnalysisNamedXContentProvider().getNamedXContentParsers()); - return new NamedXContentRegistry(entries); - } - public void testNGramCustomFeature() throws Exception { initialize("test_ngram_feature_processor"); String predictedClassField = NUMERICAL_FIELD + "_prediction"; diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/process/NativeAnalyticsProcess.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/process/NativeAnalyticsProcess.java index 73306666fbbe..a77280d7ba0c 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/process/NativeAnalyticsProcess.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/process/NativeAnalyticsProcess.java @@ -65,19 +65,6 @@ public class NativeAnalyticsProcess extends AbstractNativeAnalyticsProcess createComponents( - Client client, - ClusterService clusterService, - ThreadPool threadPool, - ResourceWatcherService resourceWatcherService, - ScriptService scriptService, - NamedXContentRegistry xContentRegistry, - Environment environment, - NodeEnvironment nodeEnvironment, - NamedWriteableRegistry namedWriteableRegistry, - IndexNameExpressionResolver expressionResolver, - Supplier repositoriesServiceSupplier, - Tracer tracer, - AllocationService allocationService - ) { - return emptyList(); - } - @Override public List getRestHandlers( Settings unused, diff --git a/x-pack/plugin/rollup/src/test/java/org/elasticsearch/xpack/rollup/action/PutJobActionRequestTests.java b/x-pack/plugin/rollup/src/test/java/org/elasticsearch/xpack/rollup/action/PutJobActionRequestTests.java index aee82bc011c2..37f10dda6ec4 100644 --- a/x-pack/plugin/rollup/src/test/java/org/elasticsearch/xpack/rollup/action/PutJobActionRequestTests.java +++ b/x-pack/plugin/rollup/src/test/java/org/elasticsearch/xpack/rollup/action/PutJobActionRequestTests.java @@ -39,11 +39,6 @@ public class PutJobActionRequestTests extends AbstractXContentSerializingTestCas return Request::new; } - @Override - protected boolean supportsUnknownFields() { - return false; - } - @Override protected Request doParseInstance(XContentParser parser) throws IOException { return Request.fromXContent(parser, jobId); diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/ClearRolesCacheTests.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/ClearRolesCacheTests.java index c4a428da02ed..d52aa89e96ce 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/ClearRolesCacheTests.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/ClearRolesCacheTests.java @@ -79,11 +79,6 @@ public class ClearRolesCacheTests extends NativeRealmIntegTestCase { } } - @Override - protected boolean addMockHttpTransport() { - return false; // enable http - } - public void testModifyingViaApiClearsCache() throws Exception { final TestSecurityClient securityClient = new TestSecurityClient(getRestClient(), SECURITY_REQUEST_OPTIONS); int modifiedRolesCount = randomIntBetween(1, roles.length); diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsStartupIT.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsStartupIT.java index 89f26407cfbb..6f558cc34f29 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsStartupIT.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsStartupIT.java @@ -133,8 +133,4 @@ public class FileSettingsRoleMappingsStartupIT extends SecurityIntegTestCase { ); } - @Override - protected boolean addMockTransportService() { - return false; // security has its own transport service - } } diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java index f023c6415d6c..d9e76195d736 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java @@ -51,11 +51,6 @@ public class ReservedRealmIntegTests extends NativeRealmIntegTestCase { return settings; } - @Override - protected boolean addMockHttpTransport() { - return false; - } - public void testAuthenticate() { final List usernames = Arrays.asList( ElasticUser.NAME, diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolTests.java index a2db382b01be..92a6678d7f9d 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolTests.java @@ -672,19 +672,7 @@ public class SetupPasswordToolTests extends CommandTestCase { } private Command getSetupPasswordCommandWithKeyStore(KeyStoreWrapper keyStore) { - return new SetupPasswordTool(env -> httpClient, (e) -> keyStore) { - - @Override - protected AutoSetup newAutoSetup() { - return new AutoSetup(); - } - - @Override - protected InteractiveSetup newInteractiveSetup() { - return new InteractiveSetup(); - } - - }; + return new SetupPasswordTool(env -> httpClient, (e) -> keyStore); } diff --git a/x-pack/plugin/snapshot-repo-test-kit/src/main/java/org/elasticsearch/repositories/blobstore/testkit/BlobAnalyzeAction.java b/x-pack/plugin/snapshot-repo-test-kit/src/main/java/org/elasticsearch/repositories/blobstore/testkit/BlobAnalyzeAction.java index 809952c7d843..a730e5075f21 100644 --- a/x-pack/plugin/snapshot-repo-test-kit/src/main/java/org/elasticsearch/repositories/blobstore/testkit/BlobAnalyzeAction.java +++ b/x-pack/plugin/snapshot-repo-test-kit/src/main/java/org/elasticsearch/repositories/blobstore/testkit/BlobAnalyzeAction.java @@ -758,12 +758,7 @@ public class BlobAnalyzeAction extends ActionType { @Override public Task createTask(long id, String type, String action, TaskId parentTaskId, Map headers) { - return new CancellableTask(id, type, action, getDescription(), parentTaskId, headers) { - @Override - public boolean shouldCancelChildrenOnCancellation() { - return true; - } - }; + return new CancellableTask(id, type, action, getDescription(), parentTaskId, headers); } public String getRepositoryName() { diff --git a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/search/aggregations/InternalGeoLine.java b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/search/aggregations/InternalGeoLine.java index b2a73f6a0cfd..a520e84a9918 100644 --- a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/search/aggregations/InternalGeoLine.java +++ b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/search/aggregations/InternalGeoLine.java @@ -8,7 +8,6 @@ package org.elasticsearch.xpack.spatial.search.aggregations; import org.apache.lucene.geo.GeoEncodingUtils; import org.elasticsearch.TransportVersion; -import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.search.aggregations.AggregationReduceContext; @@ -209,11 +208,6 @@ public class InternalGeoLine extends InternalAggregation implements GeoShapeMetr } } - @Override - public String toString() { - return Strings.toString(this); - } - @Override public int hashCode() { return Objects.hash(super.hashCode(), Arrays.hashCode(line), Arrays.hashCode(sortVals), complete, includeSorts, sortOrder, size); diff --git a/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapperTests.java b/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapperTests.java index e54db8539fd8..e841979ac883 100644 --- a/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapperTests.java +++ b/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapperTests.java @@ -415,11 +415,6 @@ public class GeoShapeWithDocValuesFieldMapperTests extends GeoFieldMapperTests { return toXContentString(mapper, true); } - @Override - protected void assertSearchable(MappedFieldType fieldType) { - - } - @Override protected Object generateRandomInputValue(MappedFieldType ft) { assumeFalse("Test implemented in a follow up", true); diff --git a/x-pack/plugin/sql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/sql/qa/single_node/JdbcDocCsvSpecIT.java b/x-pack/plugin/sql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/sql/qa/single_node/JdbcDocCsvSpecIT.java index 17f39ea295f1..a63bbac373bb 100644 --- a/x-pack/plugin/sql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/sql/qa/single_node/JdbcDocCsvSpecIT.java +++ b/x-pack/plugin/sql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/sql/qa/single_node/JdbcDocCsvSpecIT.java @@ -73,11 +73,6 @@ public class JdbcDocCsvSpecIT extends SpecBaseIntegrationTestCase { JdbcAssert.assertResultSets(expected, elastic, log, true, true); } - @Override - protected boolean logEsResultSet() { - return false; - } - @Override protected final void doTest() throws Throwable { try (Connection csv = csvConnection(testCase); Connection es = esJdbc()) { diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/Avg.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/Avg.java index 3f8cfd913d98..0370808870b9 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/Avg.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/Avg.java @@ -10,8 +10,6 @@ import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.expression.function.aggregate.EnclosedAgg; import org.elasticsearch.xpack.ql.tree.NodeInfo; import org.elasticsearch.xpack.ql.tree.Source; -import org.elasticsearch.xpack.ql.type.DataType; -import org.elasticsearch.xpack.ql.type.DataTypes; import java.util.List; @@ -39,8 +37,4 @@ public class Avg extends NumericAggregate implements EnclosedAgg { return "avg"; } - @Override - public DataType dataType() { - return DataTypes.DOUBLE; - } } diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/MedianAbsoluteDeviation.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/MedianAbsoluteDeviation.java index 7f7766726f1b..76401f2024f3 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/MedianAbsoluteDeviation.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/MedianAbsoluteDeviation.java @@ -10,8 +10,6 @@ package org.elasticsearch.xpack.sql.expression.function.aggregate; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.tree.NodeInfo; import org.elasticsearch.xpack.ql.tree.Source; -import org.elasticsearch.xpack.ql.type.DataType; -import org.elasticsearch.xpack.ql.type.DataTypes; import java.util.List; @@ -21,11 +19,6 @@ public class MedianAbsoluteDeviation extends NumericAggregate { super(source, field); } - @Override - public DataType dataType() { - return DataTypes.DOUBLE; - } - @Override public Expression replaceChildren(List newChildren) { return new MedianAbsoluteDeviation(source(), newChildren.get(0)); diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/PercentileAggregate.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/PercentileAggregate.java index 642785e606fa..f4ef089dfcc1 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/PercentileAggregate.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/aggregate/PercentileAggregate.java @@ -159,11 +159,6 @@ abstract class PercentileAggregate extends NumericAggregate implements EnclosedA return methodParameter; } - @Override - public DataType dataType() { - return DataTypes.DOUBLE; - } - @Override public String innerName() { Double value = (Double) SqlDataTypeConverter.convert(Foldables.valueOf(parameter), DataTypes.DOUBLE); diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/scalar/datetime/BaseDateTimeFunction.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/scalar/datetime/BaseDateTimeFunction.java index a568589ef161..2a3449fd1431 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/scalar/datetime/BaseDateTimeFunction.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/scalar/datetime/BaseDateTimeFunction.java @@ -48,11 +48,6 @@ abstract class BaseDateTimeFunction extends UnaryScalarFunction { return field().foldable(); } - @Override - public Object fold() { - return makeProcessor().process(field().fold()); - } - @Override public int hashCode() { return Objects.hash(getClass(), field(), zoneId()); diff --git a/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/SearchHitCursorTests.java b/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/SearchHitCursorTests.java index 394e78591853..1a857cf4835c 100644 --- a/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/SearchHitCursorTests.java +++ b/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/SearchHitCursorTests.java @@ -7,7 +7,6 @@ package org.elasticsearch.xpack.sql.execution.search; import org.elasticsearch.TransportVersion; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.xpack.ql.execution.search.extractor.ConstantExtractorTests; @@ -60,11 +59,6 @@ public class SearchHitCursorTests extends AbstractSqlWireSerializingTestCase between(1, 20)), instance.columnCount()); } - @Override - protected NamedWriteableRegistry getNamedWriteableRegistry() { - return new NamedWriteableRegistry(Cursors.getNamedWriteables()); - } - @Override protected ListCursor createTestInstance() { return randomPagingListCursor(); diff --git a/x-pack/plugin/transform/qa/multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/transform/integration/continuous/TransformContinuousIT.java b/x-pack/plugin/transform/qa/multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/transform/integration/continuous/TransformContinuousIT.java index d9e2a4e05cbb..92114f635848 100644 --- a/x-pack/plugin/transform/qa/multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/transform/integration/continuous/TransformContinuousIT.java +++ b/x-pack/plugin/transform/qa/multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/transform/integration/continuous/TransformContinuousIT.java @@ -12,8 +12,6 @@ import org.apache.http.entity.StringEntity; import org.elasticsearch.client.Request; import org.elasticsearch.client.RequestOptions; import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.xcontent.support.XContentMapValues; import org.elasticsearch.core.CheckedRunnable; import org.elasticsearch.core.TimeValue; @@ -25,13 +23,11 @@ import org.junit.Before; import java.io.IOException; import java.lang.annotation.Annotation; -import java.nio.charset.StandardCharsets; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.time.Instant; import java.time.ZoneId; import java.util.ArrayList; -import java.util.Base64; import java.util.Collections; import java.util.HashSet; import java.util.List; @@ -543,10 +539,4 @@ public class TransformContinuousIT extends TransformRestTestCase { } } - @Override - protected Settings restClientSettings() { - final String token = "Basic " - + Base64.getEncoder().encodeToString(("x_pack_rest_user:x-pack-test-password").getBytes(StandardCharsets.UTF_8)); - return Settings.builder().put(ThreadContext.PREFIX + ".Authorization", token).build(); - } } diff --git a/x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/transforms/TransformIndexerFailureHandlingTests.java b/x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/transforms/TransformIndexerFailureHandlingTests.java index 5a18397dac07..424514b99f68 100644 --- a/x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/transforms/TransformIndexerFailureHandlingTests.java +++ b/x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/transforms/TransformIndexerFailureHandlingTests.java @@ -164,11 +164,6 @@ public class TransformIndexerFailureHandlingTests extends ESTestCase { listener.onResponse(new TransformCheckpoint(getJobId(), timestamp, 1, Collections.emptyMap(), timestamp)); } - @Override - protected String getJobId() { - return transformConfig.getId(); - } - @Override protected void doNextSearch(long waitTimeInNanos, ActionListener nextPhase) { assert latch != null; diff --git a/x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java b/x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java index 2f25a858b634..94f593f47a4d 100644 --- a/x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java +++ b/x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java @@ -46,12 +46,6 @@ public class ScheduleTriggerEngineMock extends ScheduleTriggerEngine { return new ScheduleTrigger(scheduleRegistry.parse(context, parser)); } - @Override - public ScheduleTriggerEvent parseTriggerEvent(TriggerService service, String watchId, String context, XContentParser parser) - throws IOException { - return ScheduleTriggerEvent.parse(parser, watchId, context, clock); - } - @Override public synchronized void start(Collection jobs) { logger.info("starting scheduler");