mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
Remove remaining redundant overrides (#97134)
Follow-up to #97130, removing all remaining redundant overrides outside the server package.
This commit is contained in:
parent
3726113f06
commit
1a34568a8b
96 changed files with 2 additions and 573 deletions
|
@ -751,11 +751,6 @@ public class GeoIpDownloaderIT extends AbstractGeoIpIT {
|
|||
return NON_GEO_PROCESSOR_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAsync() {
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
return procMap;
|
||||
}
|
||||
|
|
|
@ -18,11 +18,6 @@ public class RankEvalRequestBuilder extends ActionRequestBuilder<RankEvalRequest
|
|||
super(client, action, request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RankEvalRequest request() {
|
||||
return request;
|
||||
}
|
||||
|
||||
public void setRankEvalSpec(RankEvalSpec spec) {
|
||||
this.request.setRankEvalSpec(spec);
|
||||
}
|
||||
|
|
|
@ -48,9 +48,6 @@ public class HttpResponseInputStream extends FilterInputStream {
|
|||
@Override
|
||||
public void close() {}
|
||||
|
||||
@Override
|
||||
public void mark(final int readLimit) {}
|
||||
|
||||
@Override
|
||||
public boolean markSupported() {
|
||||
return true;
|
||||
|
|
|
@ -27,11 +27,6 @@ import static org.hamcrest.Matchers.equalTo;
|
|||
@ClusterScope(scope = Scope.SUITE, supportsDedicatedMasters = false, numDataNodes = 1)
|
||||
public class ResponseHeaderPluginIT extends HttpSmokeTestCase {
|
||||
|
||||
@Override
|
||||
protected boolean addMockHttpTransport() {
|
||||
return false; // enable http
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
||||
return CollectionUtils.appendToCopy(super.nodePlugins(), TestResponseHeaderPlugin.class);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -128,9 +128,6 @@ public class UpdateSettingsIT extends ESIntegTestCase {
|
|||
Setting.Property.Final
|
||||
);
|
||||
|
||||
@Override
|
||||
public void onIndexModule(IndexModule indexModule) {}
|
||||
|
||||
@Override
|
||||
public List<Setting<?>> getSettings() {
|
||||
return Collections.singletonList(FINAL_SETTING);
|
||||
|
|
|
@ -102,14 +102,6 @@ public class DoubleTermsIT extends AbstractTermsTestCase {
|
|||
return scripts;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, Function<Map<String, Object>, Object>> nonDeterministicPluginScripts() {
|
||||
Map<String, Function<Map<String, Object>, Object>> scripts = new HashMap<>();
|
||||
|
||||
scripts.put("Math.random()", vars -> DoubleTermsIT.randomDouble());
|
||||
|
||||
return scripts;
|
||||
}
|
||||
}
|
||||
|
||||
private static final int NUM_DOCS = 5; // TODO: randomize the size?
|
||||
|
|
|
@ -90,14 +90,6 @@ public class LongTermsIT extends AbstractTermsTestCase {
|
|||
return scripts;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, Function<Map<String, Object>, Object>> nonDeterministicPluginScripts() {
|
||||
Map<String, Function<Map<String, Object>, Object>> scripts = new HashMap<>();
|
||||
|
||||
scripts.put("Math.random()", vars -> LongTermsIT.randomDouble());
|
||||
|
||||
return scripts;
|
||||
}
|
||||
}
|
||||
|
||||
private static final int NUM_DOCS = 5; // TODO randomize the size?
|
||||
|
|
|
@ -82,14 +82,6 @@ public class RangeIT extends ESIntegTestCase {
|
|||
return scripts;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, Function<Map<String, Object>, Object>> nonDeterministicPluginScripts() {
|
||||
Map<String, Function<Map<String, Object>, Object>> scripts = new HashMap<>();
|
||||
|
||||
scripts.put("Math.random()", vars -> RangeIT.randomDouble());
|
||||
|
||||
return scripts;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -115,14 +115,6 @@ public class StringTermsIT extends AbstractTermsTestCase {
|
|||
return scripts;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, Function<Map<String, Object>, Object>> nonDeterministicPluginScripts() {
|
||||
Map<String, Function<Map<String, Object>, Object>> scripts = new HashMap<>();
|
||||
|
||||
scripts.put("Math.random()", vars -> StringTermsIT.randomDouble());
|
||||
|
||||
return scripts;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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<SeekStatsRequest> {
|
|||
return indices;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -484,10 +484,6 @@ public class MockScriptEngine implements ScriptEngine {
|
|||
return (boolean) script.apply(ctx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDocument(int doc) {
|
||||
docReader.setDocument(doc);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<GeoSh
|
|||
}
|
||||
}
|
||||
|
||||
/** Override this method if there is need to modify the test data for specific tests */
|
||||
protected byte[] convertTestData(ByteArrayOutputStream out) {
|
||||
return out.toByteArray();
|
||||
}
|
||||
|
||||
private double distance(double lat1, double lon1, double lat2, double lon2) {
|
||||
return SloppyMath.haversinMeters(lat1, lon1, lat2, lon2);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
package org.elasticsearch.xpack.analytics.multiterms;
|
||||
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.search.DocValueFormat;
|
||||
|
@ -627,8 +626,4 @@ public class InternalMultiTerms extends AbstractInternalTerms<InternalMultiTerms
|
|||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Strings.toString(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -531,12 +531,6 @@ public class ReactiveStorageIT extends AutoscalingStorageIntegTestCase {
|
|||
refreshClusterInfo();
|
||||
}
|
||||
|
||||
public GetAutoscalingCapacityAction.Response capacity() {
|
||||
GetAutoscalingCapacityAction.Request request = new GetAutoscalingCapacityAction.Request();
|
||||
GetAutoscalingCapacityAction.Response response = client().execute(GetAutoscalingCapacityAction.INSTANCE, request).actionGet();
|
||||
return response;
|
||||
}
|
||||
|
||||
private void putAutoscalingPolicy(String policyName, String role) {
|
||||
final PutAutoscalingPolicyAction.Request request = new PutAutoscalingPolicyAction.Request(
|
||||
policyName,
|
||||
|
|
|
@ -24,11 +24,6 @@ import static org.hamcrest.Matchers.nullValue;
|
|||
|
||||
public class PutAutoFollowPatternRequestTests extends AbstractXContentSerializingTestCase<PutAutoFollowPatternAction.Request> {
|
||||
|
||||
@Override
|
||||
protected boolean supportsUnknownFields() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PutAutoFollowPatternAction.Request doParseInstance(XContentParser parser) throws IOException {
|
||||
return PutAutoFollowPatternAction.Request.fromXContent(parser, null);
|
||||
|
|
|
@ -98,8 +98,4 @@ public class PutFollowActionRequestTests extends AbstractXContentSerializingTest
|
|||
return request;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsUnknownFields() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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<BroadcastResponse> {
|
|||
out.writeString(followerIndexUUID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean includeDataStreams() {
|
||||
return false;
|
||||
|
|
|
@ -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<DownsampleIndexerAction.
|
|||
out.writeStringArray(labelFields);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||
builder.startObject();
|
||||
|
|
|
@ -12,7 +12,6 @@ import org.elasticsearch.action.ActionType;
|
|||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.StatusToXContentObject;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
import org.elasticsearch.xcontent.ObjectParser;
|
||||
import org.elasticsearch.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.xcontent.XContentBuilder;
|
||||
|
@ -149,11 +148,6 @@ public class GetCalendarsAction extends ActionType<GetCalendarsAction.Response>
|
|||
super(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestStatus status() {
|
||||
return RestStatus.OK;
|
||||
}
|
||||
|
||||
public QueryPage<Calendar> getCalendars() {
|
||||
return getResources();
|
||||
}
|
||||
|
|
|
@ -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<GetFiltersAction.Response> {
|
|||
return getResources();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestStatus status() {
|
||||
return RestStatus.OK;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Reader<MlFilter> getReader() {
|
||||
return MlFilter::new;
|
||||
|
|
|
@ -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<TrainedModelCacheInf
|
|||
super.writeTo(out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Arrays.hashCode(concreteNodes());
|
||||
|
|
|
@ -128,11 +128,6 @@ public class TermsEnumRequest extends BroadcastRequest<TermsEnumRequest> impleme
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean includeDataStreams() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field to look inside for values
|
||||
*/
|
||||
|
|
|
@ -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<WatcherStatsRequest> {
|
|||
this.includeStats = includeStats;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
|
|
|
@ -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<Class<? extends Plugin>> nodePlugins() {
|
||||
return Arrays.asList(LocalStateCompositeXPackPlugin.class, CommonAnalysisPlugin.class);
|
||||
}
|
||||
|
||||
public void testClusterRestartWithLicense() throws Exception {
|
||||
wipeAllLicenses();
|
||||
|
||||
|
|
|
@ -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<SetResetModeActionRequest> instanceReader() {
|
||||
return SetResetModeActionRequest::new;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<String>) null));
|
||||
assertEquals("failed_indexes cannot be null", exception.getMessage());
|
||||
|
|
|
@ -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<Request> instanceReader() {
|
||||
return Request::new;
|
||||
|
|
|
@ -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<Request> instanceReader() {
|
||||
return Request::new;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -40,8 +40,4 @@ public class GetCalendarsActionRequestTests extends AbstractXContentSerializingT
|
|||
return GetCalendarsAction.Request.parseRequest(null, parser);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsUnknownFields() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -60,8 +60,4 @@ public class GetInfluencersActionRequestTests extends AbstractXContentSerializin
|
|||
return Request::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsUnknownFields() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,8 +52,4 @@ public class GetModelSnapshotsActionRequestTests extends AbstractXContentSeriali
|
|||
return Request::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsUnknownFields() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -60,8 +60,4 @@ public class GetRecordsActionRequestTests extends AbstractXContentSerializingTes
|
|||
return Request::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsUnknownFields() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<Request> instanceReader() {
|
||||
return Request::new;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<Request> instanceReader() {
|
||||
return Request::new;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -40,8 +40,4 @@ public class UpdateModelSnapshotActionRequestTests extends AbstractXContentSeria
|
|||
return Request::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsUnknownFields() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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> {
|
|||
: Multi.fromXContentStrict(parser, PreProcessor.PreProcessorParseContext.DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Predicate<String> getRandomFieldsExcludeFilter() {
|
||||
return field -> field.isEmpty() == false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Multi createTestInstance() {
|
||||
return createRandom();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -49,8 +49,4 @@ public class RollupIndexerJobStatsTests extends AbstractXContentSerializingTestC
|
|||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsUnknownFields() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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<Entry> getNamedWriteables() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NamedXContentRegistry.Entry> getNamedXContent() {
|
||||
return NAMED_X_CONTENT_ENTRIES;
|
||||
|
|
|
@ -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<NamedXContentRegistry.Entry> 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";
|
||||
|
|
|
@ -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<NamedXContentRegistry.Entry> 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";
|
||||
|
|
|
@ -65,19 +65,6 @@ public class NativeAnalyticsProcess extends AbstractNativeAnalyticsProcess<Analy
|
|||
return NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persistState() {
|
||||
// Nothing to persist
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persistState(long snapshotTimestamp, String snapshotId, String snapshotDescription) {}
|
||||
|
||||
@Override
|
||||
public void writeEndOfDataMessage() throws IOException {
|
||||
new AnalyticsControlMessageWriter(recordWriter(), numberOfFields()).writeEndOfData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnalyticsProcessConfig getConfig() {
|
||||
return config;
|
||||
|
|
|
@ -168,8 +168,6 @@ public class MonitoringServiceTests extends ESTestCase {
|
|||
@Override
|
||||
protected void doStop() {}
|
||||
|
||||
@Override
|
||||
protected void doClose() {}
|
||||
}
|
||||
|
||||
class BlockingExporter extends CountingExporter {
|
||||
|
@ -193,13 +191,5 @@ public class MonitoringServiceTests extends ESTestCase {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStart() {}
|
||||
|
||||
@Override
|
||||
protected void doStop() {}
|
||||
|
||||
@Override
|
||||
protected void doClose() {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,11 +71,6 @@ public class Literal extends LeafExpression {
|
|||
return Objects.hash(dataType, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Expression canonicalize() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
|
|
|
@ -83,11 +83,6 @@ public class Order extends Expression {
|
|||
return nulls;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean foldable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(child, direction, nulls);
|
||||
|
|
|
@ -94,11 +94,6 @@ public class RRFRankCoordinatorCanMatchIT extends ESIntegTestCase {
|
|||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int minimumNumberOfReplicas() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int maximumNumberOfReplicas() {
|
||||
return 0;
|
||||
|
|
|
@ -48,11 +48,6 @@ public class RRFRankMultiShardIT extends ESIntegTestCase {
|
|||
return 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int minimumNumberOfReplicas() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int maximumNumberOfReplicas() {
|
||||
return 0;
|
||||
|
|
|
@ -106,11 +106,6 @@ public class RRFRankShardCanMatchIT extends ESIntegTestCase {
|
|||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int minimumNumberOfReplicas() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int maximumNumberOfReplicas() {
|
||||
return 0;
|
||||
|
|
|
@ -12,9 +12,7 @@ import org.elasticsearch.action.ActionResponse;
|
|||
import org.elasticsearch.client.internal.Client;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
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.scheduler.SchedulerEngine;
|
||||
import org.elasticsearch.common.settings.ClusterSettings;
|
||||
import org.elasticsearch.common.settings.IndexScopedSettings;
|
||||
|
@ -22,22 +20,15 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.common.settings.SettingsFilter;
|
||||
import org.elasticsearch.common.settings.SettingsModule;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.persistent.PersistentTasksExecutor;
|
||||
import org.elasticsearch.plugins.ActionPlugin;
|
||||
import org.elasticsearch.plugins.PersistentTaskPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.repositories.RepositoriesService;
|
||||
import org.elasticsearch.rest.RestController;
|
||||
import org.elasticsearch.rest.RestHandler;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.threadpool.ExecutorBuilder;
|
||||
import org.elasticsearch.threadpool.FixedExecutorBuilder;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.tracing.Tracer;
|
||||
import org.elasticsearch.watcher.ResourceWatcherService;
|
||||
import org.elasticsearch.xcontent.NamedXContentRegistry;
|
||||
import org.elasticsearch.xpack.core.action.XPackInfoFeatureAction;
|
||||
import org.elasticsearch.xpack.core.action.XPackUsageFeatureAction;
|
||||
import org.elasticsearch.xpack.core.downsample.DownsampleAction;
|
||||
|
@ -74,13 +65,10 @@ import org.elasticsearch.xpack.rollup.rest.RestStopRollupJobAction;
|
|||
|
||||
import java.time.Clock;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
|
||||
public class Rollup extends Plugin implements ActionPlugin, PersistentTaskPlugin {
|
||||
|
||||
// Introduced in ES version 6.3
|
||||
|
@ -103,25 +91,6 @@ public class Rollup extends Plugin implements ActionPlugin, PersistentTaskPlugin
|
|||
this.settings = settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Object> createComponents(
|
||||
Client client,
|
||||
ClusterService clusterService,
|
||||
ThreadPool threadPool,
|
||||
ResourceWatcherService resourceWatcherService,
|
||||
ScriptService scriptService,
|
||||
NamedXContentRegistry xContentRegistry,
|
||||
Environment environment,
|
||||
NodeEnvironment nodeEnvironment,
|
||||
NamedWriteableRegistry namedWriteableRegistry,
|
||||
IndexNameExpressionResolver expressionResolver,
|
||||
Supplier<RepositoriesService> repositoriesServiceSupplier,
|
||||
Tracer tracer,
|
||||
AllocationService allocationService
|
||||
) {
|
||||
return emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RestHandler> getRestHandlers(
|
||||
Settings unused,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -133,8 +133,4 @@ public class FileSettingsRoleMappingsStartupIT extends SecurityIntegTestCase {
|
|||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean addMockTransportService() {
|
||||
return false; // security has its own transport service
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,11 +51,6 @@ public class ReservedRealmIntegTests extends NativeRealmIntegTestCase {
|
|||
return settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean addMockHttpTransport() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void testAuthenticate() {
|
||||
final List<String> usernames = Arrays.asList(
|
||||
ElasticUser.NAME,
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -758,12 +758,7 @@ public class BlobAnalyzeAction extends ActionType<BlobAnalyzeAction.Response> {
|
|||
|
||||
@Override
|
||||
public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String, String> 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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<Expression> newChildren) {
|
||||
return new MedianAbsoluteDeviation(source(), newChildren.get(0));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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<Sea
|
|||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NamedWriteableRegistry getNamedWriteableRegistry() {
|
||||
return new NamedWriteableRegistry(Cursors.getNamedWriteables());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SearchHitCursor createTestInstance() {
|
||||
return randomSearchHitCursor();
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
package org.elasticsearch.xpack.sql.session;
|
||||
|
||||
import org.elasticsearch.TransportVersion;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.xpack.sql.AbstractSqlWireSerializingTestCase;
|
||||
import org.elasticsearch.xpack.sql.plugin.CursorTests;
|
||||
|
@ -35,11 +34,6 @@ public class ListCursorTests extends AbstractSqlWireSerializingTestCase<ListCurs
|
|||
return new ListCursor(instance.data(), randomValueOtherThan(instance.pageSize(), () -> between(1, 20)), instance.columnCount());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NamedWriteableRegistry getNamedWriteableRegistry() {
|
||||
return new NamedWriteableRegistry(Cursors.getNamedWriteables());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ListCursor createTestInstance() {
|
||||
return randomPagingListCursor();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<SearchResponse> nextPhase) {
|
||||
assert latch != null;
|
||||
|
|
|
@ -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<Watch> jobs) {
|
||||
logger.info("starting scheduler");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue