From a4503c2aed8f319ce85e07b7fa9848e523713ebc Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Wed, 15 Jun 2016 15:13:25 -0700 Subject: [PATCH 1/2] Plugins: Remove name() and description() from api In 2.0 we added plugin descriptors which require defining a name and description for the plugin. However, we still have name() and description() which must be overriden from the Plugin class. This still exists for classpath plugins. But classpath plugins are mainly for tests, and even then, referring to classpath plugins with their class is a better idea. This change removes name() and description(), replacing the name for classpath plugins with the full class name. --- .../org/elasticsearch/plugins/Plugin.java | 10 ---- .../elasticsearch/plugins/PluginsService.java | 10 ++-- .../cluster/node/tasks/TestTaskPlugin.java | 11 ---- .../TransportClientHeadersTests.java | 8 --- .../cluster/ClusterInfoServiceIT.java | 10 ---- .../cluster/service/ClusterServiceIT.java | 10 ---- .../cluster/settings/SettingsFilteringIT.java | 16 ------ .../index/SettingsListenerIT.java | 15 ----- .../index/WaitUntilRefreshIT.java | 10 ---- .../externalvalues/ExternalMapperPlugin.java | 10 ---- .../FunctionScoreQueryBuilderTests.java | 11 ---- .../query/plugin/DummyQueryParserPlugin.java | 12 +--- .../indices/IndicesOptionsIntegrationIT.java | 9 --- .../indices/analysis/DummyAnalysisPlugin.java | 16 ------ .../RandomExceptionCircuitBreakerIT.java | 9 --- .../template/IndexTemplateFilteringIT.java | 10 ---- .../elasticsearch/ingest/IngestCloseIT.java | 11 ---- .../nodesinfo/plugin/dummy1/TestPlugin.java | 40 ------------- .../plugins/PluginsServiceTests.java | 29 +--------- .../TestResponseHeaderPlugin.java | 10 ---- .../elasticsearch/script/ScriptFieldIT.java | 10 ---- .../search/SearchServiceTests.java | 10 ---- .../elasticsearch/search/SearchTimeoutIT.java | 9 --- .../aggregations/bucket/DateScriptMocks.java | 10 ---- .../search/aggregations/bucket/IpRangeIT.java | 10 ---- .../SignificantTermsSignificanceScoreIT.java | 9 --- .../search/aggregations/metrics/AvgIT.java | 22 -------- .../search/aggregations/metrics/SumIT.java | 22 -------- .../aggregations/metrics/ValueCountIT.java | 11 ---- .../basic/SearchWithRandomExceptionsIT.java | 8 --- .../search/fetch/FetchSubPhasePluginIT.java | 11 ---- .../ExplainableScriptPlugin.java | 12 ---- .../functionscore/FunctionScorePluginIT.java | 11 ---- .../highlight/CustomHighlighterPlugin.java | 10 ---- .../search/suggest/CustomSuggesterPlugin.java | 13 ----- .../snapshots/mockstore/MockRepository.java | 10 ---- .../ContextAndHeaderTransportIT.java | 10 ---- .../transport/netty/NettyTransportIT.java | 8 --- .../update/UpdateByNativeScriptIT.java | 8 --- .../org/elasticsearch/update/UpdateIT.java | 56 ------------------- .../node2/dummy/_site/es-plugin.properties | 21 ------- .../nodesinfo/node2/dummy/_site/index.html | 9 --- .../nodesinfo/node4/dummy/_site/index.html | 9 --- .../test-no-version-plugin/_site/index.html | 9 --- .../matrix/MatrixAggregationPlugin.java | 13 ----- .../ingest/IngestCommonPlugin.java | 10 ---- .../script/expression/ExpressionPlugin.java | 10 ---- .../script/groovy/GroovyPlugin.java | 10 ---- .../messy/tests/IndicesRequestTests.java | 9 +-- .../script/mustache/MustachePlugin.java | 10 ---- .../painless/PainlessPlugin.java | 10 ---- .../percolator/PercolatorPlugin.java | 10 ---- .../index/reindex/ReindexPlugin.java | 10 ---- .../index/reindex/CancelTests.java | 10 ---- .../analysis/icu/AnalysisICUPlugin.java | 13 ----- .../kuromoji/AnalysisKuromojiPlugin.java | 11 ---- .../analysis/AnalysisPhoneticPlugin.java | 12 ---- .../smartcn/AnalysisSmartChinesePlugin.java | 13 ----- .../stempel/AnalysisStempelPlugin.java | 13 ----- .../discovery/azure/AzureDiscoveryPlugin.java | 10 ---- .../azure/AzureComputeServiceSimpleMock.java | 8 --- .../AzureComputeServiceTwoNodesMock.java | 8 --- .../AzureDiscoveryClusterFormationTests.java | 11 ---- .../discovery/ec2/Ec2DiscoveryPlugin.java | 17 ------ .../cloud/aws/AWSSignersTests.java | 3 +- .../Ec2DiscoveryClusterFormationTests.java | 15 +---- .../discovery/gce/GceDiscoveryPlugin.java | 17 ------ .../discovery/gce/GceDiscoverTests.java | 10 ---- .../attachment/IngestAttachmentPlugin.java | 10 ---- .../ingest/geoip/IngestGeoIpPlugin.java | 10 ---- .../plugin/example/JvmExamplePlugin.java | 10 ---- .../plugin/javascript/JavaScriptPlugin.java | 10 ---- .../plugin/python/PythonPlugin.java | 13 ----- .../attachments/MapperAttachmentsPlugin.java | 10 ---- .../plugin/mapper/MapperMurmur3Plugin.java | 10 ---- .../plugin/mapper/MapperSizePlugin.java | 10 ---- .../azure/AzureRepositoryPlugin.java | 10 ---- ...ctAzureRepositoryServiceIntegTestCase.java | 8 --- .../gcs/GoogleCloudStoragePlugin.java | 10 ---- .../repositories/hdfs/HdfsPlugin.java | 14 +---- .../repository/s3/S3RepositoryPlugin.java | 10 ---- .../cloud/aws/TestAwsS3Service.java | 8 --- .../plugin/store/smb/SMBStorePlugin.java | 10 ---- .../MockInternalClusterInfoService.java | 8 --- .../index/MockEngineFactoryPlugin.java | 8 --- .../ingest/IngestTestPlugin.java | 10 ---- .../elasticsearch/node/NodeMocksPlugin.java | 10 ---- .../script/MockScriptEngine.java | 20 +------ .../search/MockSearchService.java | 8 --- .../elasticsearch/test/ESIntegTestCase.java | 8 --- .../test/InternalSettingsPlugin.java | 9 --- .../test/MockIndexEventListener.java | 8 --- .../test/store/MockFSIndexStore.java | 8 --- .../transport/AssertingLocalTransport.java | 8 --- .../test/transport/MockTransportService.java | 8 --- 95 files changed, 16 insertions(+), 1098 deletions(-) delete mode 100644 core/src/test/java/org/elasticsearch/nodesinfo/plugin/dummy1/TestPlugin.java delete mode 100644 core/src/test/resources/org/elasticsearch/nodesinfo/node2/dummy/_site/es-plugin.properties delete mode 100644 core/src/test/resources/org/elasticsearch/nodesinfo/node2/dummy/_site/index.html delete mode 100644 core/src/test/resources/org/elasticsearch/nodesinfo/node4/dummy/_site/index.html delete mode 100644 core/src/test/resources/org/elasticsearch/nodesinfo/node4/test-no-version-plugin/_site/index.html diff --git a/core/src/main/java/org/elasticsearch/plugins/Plugin.java b/core/src/main/java/org/elasticsearch/plugins/Plugin.java index 0283567bf80..fac4af57c97 100644 --- a/core/src/main/java/org/elasticsearch/plugins/Plugin.java +++ b/core/src/main/java/org/elasticsearch/plugins/Plugin.java @@ -38,16 +38,6 @@ import java.util.List; */ public abstract class Plugin { - /** - * The name of the plugin. - */ - public abstract String name(); - - /** - * The description of the plugin. - */ - public abstract String description(); - /** * Node level modules. */ diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java index 4f123625387..28a7da7c923 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java @@ -104,7 +104,7 @@ public class PluginsService extends AbstractComponent { // first we load plugins that are on the classpath. this is for tests and transport clients for (Class pluginClass : classpathPlugins) { Plugin plugin = loadPlugin(pluginClass, settings); - PluginInfo pluginInfo = new PluginInfo(plugin.name(), plugin.description(), "NA", pluginClass.getName()); + PluginInfo pluginInfo = new PluginInfo(pluginClass.getName(), "classpath plugin", "NA", pluginClass.getName()); if (logger.isTraceEnabled()) { logger.trace("plugin loaded from classpath [{}]", pluginInfo); } @@ -188,12 +188,12 @@ public class PluginsService extends AbstractComponent { continue; } if (method.getParameterTypes().length == 0 || method.getParameterTypes().length > 1) { - logger.warn("Plugin: {} implementing onModule with no parameters or more than one parameter", plugin.name()); + logger.warn("Plugin: {} implementing onModule with no parameters or more than one parameter", pluginEntry.v1().getName()); continue; } Class moduleClass = method.getParameterTypes()[0]; if (!Module.class.isAssignableFrom(moduleClass)) { - logger.warn("Plugin: {} implementing onModule by the type is not of Module type {}", plugin.name(), moduleClass); + logger.warn("Plugin: {} implementing onModule by the type is not of Module type {}", pluginEntry.v1().getName(), moduleClass); continue; } list.add(new OnModuleReference(moduleClass, method)); @@ -225,10 +225,10 @@ public class PluginsService extends AbstractComponent { try { reference.onModuleMethod.invoke(plugin.v2(), module); } catch (IllegalAccessException | InvocationTargetException e) { - logger.warn("plugin {}, failed to invoke custom onModule method", e, plugin.v2().name()); + logger.warn("plugin {}, failed to invoke custom onModule method", e, plugin.v1().getName()); throw new ElasticsearchException("failed to invoke onModule", e); } catch (Exception e) { - logger.warn("plugin {}, failed to invoke custom onModule method", e, plugin.v2().name()); + logger.warn("plugin {}, failed to invoke custom onModule method", e, plugin.v1().getName()); throw e; } } diff --git a/core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java index 9874bdd44b1..11b83d67a8c 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java +++ b/core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java @@ -67,17 +67,6 @@ import static org.elasticsearch.test.ESTestCase.awaitBusy; */ public class TestTaskPlugin extends Plugin { - - @Override - public String name() { - return "test-task-plugin"; - } - - @Override - public String description() { - return "Test plugin for testing task management"; - } - public void onModule(ActionModule module) { module.registerAction(TestTaskAction.INSTANCE, TransportTestTaskAction.class); module.registerAction(UnblockTestTasksAction.INSTANCE, TransportUnblockTestTasksAction.class); diff --git a/core/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java b/core/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java index ec0a9e5cc08..e26ebfefcc9 100644 --- a/core/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java +++ b/core/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java @@ -103,14 +103,6 @@ public class TransportClientHeadersTests extends AbstractClientHeadersTestCase { public static class InternalTransportService extends TransportService { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-transport-service"; - } - @Override - public String description() { - return "a mock transport service"; - } public void onModule(NetworkModule transportModule) { transportModule.registerTransportService("internal", InternalTransportService.class); } diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java b/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java index 8b50d125a40..27b9192006d 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java @@ -76,16 +76,6 @@ public class ClusterInfoServiceIT extends ESIntegTestCase { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "ClusterInfoServiceIT"; - } - - @Override - public String description() { - return "ClusterInfoServiceIT"; - } - public void onModule(ActionModule module) { module.registerFilter(BlockingActionFilter.class); } diff --git a/core/src/test/java/org/elasticsearch/cluster/service/ClusterServiceIT.java b/core/src/test/java/org/elasticsearch/cluster/service/ClusterServiceIT.java index 9db548e2f3f..991f11a4493 100644 --- a/core/src/test/java/org/elasticsearch/cluster/service/ClusterServiceIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/service/ClusterServiceIT.java @@ -582,16 +582,6 @@ public class ClusterServiceIT extends ESIntegTestCase { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "test plugin"; - } - - @Override - public String description() { - return "test plugin"; - } - @Override public Collection> nodeServices() { List> services = new ArrayList<>(1); diff --git a/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java b/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java index 194b82620de..b2e89417511 100644 --- a/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java @@ -51,22 +51,6 @@ public class SettingsFilteringIT extends ESIntegTestCase { public static final Setting SOME_OTHER_NODE_SETTING = Setting.boolSetting("some.other.node.setting", false, Property.NodeScope); - /** - * The name of the plugin. - */ - @Override - public String name() { - return "settings-filtering"; - } - - /** - * The description of the plugin. - */ - @Override - public String description() { - return "Settings Filtering Plugin"; - } - @Override public Settings additionalSettings() { return Settings.builder().put("some.node.setting", true).put("some.other.node.setting", true).build(); diff --git a/core/src/test/java/org/elasticsearch/index/SettingsListenerIT.java b/core/src/test/java/org/elasticsearch/index/SettingsListenerIT.java index 07afef1d8ae..705fe32a415 100644 --- a/core/src/test/java/org/elasticsearch/index/SettingsListenerIT.java +++ b/core/src/test/java/org/elasticsearch/index/SettingsListenerIT.java @@ -46,21 +46,6 @@ public class SettingsListenerIT extends ESIntegTestCase { private final SettingsTestingService service = new SettingsTestingService(); private static final Setting SETTING = Setting.intSetting("index.test.new.setting", 0, Property.Dynamic, Property.IndexScope); - /** - * The name of the plugin. - */ - @Override - public String name() { - return "settings-listener"; - } - - /** - * The description of the plugin. - */ - @Override - public String description() { - return "Settings Listenern Plugin"; - } public void onModule(SettingsModule settingsModule) { settingsModule.registerSetting(SettingsTestingService.VALUE); diff --git a/core/src/test/java/org/elasticsearch/index/WaitUntilRefreshIT.java b/core/src/test/java/org/elasticsearch/index/WaitUntilRefreshIT.java index b2cb2d96818..3e71b394a88 100644 --- a/core/src/test/java/org/elasticsearch/index/WaitUntilRefreshIT.java +++ b/core/src/test/java/org/elasticsearch/index/WaitUntilRefreshIT.java @@ -172,16 +172,6 @@ public class WaitUntilRefreshIT extends ESIntegTestCase { } public static class DeletePlzPlugin extends Plugin { - @Override - public String name() { - return "delete_please"; - } - - @Override - public String description() { - return "adds a script that converts any update into a delete for testing"; - } - public void onModule(ScriptModule scriptModule) { scriptModule.registerScript("delete_plz", DeletePlzFactory.class); } diff --git a/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalMapperPlugin.java b/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalMapperPlugin.java index 87daaa58769..115faf2c6a1 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalMapperPlugin.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalMapperPlugin.java @@ -28,16 +28,6 @@ public class ExternalMapperPlugin extends Plugin { public static final String EXTERNAL_BIS = "external_bis"; public static final String EXTERNAL_UPPER = "external_upper"; - @Override - public String name() { - return "external-mappers"; - } - - @Override - public String description() { - return "External Mappers Plugin"; - } - public void onModule(IndicesModule indicesModule) { indicesModule.registerMetadataMapper(ExternalMetadataMapper.CONTENT_TYPE, new ExternalMetadataMapper.TypeParser()); indicesModule.registerMapper(EXTERNAL, new ExternalMapper.TypeParser(EXTERNAL, "foo")); diff --git a/core/src/test/java/org/elasticsearch/index/query/functionscore/FunctionScoreQueryBuilderTests.java b/core/src/test/java/org/elasticsearch/index/query/functionscore/FunctionScoreQueryBuilderTests.java index 2597675095a..e0bf9be2c92 100644 --- a/core/src/test/java/org/elasticsearch/index/query/functionscore/FunctionScoreQueryBuilderTests.java +++ b/core/src/test/java/org/elasticsearch/index/query/functionscore/FunctionScoreQueryBuilderTests.java @@ -761,17 +761,6 @@ public class FunctionScoreQueryBuilderTests extends AbstractQueryTestCase INDEX_A = new Setting<>("index.a", "", Function.identity(), Property.Dynamic, Property.IndexScope); diff --git a/core/src/test/java/org/elasticsearch/indices/analysis/DummyAnalysisPlugin.java b/core/src/test/java/org/elasticsearch/indices/analysis/DummyAnalysisPlugin.java index 8e15a6f02f4..86c54f2ece9 100644 --- a/core/src/test/java/org/elasticsearch/indices/analysis/DummyAnalysisPlugin.java +++ b/core/src/test/java/org/elasticsearch/indices/analysis/DummyAnalysisPlugin.java @@ -22,22 +22,6 @@ package org.elasticsearch.indices.analysis; import org.elasticsearch.plugins.Plugin; public class DummyAnalysisPlugin extends Plugin { - /** - * The name of the plugin. - */ - @Override - public String name() { - return "analysis-dummy"; - } - - /** - * The description of the plugin. - */ - @Override - public String description() { - return "Analysis Dummy Plugin"; - } - public void onModule(AnalysisModule module) { module.registerAnalyzer("dummy", (a, b, c, d) -> new DummyAnalyzerProvider()); diff --git a/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java b/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java index 19242b1f90b..ca76fffedd4 100644 --- a/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java +++ b/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java @@ -200,15 +200,6 @@ public class RandomExceptionCircuitBreakerIT extends ESIntegTestCase { public static final Setting EXCEPTION_LOW_LEVEL_RATIO_SETTING = Setting.doubleSetting(EXCEPTION_LOW_LEVEL_RATIO_KEY, 0.1d, 0.0d, Property.IndexScope); public static class TestPlugin extends Plugin { - @Override - public String name() { - return "random-exception-reader-wrapper"; - } - @Override - public String description() { - return "a mock reader wrapper that throws random exceptions for testing"; - } - public void onModule(SettingsModule module) { module.registerSetting(EXCEPTION_TOP_LEVEL_RATIO_SETTING); module.registerSetting(EXCEPTION_LOW_LEVEL_RATIO_SETTING); diff --git a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.java b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.java index 47742969501..300c7769fcd 100644 --- a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.java +++ b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.java @@ -75,16 +75,6 @@ public class IndexTemplateFilteringIT extends ESIntegTestCase { } public static class TestPlugin extends Plugin { - @Override - public String name() { - return "test-plugin"; - } - - @Override - public String description() { - return ""; - } - public void onModule(ClusterModule module) { module.registerIndexTemplateFilter(TestFilter.class); } diff --git a/core/src/test/java/org/elasticsearch/ingest/IngestCloseIT.java b/core/src/test/java/org/elasticsearch/ingest/IngestCloseIT.java index 5e0706388ce..007338cf918 100644 --- a/core/src/test/java/org/elasticsearch/ingest/IngestCloseIT.java +++ b/core/src/test/java/org/elasticsearch/ingest/IngestCloseIT.java @@ -53,17 +53,6 @@ public class IngestCloseIT extends ESSingleNodeTestCase { } public static class IngestPlugin extends Plugin { - - @Override - public String name() { - return "ingest"; - } - - @Override - public String description() { - return "ingest mock"; - } - public void onModule(NodeModule nodeModule) { nodeModule.registerProcessor("test", (registry) -> new Factory()); } diff --git a/core/src/test/java/org/elasticsearch/nodesinfo/plugin/dummy1/TestPlugin.java b/core/src/test/java/org/elasticsearch/nodesinfo/plugin/dummy1/TestPlugin.java deleted file mode 100644 index 8455a3bf562..00000000000 --- a/core/src/test/java/org/elasticsearch/nodesinfo/plugin/dummy1/TestPlugin.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.nodesinfo.plugin.dummy1; - -import org.elasticsearch.plugins.Plugin; - -public class TestPlugin extends Plugin { - - static final public class Fields { - static public final String NAME = "test-plugin"; - static public final String DESCRIPTION = NAME + " description"; - } - - @Override - public String name() { - return Fields.NAME; - } - - @Override - public String description() { - return Fields.DESCRIPTION; - } -} diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginsServiceTests.java b/core/src/test/java/org/elasticsearch/plugins/PluginsServiceTests.java index d3c1f1b8bad..659e11fe06a 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluginsServiceTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluginsServiceTests.java @@ -32,28 +32,12 @@ import java.util.Arrays; public class PluginsServiceTests extends ESTestCase { public static class AdditionalSettingsPlugin1 extends Plugin { - @Override - public String name() { - return "additional-settings1"; - } - @Override - public String description() { - return "adds additional setting 'foo.bar'"; - } @Override public Settings additionalSettings() { return Settings.builder().put("foo.bar", "1").put(IndexModule.INDEX_STORE_TYPE_SETTING.getKey(), IndexModule.Type.MMAPFS.getSettingsKey()).build(); } } public static class AdditionalSettingsPlugin2 extends Plugin { - @Override - public String name() { - return "additional-settings2"; - } - @Override - public String description() { - return "adds additional setting 'foo.bar'"; - } @Override public Settings additionalSettings() { return Settings.builder().put("foo.bar", "2").build(); @@ -61,15 +45,6 @@ public class PluginsServiceTests extends ESTestCase { } public static class FailOnModule extends Plugin { - @Override - public String name() { - return "fail-on-module"; - } - @Override - public String description() { - return "fails in onModule"; - } - public void onModule(BrokenModule brokenModule) { throw new IllegalStateException("boom"); } @@ -108,8 +83,8 @@ public class PluginsServiceTests extends ESTestCase { } catch (IllegalArgumentException e) { String msg = e.getMessage(); assertTrue(msg, msg.contains("Cannot have additional setting [foo.bar]")); - assertTrue(msg, msg.contains("plugin [additional-settings1]")); - assertTrue(msg, msg.contains("plugin [additional-settings2]")); + assertTrue(msg, msg.contains("plugin [" + AdditionalSettingsPlugin1.class.getName())); + assertTrue(msg, msg.contains("plugin [" + AdditionalSettingsPlugin2.class.getName())); } } diff --git a/core/src/test/java/org/elasticsearch/plugins/responseheader/TestResponseHeaderPlugin.java b/core/src/test/java/org/elasticsearch/plugins/responseheader/TestResponseHeaderPlugin.java index a16f318140f..701d1154587 100644 --- a/core/src/test/java/org/elasticsearch/plugins/responseheader/TestResponseHeaderPlugin.java +++ b/core/src/test/java/org/elasticsearch/plugins/responseheader/TestResponseHeaderPlugin.java @@ -24,16 +24,6 @@ import org.elasticsearch.plugins.Plugin; public class TestResponseHeaderPlugin extends Plugin { - @Override - public String name() { - return "test-plugin-custom-header"; - } - - @Override - public String description() { - return "test-plugin-custom-header-desc"; - } - public void onModule(NetworkModule module) { module.registerRestHandler(TestResponseHeaderRestAction.class); } diff --git a/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java b/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java index 8f20d641169..3eba68c489a 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java +++ b/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java @@ -153,16 +153,6 @@ public class ScriptFieldIT extends ESIntegTestCase { public static class CustomScriptPlugin extends Plugin { - @Override - public String name() { - return "custom_script"; - } - - @Override - public String description() { - return "script "; - } - public void onModule(ScriptModule scriptModule) { scriptModule.registerScript("int", IntArrayScriptFactory.class); scriptModule.registerScript("long", LongArrayScriptFactory.class); diff --git a/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java b/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java index b465d25043f..1c63ac7b62a 100644 --- a/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java +++ b/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java @@ -112,16 +112,6 @@ public class SearchServiceTests extends ESSingleNodeTestCase { public static class FailOnRewriteQueryPlugin extends Plugin { - @Override - public String name() { - return FailOnRewriteQueryPlugin.class.getSimpleName(); - } - - @Override - public String description() { - return "This plugin registers a query that always fails at rewrite phase"; - } - public void onModule(SearchModule module) { module.registerQuery(FailOnRewriteQueryBuilder::new, parseContext -> { throw new UnsupportedOperationException("No query parser for this plugin"); diff --git a/core/src/test/java/org/elasticsearch/search/SearchTimeoutIT.java b/core/src/test/java/org/elasticsearch/search/SearchTimeoutIT.java index b2eb12159f8..164261c1ed5 100644 --- a/core/src/test/java/org/elasticsearch/search/SearchTimeoutIT.java +++ b/core/src/test/java/org/elasticsearch/search/SearchTimeoutIT.java @@ -65,15 +65,6 @@ public class SearchTimeoutIT extends ESIntegTestCase { } public static class ScriptedTimeoutPlugin extends Plugin { - @Override - public String name() { - return "test-scripted-search-timeout"; - } - - @Override - public String description() { - return "Test for scripted timeouts on searches"; - } public void onModule(ScriptModule module) { module.registerScript(NativeTestScriptedTimeout.TEST_NATIVE_SCRIPT_TIMEOUT, NativeTestScriptedTimeout.Factory.class); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateScriptMocks.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateScriptMocks.java index f97b163c24c..034308464c4 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateScriptMocks.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateScriptMocks.java @@ -41,16 +41,6 @@ public class DateScriptMocks { */ public static class DateScriptsMockPlugin extends Plugin { - @Override - public String name() { - return "DateScriptMocks"; - } - - @Override - public String description() { - return "A mock script plugin."; - } - public void onModule(ScriptModule module) { module.registerScript(ExtractFieldScript.NAME, ExtractFieldScriptFactory.class); module.registerScript(PlusOneMonthScript.NAME, PlusOneMonthScriptFactory.class); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java index 3a2abda6aa7..c26d595c531 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java @@ -218,16 +218,6 @@ public class IpRangeIT extends ESIntegTestCase { public static class DummyScriptPlugin extends Plugin { - @Override - public String name() { - return "DummyScriptPlugin"; - } - - @Override - public String description() { - return "A mock script plugin."; - } - public void onModule(ScriptModule module) { module.registerScript(DummyScript.NAME, DummyScriptFactory.class); } diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java index 0467992002f..c59e511f3cd 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java @@ -165,15 +165,6 @@ public class SignificantTermsSignificanceScoreIT extends ESIntegTestCase { } public static class CustomSignificanceHeuristicPlugin extends Plugin { - @Override - public String name() { - return "test-plugin-significance-heuristic"; - } - - @Override - public String description() { - return "Significance heuristic plugin"; - } public void onModule(SearchModule searchModule) { searchModule.registerSignificanceHeuristic(SimpleHeuristic.NAMES_FIELD, SimpleHeuristic::new, SimpleHeuristic::parse); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java index a19b274c4db..fdc94908f9d 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java @@ -357,17 +357,6 @@ public class AvgIT extends AbstractNumericTestCase { * Mock plugin for the {@link ExtractFieldScriptEngine} */ public static class ExtractFieldScriptPlugin extends Plugin { - - @Override - public String name() { - return ExtractFieldScriptEngine.NAME; - } - - @Override - public String description() { - return "Mock script engine for " + AvgIT.class; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(ExtractFieldScriptEngine.class, ExtractFieldScriptEngine.NAME, true)); } @@ -477,17 +466,6 @@ public class AvgIT extends AbstractNumericTestCase { * Mock plugin for the {@link FieldValueScriptEngine} */ public static class FieldValueScriptPlugin extends Plugin { - - @Override - public String name() { - return FieldValueScriptEngine.NAME; - } - - @Override - public String description() { - return "Mock script engine for " + AvgIT.class; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(FieldValueScriptEngine.class, FieldValueScriptEngine.NAME, true)); } diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java index 641696722c9..e38fe44a045 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java @@ -352,17 +352,6 @@ public class SumIT extends AbstractNumericTestCase { * Mock plugin for the {@link ExtractFieldScriptEngine} */ public static class ExtractFieldScriptPlugin extends Plugin { - - @Override - public String name() { - return ExtractFieldScriptEngine.NAME; - } - - @Override - public String description() { - return "Mock script engine for " + SumIT.class; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(ExtractFieldScriptEngine.class, ExtractFieldScriptEngine.NAME, true)); } @@ -474,17 +463,6 @@ public class SumIT extends AbstractNumericTestCase { * Mock plugin for the {@link FieldValueScriptEngine} */ public static class FieldValueScriptPlugin extends Plugin { - - @Override - public String name() { - return FieldValueScriptEngine.NAME; - } - - @Override - public String description() { - return "Mock script engine for " + SumIT.class; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(FieldValueScriptEngine.class, FieldValueScriptEngine.NAME, true)); } diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java index 04bef292051..62ec2e64459 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java @@ -211,17 +211,6 @@ public class ValueCountIT extends ESIntegTestCase { * Mock plugin for the {@link FieldValueScriptEngine} */ public static class FieldValueScriptPlugin extends Plugin { - - @Override - public String name() { - return FieldValueScriptEngine.NAME; - } - - @Override - public String description() { - return "Mock script engine for " + ValueCountIT.class; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(FieldValueScriptEngine.class, FieldValueScriptEngine.NAME, true)); } diff --git a/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java index 7ddb6413364..d433eb48cb5 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java +++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java @@ -156,18 +156,10 @@ public class SearchWithRandomExceptionsIT extends ESIntegTestCase { Setting.doubleSetting(EXCEPTION_TOP_LEVEL_RATIO_KEY, 0.1d, 0.0d, Property.IndexScope); public static final Setting EXCEPTION_LOW_LEVEL_RATIO_SETTING = Setting.doubleSetting(EXCEPTION_LOW_LEVEL_RATIO_KEY, 0.1d, 0.0d, Property.IndexScope); - @Override - public String name() { - return "random-exception-reader-wrapper"; - } public void onModule(SettingsModule module) { module.registerSetting(EXCEPTION_TOP_LEVEL_RATIO_SETTING); module.registerSetting(EXCEPTION_LOW_LEVEL_RATIO_SETTING); } - @Override - public String description() { - return "a mock reader wrapper that throws random exceptions for testing"; - } public void onModule(MockEngineFactoryPlugin.MockEngineReaderModule module) { module.setReaderClass(RandomExceptionDirectoryReaderWrapper.class); } diff --git a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java index 81c923ccf6d..39df053c862 100644 --- a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java +++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java @@ -100,17 +100,6 @@ public class FetchSubPhasePluginIT extends ESIntegTestCase { } public static class FetchTermVectorsPlugin extends Plugin { - - @Override - public String name() { - return "fetch-term-vectors"; - } - - @Override - public String description() { - return "fetch plugin to test if the plugin mechanism works"; - } - public void onModule(SearchModule searchModule) { searchModule.registerFetchSubPhase(new TermVectorsFetchSubPhase()); } diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptPlugin.java b/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptPlugin.java index a32baa526b5..5d58921b666 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptPlugin.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptPlugin.java @@ -23,18 +23,6 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.script.ScriptModule; public class ExplainableScriptPlugin extends Plugin { - - public ExplainableScriptPlugin() {} - @Override - public String name() { - return "native-explainable-script"; - } - - @Override - public String description() { - return "Native explainable script"; - } - public void onModule(ScriptModule module) { module.registerScript("native_explainable_script", ExplainableScriptIT.MyNativeScriptFactory.class); } diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java index 7fdeca4680e..e5be795d8f5 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java @@ -95,17 +95,6 @@ public class FunctionScorePluginIT extends ESIntegTestCase { } public static class CustomDistanceScorePlugin extends Plugin { - - @Override - public String name() { - return "test-plugin-distance-score"; - } - - @Override - public String description() { - return "Distance score plugin to test pluggable implementation"; - } - public void onModule(SearchModule scoreModule) { scoreModule.registerScoreFunction(CustomDistanceScoreBuilder::new, CustomDistanceScoreBuilder.PARSER, CustomDistanceScoreBuilder.FUNCTION_NAME_FIELD); diff --git a/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterPlugin.java b/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterPlugin.java index b6c42b73677..f6d56b8b39c 100644 --- a/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterPlugin.java +++ b/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterPlugin.java @@ -24,16 +24,6 @@ import org.elasticsearch.search.SearchModule; public class CustomHighlighterPlugin extends Plugin { - @Override - public String name() { - return "test-plugin-custom-highlighter"; - } - - @Override - public String description() { - return "Custom highlighter to test pluggable implementation"; - } - public void onModule(SearchModule highlightModule) { highlightModule.registerHighlighter("test-custom", new CustomHighlighter()); } diff --git a/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterPlugin.java b/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterPlugin.java index eb12c4def70..dc78aec69cf 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterPlugin.java +++ b/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterPlugin.java @@ -21,21 +21,8 @@ package org.elasticsearch.search.suggest; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.search.SearchModule; -/** - * - */ public class CustomSuggesterPlugin extends Plugin { - @Override - public String name() { - return "test-plugin-custom-suggester"; - } - - @Override - public String description() { - return "Custom suggester to test pluggable implementation"; - } - public void onModule(SearchModule searchModule) { searchModule.registerSuggester("custom", CustomSuggester.INSTANCE); } diff --git a/core/src/test/java/org/elasticsearch/snapshots/mockstore/MockRepository.java b/core/src/test/java/org/elasticsearch/snapshots/mockstore/MockRepository.java index 8b02f90f51c..ffe523b7a14 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/mockstore/MockRepository.java +++ b/core/src/test/java/org/elasticsearch/snapshots/mockstore/MockRepository.java @@ -62,16 +62,6 @@ public class MockRepository extends FsRepository { public static final Setting PASSWORD_SETTING = Setting.simpleString("secret.mock.password", Property.NodeScope, Property.Filtered); - @Override - public String name() { - return "mock-repository"; - } - - @Override - public String description() { - return "Mock Repository"; - } - public void onModule(RepositoriesModule repositoriesModule) { repositoriesModule.registerRepository("mock", MockRepository.class, BlobStoreIndexShardRepository.class); } diff --git a/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java b/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java index eb13de34858..ea6db14b3b6 100644 --- a/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java +++ b/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java @@ -294,16 +294,6 @@ public class ContextAndHeaderTransportIT extends ESIntegTestCase { public static class ActionLoggingPlugin extends Plugin { - @Override - public String name() { - return "test-action-logging"; - } - - @Override - public String description() { - return "Test action logging"; - } - @Override public Collection nodeModules() { return Collections.singletonList(new ActionLoggingModule()); diff --git a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java index f01a4ca5e92..f70c7b27492 100644 --- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java +++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java @@ -86,14 +86,6 @@ public class NettyTransportIT extends ESIntegTestCase { public static final class ExceptionThrowingNettyTransport extends NettyTransport { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "exception-throwing-netty-transport"; - } - @Override - public String description() { - return "an exception throwing transport for testing"; - } public void onModule(NetworkModule module) { module.registerTransport("exception-throwing", ExceptionThrowingNettyTransport.class); } diff --git a/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java b/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java index dc10c9751cf..e86578ab438 100644 --- a/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java +++ b/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java @@ -67,14 +67,6 @@ public class UpdateByNativeScriptIT extends ESIntegTestCase { public static class CustomNativeScriptFactory implements NativeScriptFactory { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-native-script"; - } - @Override - public String description() { - return "a mock native script for testing"; - } public void onModule(ScriptModule scriptModule) { scriptModule.registerScript("custom", CustomNativeScriptFactory.class); } diff --git a/core/src/test/java/org/elasticsearch/update/UpdateIT.java b/core/src/test/java/org/elasticsearch/update/UpdateIT.java index 078bcd8cc3f..38eb7f4b59c 100644 --- a/core/src/test/java/org/elasticsearch/update/UpdateIT.java +++ b/core/src/test/java/org/elasticsearch/update/UpdateIT.java @@ -79,20 +79,6 @@ import static org.hamcrest.Matchers.nullValue; public class UpdateIT extends ESIntegTestCase { public static class PutFieldValuesScriptPlugin extends Plugin { - - public PutFieldValuesScriptPlugin() { - } - - @Override - public String name() { - return PutFieldValuesScriptEngine.NAME; - } - - @Override - public String description() { - return "Mock script engine for " + UpdateIT.class; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(PutFieldValuesScriptEngine.class, PutFieldValuesScriptEngine.NAME, true)); } @@ -166,20 +152,6 @@ public class UpdateIT extends ESIntegTestCase { } public static class FieldIncrementScriptPlugin extends Plugin { - - public FieldIncrementScriptPlugin() { - } - - @Override - public String name() { - return FieldIncrementScriptEngine.NAME; - } - - @Override - public String description() { - return "Mock script engine for " + UpdateIT.class; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(FieldIncrementScriptEngine.class, FieldIncrementScriptEngine.NAME, true)); } @@ -246,20 +218,6 @@ public class UpdateIT extends ESIntegTestCase { } public static class ScriptedUpsertScriptPlugin extends Plugin { - - public ScriptedUpsertScriptPlugin() { - } - - @Override - public String name() { - return ScriptedUpsertScriptEngine.NAME; - } - - @Override - public String description() { - return "Mock script engine for " + UpdateIT.class + ".testScriptedUpsert"; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(ScriptedUpsertScriptEngine.class, ScriptedUpsertScriptEngine.NAME, true)); } @@ -326,20 +284,6 @@ public class UpdateIT extends ESIntegTestCase { } public static class ExtractContextInSourceScriptPlugin extends Plugin { - - public ExtractContextInSourceScriptPlugin() { - } - - @Override - public String name() { - return ExtractContextInSourceScriptEngine.NAME; - } - - @Override - public String description() { - return "Mock script engine for " + UpdateIT.class; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(ExtractContextInSourceScriptEngine.class, ExtractContextInSourceScriptEngine.NAME, true)); } diff --git a/core/src/test/resources/org/elasticsearch/nodesinfo/node2/dummy/_site/es-plugin.properties b/core/src/test/resources/org/elasticsearch/nodesinfo/node2/dummy/_site/es-plugin.properties deleted file mode 100644 index 4487d7c8de9..00000000000 --- a/core/src/test/resources/org/elasticsearch/nodesinfo/node2/dummy/_site/es-plugin.properties +++ /dev/null @@ -1,21 +0,0 @@ -################################################################ -# Licensed to Elasticsearch under one or more contributor -# license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright -# ownership. Elasticsearch licenses this file to you under -# the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -################################################################ -description=This is a description for a dummy test site plugin. -version=0.0.7-BOND-SITE - diff --git a/core/src/test/resources/org/elasticsearch/nodesinfo/node2/dummy/_site/index.html b/core/src/test/resources/org/elasticsearch/nodesinfo/node2/dummy/_site/index.html deleted file mode 100644 index ceb8774542e..00000000000 --- a/core/src/test/resources/org/elasticsearch/nodesinfo/node2/dummy/_site/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Dummy Site Plugin on Node 3 - - -

Welcome to this dummy elasticsearch plugin

- - diff --git a/core/src/test/resources/org/elasticsearch/nodesinfo/node4/dummy/_site/index.html b/core/src/test/resources/org/elasticsearch/nodesinfo/node4/dummy/_site/index.html deleted file mode 100644 index ceb8774542e..00000000000 --- a/core/src/test/resources/org/elasticsearch/nodesinfo/node4/dummy/_site/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Dummy Site Plugin on Node 3 - - -

Welcome to this dummy elasticsearch plugin

- - diff --git a/core/src/test/resources/org/elasticsearch/nodesinfo/node4/test-no-version-plugin/_site/index.html b/core/src/test/resources/org/elasticsearch/nodesinfo/node4/test-no-version-plugin/_site/index.html deleted file mode 100644 index ceb8774542e..00000000000 --- a/core/src/test/resources/org/elasticsearch/nodesinfo/node4/test-no-version-plugin/_site/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Dummy Site Plugin on Node 3 - - -

Welcome to this dummy elasticsearch plugin

- - diff --git a/modules/aggs-matrix-stats/src/main/java/org/elasticsearch/search/aggregations/matrix/MatrixAggregationPlugin.java b/modules/aggs-matrix-stats/src/main/java/org/elasticsearch/search/aggregations/matrix/MatrixAggregationPlugin.java index 156ff05ad65..077c3d3d31a 100644 --- a/modules/aggs-matrix-stats/src/main/java/org/elasticsearch/search/aggregations/matrix/MatrixAggregationPlugin.java +++ b/modules/aggs-matrix-stats/src/main/java/org/elasticsearch/search/aggregations/matrix/MatrixAggregationPlugin.java @@ -29,19 +29,6 @@ import java.io.IOException; public class MatrixAggregationPlugin extends Plugin { - public MatrixAggregationPlugin() throws IOException { - } - - @Override - public String name() { - return "aggs-matrix-stats"; - } - - @Override - public String description() { - return "Adds aggregations whose input are a list of numeric fields and output includes a matrix."; - } - public void onModule(SearchModule searchModule) { InternalMatrixStats.registerStreams(); searchModule.registerAggregation(MatrixStatsAggregationBuilder::new, new MatrixStatsParser(), diff --git a/modules/ingest-common/src/main/java/org/elasticsearch/ingest/IngestCommonPlugin.java b/modules/ingest-common/src/main/java/org/elasticsearch/ingest/IngestCommonPlugin.java index 7e70c3cba49..92112a37b96 100644 --- a/modules/ingest-common/src/main/java/org/elasticsearch/ingest/IngestCommonPlugin.java +++ b/modules/ingest-common/src/main/java/org/elasticsearch/ingest/IngestCommonPlugin.java @@ -41,16 +41,6 @@ public class IngestCommonPlugin extends Plugin { this.builtinPatterns = loadBuiltinPatterns(); } - @Override - public String name() { - return NAME; - } - - @Override - public String description() { - return "Module for ingest processors that do not require additional security permissions or have large dependencies and resources"; - } - public void onModule(NodeModule nodeModule) { nodeModule.registerProcessor(DateProcessor.TYPE, (registry) -> new DateProcessor.Factory()); nodeModule.registerProcessor(SetProcessor.TYPE, (registry) -> new SetProcessor.Factory(registry.getTemplateService())); diff --git a/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionPlugin.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionPlugin.java index cd95f13f63a..be4bb2c7157 100644 --- a/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionPlugin.java +++ b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionPlugin.java @@ -25,16 +25,6 @@ import org.elasticsearch.script.ScriptModule; public class ExpressionPlugin extends Plugin { - @Override - public String name() { - return "lang-expression"; - } - - @Override - public String description() { - return "Lucene expressions integration for Elasticsearch"; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(ExpressionScriptEngineService.class, ExpressionScriptEngineService.NAME, true)); diff --git a/modules/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyPlugin.java b/modules/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyPlugin.java index e5ebcf12509..6f71190339f 100644 --- a/modules/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyPlugin.java +++ b/modules/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyPlugin.java @@ -25,16 +25,6 @@ import org.elasticsearch.script.ScriptModule; public class GroovyPlugin extends Plugin { - @Override - public String name() { - return "lang-groovy"; - } - - @Override - public String description() { - return "Groovy scripting integration for Elasticsearch"; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(GroovyScriptEngineService.class, GroovyScriptEngineService.NAME)); } diff --git a/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndicesRequestTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndicesRequestTests.java index c0dfcb69ead..27bb7fdc23f 100644 --- a/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndicesRequestTests.java +++ b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndicesRequestTests.java @@ -708,14 +708,7 @@ public class IndicesRequestTests extends ESIntegTestCase { public static class InterceptingTransportService extends TransportService { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "intercepting-transport-service"; - } - @Override - public String description() { - return "an intercepting transport service for testing"; - } + public void onModule(NetworkModule module) { module.registerTransportService("intercepting", InterceptingTransportService.class); } diff --git a/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/MustachePlugin.java b/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/MustachePlugin.java index 5ef3ad766e6..769bea8ac0e 100644 --- a/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/MustachePlugin.java +++ b/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/MustachePlugin.java @@ -25,16 +25,6 @@ import org.elasticsearch.script.ScriptModule; public class MustachePlugin extends Plugin { - @Override - public String name() { - return "lang-mustache"; - } - - @Override - public String description() { - return "Mustache scripting integration for Elasticsearch"; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(MustacheScriptEngineService.class, MustacheScriptEngineService.NAME, true)); diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java index 67f889b7a72..21864cb586c 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java @@ -34,16 +34,6 @@ public final class PainlessPlugin extends Plugin { Definition.VOID_TYPE.hashCode(); } - @Override - public String name() { - return "lang-painless"; - } - - @Override - public String description() { - return "Painless scripting language for Elasticsearch"; - } - public void onModule(final ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration( PainlessScriptEngineService.class, PainlessScriptEngineService.NAME, true)); diff --git a/modules/percolator/src/main/java/org/elasticsearch/percolator/PercolatorPlugin.java b/modules/percolator/src/main/java/org/elasticsearch/percolator/PercolatorPlugin.java index dfc11804dd9..727d567105a 100644 --- a/modules/percolator/src/main/java/org/elasticsearch/percolator/PercolatorPlugin.java +++ b/modules/percolator/src/main/java/org/elasticsearch/percolator/PercolatorPlugin.java @@ -45,16 +45,6 @@ public class PercolatorPlugin extends Plugin { this.settings = settings; } - @Override - public String name() { - return NAME; - } - - @Override - public String description() { - return "Percolator module adds capability to index queries and query these queries by specifying documents"; - } - public void onModule(ActionModule module) { module.registerAction(PercolateAction.INSTANCE, TransportPercolateAction.class); module.registerAction(MultiPercolateAction.INSTANCE, TransportMultiPercolateAction.class); diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexPlugin.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexPlugin.java index e3a826dbdad..d4c81177571 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexPlugin.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexPlugin.java @@ -26,16 +26,6 @@ import org.elasticsearch.plugins.Plugin; public class ReindexPlugin extends Plugin { public static final String NAME = "reindex"; - @Override - public String name() { - return NAME; - } - - @Override - public String description() { - return "The Reindex module adds APIs to reindex from one index to another or update documents in place."; - } - public void onModule(ActionModule actionModule) { actionModule.registerAction(ReindexAction.INSTANCE, TransportReindexAction.class); actionModule.registerAction(UpdateByQueryAction.INSTANCE, TransportUpdateByQueryAction.class); diff --git a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/CancelTests.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/CancelTests.java index dcaa80a8169..bbe7dd612e8 100644 --- a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/CancelTests.java +++ b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/CancelTests.java @@ -190,16 +190,6 @@ public class CancelTests extends ReindexTestCase { public static class ReindexCancellationPlugin extends Plugin { - @Override - public String name() { - return "reindex-cancellation"; - } - - @Override - public String description() { - return "See " + CancelTests.class.getName() + " documentation"; - } - @Override public void onIndexModule(IndexModule indexModule) { indexModule.addIndexOperationListener(new BlockingDeleteListener()); diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/AnalysisICUPlugin.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/AnalysisICUPlugin.java index 46b8d530f5f..e0e6c3c2e36 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/AnalysisICUPlugin.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/AnalysisICUPlugin.java @@ -28,21 +28,8 @@ import org.elasticsearch.index.analysis.IcuTransformTokenFilterFactory; import org.elasticsearch.indices.analysis.AnalysisModule; import org.elasticsearch.plugins.Plugin; -/** - * - */ public class AnalysisICUPlugin extends Plugin { - @Override - public String name() { - return "analysis-icu"; - } - - @Override - public String description() { - return "UTF related ICU analysis support"; - } - /** * Automatically called with the analysis module. */ diff --git a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/AnalysisKuromojiPlugin.java b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/AnalysisKuromojiPlugin.java index 4208b1be504..e92e782a96c 100644 --- a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/AnalysisKuromojiPlugin.java +++ b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/AnalysisKuromojiPlugin.java @@ -36,17 +36,6 @@ import org.elasticsearch.plugins.Plugin; */ public class AnalysisKuromojiPlugin extends Plugin { - @Override - public String name() { - return "analysis-kuromoji"; - } - - @Override - public String description() { - return "Kuromoji analysis support"; - } - - public void onModule(AnalysisModule module) { module.registerCharFilter("kuromoji_iteration_mark", KuromojiIterationMarkCharFilterFactory::new); module.registerAnalyzer("kuromoji", KuromojiAnalyzerProvider::new); diff --git a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/plugin/analysis/AnalysisPhoneticPlugin.java b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/plugin/analysis/AnalysisPhoneticPlugin.java index 3156a6adfe3..3be97b444db 100644 --- a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/plugin/analysis/AnalysisPhoneticPlugin.java +++ b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/plugin/analysis/AnalysisPhoneticPlugin.java @@ -23,20 +23,8 @@ import org.elasticsearch.index.analysis.PhoneticTokenFilterFactory; import org.elasticsearch.indices.analysis.AnalysisModule; import org.elasticsearch.plugins.Plugin; -/** - */ public class AnalysisPhoneticPlugin extends Plugin { - @Override - public String name() { - return "analysis-phonetic"; - } - - @Override - public String description() { - return "Phonetic analysis support"; - } - public void onModule(AnalysisModule module) { module.registerTokenFilter("phonetic", PhoneticTokenFilterFactory::new); } diff --git a/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/AnalysisSmartChinesePlugin.java b/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/AnalysisSmartChinesePlugin.java index 801c51f8e81..05c779bb5a9 100644 --- a/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/AnalysisSmartChinesePlugin.java +++ b/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/AnalysisSmartChinesePlugin.java @@ -25,21 +25,8 @@ import org.elasticsearch.index.analysis.SmartChineseTokenizerTokenizerFactory; import org.elasticsearch.indices.analysis.AnalysisModule; import org.elasticsearch.plugins.Plugin; -/** - * - */ public class AnalysisSmartChinesePlugin extends Plugin { - @Override - public String name() { - return "analysis-smartcn"; - } - - @Override - public String description() { - return "Smart Chinese analysis support"; - } - public void onModule(AnalysisModule module) { module.registerAnalyzer("smartcn", SmartChineseAnalyzerProvider::new); module.registerTokenizer("smartcn_tokenizer", SmartChineseTokenizerTokenizerFactory::new); diff --git a/plugins/analysis-stempel/src/main/java/org/elasticsearch/plugin/analysis/stempel/AnalysisStempelPlugin.java b/plugins/analysis-stempel/src/main/java/org/elasticsearch/plugin/analysis/stempel/AnalysisStempelPlugin.java index 07f50ed7738..8549795f4b6 100644 --- a/plugins/analysis-stempel/src/main/java/org/elasticsearch/plugin/analysis/stempel/AnalysisStempelPlugin.java +++ b/plugins/analysis-stempel/src/main/java/org/elasticsearch/plugin/analysis/stempel/AnalysisStempelPlugin.java @@ -24,21 +24,8 @@ import org.elasticsearch.index.analysis.pl.PolishStemTokenFilterFactory; import org.elasticsearch.indices.analysis.AnalysisModule; import org.elasticsearch.plugins.Plugin; -/** - * - */ public class AnalysisStempelPlugin extends Plugin { - @Override - public String name() { - return "analysis-stempel"; - } - - @Override - public String description() { - return "Stempel (Polish) analysis support"; - } - public void onModule(AnalysisModule module) { module.registerAnalyzer("polish", PolishAnalyzerProvider::new); module.registerTokenFilter("polish_stem", PolishStemTokenFilterFactory::new); diff --git a/plugins/discovery-azure/src/main/java/org/elasticsearch/plugin/discovery/azure/AzureDiscoveryPlugin.java b/plugins/discovery-azure/src/main/java/org/elasticsearch/plugin/discovery/azure/AzureDiscoveryPlugin.java index 757ff359d42..ffc02bd3251 100644 --- a/plugins/discovery-azure/src/main/java/org/elasticsearch/plugin/discovery/azure/AzureDiscoveryPlugin.java +++ b/plugins/discovery-azure/src/main/java/org/elasticsearch/plugin/discovery/azure/AzureDiscoveryPlugin.java @@ -45,16 +45,6 @@ public class AzureDiscoveryPlugin extends Plugin { logger.trace("starting azure discovery plugin..."); } - @Override - public String name() { - return "discovery-azure"; - } - - @Override - public String description() { - return "Azure Discovery Plugin"; - } - @Override public Collection nodeModules() { return Collections.singletonList((Module) new AzureDiscoveryModule(settings)); diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceSimpleMock.java b/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceSimpleMock.java index 5f43de3be7c..26843eba532 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceSimpleMock.java +++ b/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceSimpleMock.java @@ -38,14 +38,6 @@ import java.net.InetAddress; public class AzureComputeServiceSimpleMock extends AzureComputeServiceAbstractMock { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-compute-service"; - } - @Override - public String description() { - return "plugs in a mock compute service for testing"; - } public void onModule(AzureDiscoveryModule azureDiscoveryModule) { azureDiscoveryModule.computeServiceImpl = AzureComputeServiceSimpleMock.class; } diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceTwoNodesMock.java b/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceTwoNodesMock.java index 829c1dc21f8..bf7589c8836 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceTwoNodesMock.java +++ b/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceTwoNodesMock.java @@ -42,14 +42,6 @@ import static org.elasticsearch.common.util.CollectionUtils.newSingletonArrayLis */ public class AzureComputeServiceTwoNodesMock extends AzureComputeServiceAbstractMock { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-compute-service"; - } - @Override - public String description() { - return "plugs in a mock compute service for testing"; - } public void onModule(AzureDiscoveryModule azureDiscoveryModule) { azureDiscoveryModule.computeServiceImpl = AzureComputeServiceTwoNodesMock.class; } diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryClusterFormationTests.java b/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryClusterFormationTests.java index 489f7043b83..0aebe727e33 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryClusterFormationTests.java +++ b/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryClusterFormationTests.java @@ -72,17 +72,6 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTi public class AzureDiscoveryClusterFormationTests extends ESIntegTestCase { public static class TestPlugin extends Plugin { - - @Override - public String name() { - return AzureDiscoveryClusterFormationTests.class.getName(); - } - - @Override - public String description() { - return AzureDiscoveryClusterFormationTests.class.getName(); - } - public void onModule(SettingsModule settingsModule) { settingsModule.registerSetting(AzureComputeService.Management.ENDPOINT_SETTING); } diff --git a/plugins/discovery-ec2/src/main/java/org/elasticsearch/plugin/discovery/ec2/Ec2DiscoveryPlugin.java b/plugins/discovery-ec2/src/main/java/org/elasticsearch/plugin/discovery/ec2/Ec2DiscoveryPlugin.java index 21e31b9f076..648cfeb0279 100644 --- a/plugins/discovery-ec2/src/main/java/org/elasticsearch/plugin/discovery/ec2/Ec2DiscoveryPlugin.java +++ b/plugins/discovery-ec2/src/main/java/org/elasticsearch/plugin/discovery/ec2/Ec2DiscoveryPlugin.java @@ -67,23 +67,6 @@ public class Ec2DiscoveryPlugin extends Plugin { }); } - private final Settings settings; - protected final ESLogger logger = Loggers.getLogger(Ec2DiscoveryPlugin.class); - - public Ec2DiscoveryPlugin(Settings settings) { - this.settings = settings; - } - - @Override - public String name() { - return "discovery-ec2"; - } - - @Override - public String description() { - return "EC2 Discovery Plugin"; - } - @Override public Collection nodeModules() { Collection modules = new ArrayList<>(); diff --git a/plugins/discovery-ec2/src/test/java/org/elasticsearch/cloud/aws/AWSSignersTests.java b/plugins/discovery-ec2/src/test/java/org/elasticsearch/cloud/aws/AWSSignersTests.java index 555e9f5c10a..c313f4bd195 100644 --- a/plugins/discovery-ec2/src/test/java/org/elasticsearch/cloud/aws/AWSSignersTests.java +++ b/plugins/discovery-ec2/src/test/java/org/elasticsearch/cloud/aws/AWSSignersTests.java @@ -20,7 +20,6 @@ package org.elasticsearch.cloud.aws; import com.amazonaws.ClientConfiguration; -import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugin.discovery.ec2.Ec2DiscoveryPlugin; import org.elasticsearch.test.ESTestCase; import org.junit.BeforeClass; @@ -35,7 +34,7 @@ public class AWSSignersTests extends ESTestCase { */ @BeforeClass public static void instantiatePlugin() { - new Ec2DiscoveryPlugin(Settings.EMPTY); + new Ec2DiscoveryPlugin(); } public void testSigners() { diff --git a/plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryClusterFormationTests.java b/plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryClusterFormationTests.java index 0271f522943..54f70d80cfb 100644 --- a/plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryClusterFormationTests.java +++ b/plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryClusterFormationTests.java @@ -62,25 +62,12 @@ import static org.hamcrest.Matchers.equalTo; // TODO this should be a IT but currently all ITs in this project run against a real cluster public class Ec2DiscoveryClusterFormationTests extends ESIntegTestCase { - public static class TestPlugin extends Plugin { - - @Override - public String name() { - return Ec2DiscoveryClusterFormationTests.class.getName(); - } - - @Override - public String description() { - return Ec2DiscoveryClusterFormationTests.class.getName(); - } - } - private static HttpServer httpServer; private static Path logDir; @Override protected Collection> nodePlugins() { - return pluginList(Ec2DiscoveryPlugin.class, TestPlugin.class); + return pluginList(Ec2DiscoveryPlugin.class); } @Override diff --git a/plugins/discovery-gce/src/main/java/org/elasticsearch/plugin/discovery/gce/GceDiscoveryPlugin.java b/plugins/discovery-gce/src/main/java/org/elasticsearch/plugin/discovery/gce/GceDiscoveryPlugin.java index 2b92c4fd8c1..87494e90b98 100644 --- a/plugins/discovery-gce/src/main/java/org/elasticsearch/plugin/discovery/gce/GceDiscoveryPlugin.java +++ b/plugins/discovery-gce/src/main/java/org/elasticsearch/plugin/discovery/gce/GceDiscoveryPlugin.java @@ -66,23 +66,6 @@ public class GceDiscoveryPlugin extends Plugin { }); } - private final Settings settings; - protected final ESLogger logger = Loggers.getLogger(GceDiscoveryPlugin.class); - - public GceDiscoveryPlugin(Settings settings) { - this.settings = settings; - } - - @Override - public String name() { - return "discovery-gce"; - } - - @Override - public String description() { - return "Cloud Google Compute Engine Discovery Plugin"; - } - @Override public Collection nodeModules() { return Collections.singletonList(new GceModule()); diff --git a/plugins/discovery-gce/src/test/java/org/elasticsearch/discovery/gce/GceDiscoverTests.java b/plugins/discovery-gce/src/test/java/org/elasticsearch/discovery/gce/GceDiscoverTests.java index f6a850d1d23..7f35f49bb4b 100644 --- a/plugins/discovery-gce/src/test/java/org/elasticsearch/discovery/gce/GceDiscoverTests.java +++ b/plugins/discovery-gce/src/test/java/org/elasticsearch/discovery/gce/GceDiscoverTests.java @@ -64,16 +64,6 @@ public class GceDiscoverTests extends ESIntegTestCase { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "GceDiscoverTests"; - } - - @Override - public String description() { - return "GceDiscoverTests"; - } - public void onModule(SettingsModule module) { module.registerSetting(GceComputeServiceImpl.GCE_HOST); module.registerSetting(GceComputeServiceImpl.GCE_ROOT_URL); diff --git a/plugins/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/IngestAttachmentPlugin.java b/plugins/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/IngestAttachmentPlugin.java index 6e0b3e9e1b3..3156fe381fd 100644 --- a/plugins/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/IngestAttachmentPlugin.java +++ b/plugins/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/IngestAttachmentPlugin.java @@ -26,16 +26,6 @@ import java.io.IOException; public class IngestAttachmentPlugin extends Plugin { - @Override - public String name() { - return "ingest-attachment"; - } - - @Override - public String description() { - return "Ingest processor that adds uses Tika to extract binary data"; - } - public void onModule(NodeModule nodeModule) throws IOException { nodeModule.registerProcessor(AttachmentProcessor.TYPE, (registry) -> new AttachmentProcessor.Factory()); diff --git a/plugins/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java b/plugins/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java index 5d6196f274b..8339ff1fc60 100644 --- a/plugins/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java +++ b/plugins/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java @@ -38,16 +38,6 @@ import java.util.zip.GZIPInputStream; public class IngestGeoIpPlugin extends Plugin { - @Override - public String name() { - return "ingest-geoip"; - } - - @Override - public String description() { - return "Ingest processor that adds information about the geographical location of ip addresses"; - } - public void onModule(NodeModule nodeModule) throws IOException { Path geoIpConfigDirectory = nodeModule.getNode().getEnvironment().configFile().resolve("ingest-geoip"); Map databaseReaders = loadDatabaseReaders(geoIpConfigDirectory); diff --git a/plugins/jvm-example/src/main/java/org/elasticsearch/plugin/example/JvmExamplePlugin.java b/plugins/jvm-example/src/main/java/org/elasticsearch/plugin/example/JvmExamplePlugin.java index 0c0e71dc1c0..163d832d22c 100644 --- a/plugins/jvm-example/src/main/java/org/elasticsearch/plugin/example/JvmExamplePlugin.java +++ b/plugins/jvm-example/src/main/java/org/elasticsearch/plugin/example/JvmExamplePlugin.java @@ -43,16 +43,6 @@ public class JvmExamplePlugin extends Plugin { this.settings = settings; } - @Override - public String name() { - return "jvm-example"; - } - - @Override - public String description() { - return "A plugin that extends all extension points"; - } - @Override public Collection nodeModules() { return Collections.singletonList(new ConfiguredExampleModule()); diff --git a/plugins/lang-javascript/src/main/java/org/elasticsearch/plugin/javascript/JavaScriptPlugin.java b/plugins/lang-javascript/src/main/java/org/elasticsearch/plugin/javascript/JavaScriptPlugin.java index edd7c860244..111dd720c09 100644 --- a/plugins/lang-javascript/src/main/java/org/elasticsearch/plugin/javascript/JavaScriptPlugin.java +++ b/plugins/lang-javascript/src/main/java/org/elasticsearch/plugin/javascript/JavaScriptPlugin.java @@ -34,16 +34,6 @@ public class JavaScriptPlugin extends Plugin { JavaScriptScriptEngineService.init(); } - @Override - public String name() { - return "lang-javascript"; - } - - @Override - public String description() { - return "JavaScript plugin allowing to add javascript scripting support"; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(JavaScriptScriptEngineService.class, JavaScriptScriptEngineService.NAME)); } diff --git a/plugins/lang-python/src/main/java/org/elasticsearch/plugin/python/PythonPlugin.java b/plugins/lang-python/src/main/java/org/elasticsearch/plugin/python/PythonPlugin.java index ca1d3436c11..d6debcf0c7c 100644 --- a/plugins/lang-python/src/main/java/org/elasticsearch/plugin/python/PythonPlugin.java +++ b/plugins/lang-python/src/main/java/org/elasticsearch/plugin/python/PythonPlugin.java @@ -24,21 +24,8 @@ import org.elasticsearch.script.ScriptEngineRegistry; import org.elasticsearch.script.ScriptModule; import org.elasticsearch.script.python.PythonScriptEngineService; -/** - * - */ public class PythonPlugin extends Plugin { - @Override - public String name() { - return "lang-python"; - } - - @Override - public String description() { - return "Adds support for writing scripts in Python"; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(PythonScriptEngineService.class, PythonScriptEngineService.NAME)); } diff --git a/plugins/mapper-attachments/src/main/java/org/elasticsearch/mapper/attachments/MapperAttachmentsPlugin.java b/plugins/mapper-attachments/src/main/java/org/elasticsearch/mapper/attachments/MapperAttachmentsPlugin.java index 7a77510447d..01e43f94173 100644 --- a/plugins/mapper-attachments/src/main/java/org/elasticsearch/mapper/attachments/MapperAttachmentsPlugin.java +++ b/plugins/mapper-attachments/src/main/java/org/elasticsearch/mapper/attachments/MapperAttachmentsPlugin.java @@ -32,16 +32,6 @@ public class MapperAttachmentsPlugin extends Plugin { private static ESLogger logger = ESLoggerFactory.getLogger("mapper.attachment"); private static DeprecationLogger deprecationLogger = new DeprecationLogger(logger); - @Override - public String name() { - return "mapper-attachments"; - } - - @Override - public String description() { - return "Adds the attachment type allowing to parse difference attachment formats"; - } - public void onModule(SettingsModule settingsModule) { deprecationLogger.deprecated("[mapper-attachments] plugin has been deprecated and will be replaced by [ingest-attachment] plugin."); settingsModule.registerSetting(AttachmentMapper.INDEX_ATTACHMENT_DETECT_LANGUAGE_SETTING); diff --git a/plugins/mapper-murmur3/src/main/java/org/elasticsearch/plugin/mapper/MapperMurmur3Plugin.java b/plugins/mapper-murmur3/src/main/java/org/elasticsearch/plugin/mapper/MapperMurmur3Plugin.java index 19b2f0fb9c6..384fc4272f6 100644 --- a/plugins/mapper-murmur3/src/main/java/org/elasticsearch/plugin/mapper/MapperMurmur3Plugin.java +++ b/plugins/mapper-murmur3/src/main/java/org/elasticsearch/plugin/mapper/MapperMurmur3Plugin.java @@ -25,16 +25,6 @@ import org.elasticsearch.plugins.Plugin; public class MapperMurmur3Plugin extends Plugin { - @Override - public String name() { - return "mapper-murmur3"; - } - - @Override - public String description() { - return "A mapper that allows to precompute murmur3 hashes of values at index-time and store them in the index"; - } - public void onModule(IndicesModule indicesModule) { indicesModule.registerMapper(Murmur3FieldMapper.CONTENT_TYPE, new Murmur3FieldMapper.TypeParser()); } diff --git a/plugins/mapper-size/src/main/java/org/elasticsearch/plugin/mapper/MapperSizePlugin.java b/plugins/mapper-size/src/main/java/org/elasticsearch/plugin/mapper/MapperSizePlugin.java index a4c34e97cd8..1aecfdf444d 100644 --- a/plugins/mapper-size/src/main/java/org/elasticsearch/plugin/mapper/MapperSizePlugin.java +++ b/plugins/mapper-size/src/main/java/org/elasticsearch/plugin/mapper/MapperSizePlugin.java @@ -25,16 +25,6 @@ import org.elasticsearch.plugins.Plugin; public class MapperSizePlugin extends Plugin { - @Override - public String name() { - return "mapper-size"; - } - - @Override - public String description() { - return "A mapper that allows document to record their uncompressed size"; - } - public void onModule(IndicesModule indicesModule) { indicesModule.registerMetadataMapper(SizeFieldMapper.NAME, new SizeFieldMapper.TypeParser()); } diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/plugin/repository/azure/AzureRepositoryPlugin.java b/plugins/repository-azure/src/main/java/org/elasticsearch/plugin/repository/azure/AzureRepositoryPlugin.java index 3ce043500ae..56b50322c90 100644 --- a/plugins/repository-azure/src/main/java/org/elasticsearch/plugin/repository/azure/AzureRepositoryPlugin.java +++ b/plugins/repository-azure/src/main/java/org/elasticsearch/plugin/repository/azure/AzureRepositoryPlugin.java @@ -47,16 +47,6 @@ public class AzureRepositoryPlugin extends Plugin { logger.trace("starting azure repository plugin..."); } - @Override - public String name() { - return "repository-azure"; - } - - @Override - public String description() { - return "Azure Repository Plugin"; - } - @Override public Collection nodeModules() { return Collections.singletonList((Module) new AzureRepositoryModule(settings)); diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureRepositoryServiceIntegTestCase.java b/plugins/repository-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureRepositoryServiceIntegTestCase.java index ae1bdd19a54..82af834cd35 100644 --- a/plugins/repository-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureRepositoryServiceIntegTestCase.java +++ b/plugins/repository-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureRepositoryServiceIntegTestCase.java @@ -41,14 +41,6 @@ import java.util.Collection; public abstract class AbstractAzureRepositoryServiceIntegTestCase extends AbstractAzureIntegTestCase { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-storage-service"; - } - @Override - public String description() { - return "plugs in a mock storage service for testing"; - } public void onModule(AzureRepositoryModule azureRepositoryModule) { AzureRepositoryModule.storageServiceImpl = AzureStorageServiceMock.class; } diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/plugin/repository/gcs/GoogleCloudStoragePlugin.java b/plugins/repository-gcs/src/main/java/org/elasticsearch/plugin/repository/gcs/GoogleCloudStoragePlugin.java index 477a083fad5..77d8e23c9e5 100644 --- a/plugins/repository-gcs/src/main/java/org/elasticsearch/plugin/repository/gcs/GoogleCloudStoragePlugin.java +++ b/plugins/repository-gcs/src/main/java/org/elasticsearch/plugin/repository/gcs/GoogleCloudStoragePlugin.java @@ -109,16 +109,6 @@ public class GoogleCloudStoragePlugin extends Plugin { }); } - @Override - public String name() { - return NAME; - } - - @Override - public String description() { - return "Google Cloud Storage Repository Plugin"; - } - @Override public Collection nodeModules() { return Collections.singletonList(new GoogleCloudStorageModule()); diff --git a/plugins/repository-hdfs/src/main/java/org/elasticsearch/repositories/hdfs/HdfsPlugin.java b/plugins/repository-hdfs/src/main/java/org/elasticsearch/repositories/hdfs/HdfsPlugin.java index ccd0b405ff2..ab539aeea1c 100644 --- a/plugins/repository-hdfs/src/main/java/org/elasticsearch/repositories/hdfs/HdfsPlugin.java +++ b/plugins/repository-hdfs/src/main/java/org/elasticsearch/repositories/hdfs/HdfsPlugin.java @@ -30,9 +30,9 @@ import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository import org.elasticsearch.plugins.Plugin; import org.elasticsearch.repositories.RepositoriesModule; -// Code +// Code public final class HdfsPlugin extends Plugin { - + // initialize some problematic classes with elevated privileges static { SecurityManager sm = System.getSecurityManager(); @@ -84,16 +84,6 @@ public final class HdfsPlugin extends Plugin { return null; } - @Override - public String name() { - return "repository-hdfs"; - } - - @Override - public String description() { - return "HDFS Repository Plugin"; - } - public void onModule(RepositoriesModule repositoriesModule) { repositoriesModule.registerRepository("hdfs", HdfsRepository.class, BlobStoreIndexShardRepository.class); } diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/plugin/repository/s3/S3RepositoryPlugin.java b/plugins/repository-s3/src/main/java/org/elasticsearch/plugin/repository/s3/S3RepositoryPlugin.java index d07d8c174c5..23ee36fa3f0 100644 --- a/plugins/repository-s3/src/main/java/org/elasticsearch/plugin/repository/s3/S3RepositoryPlugin.java +++ b/plugins/repository-s3/src/main/java/org/elasticsearch/plugin/repository/s3/S3RepositoryPlugin.java @@ -62,16 +62,6 @@ public class S3RepositoryPlugin extends Plugin { }); } - @Override - public String name() { - return "repository-s3"; - } - - @Override - public String description() { - return "S3 Repository Plugin"; - } - @Override public Collection nodeModules() { Collection modules = new ArrayList<>(); diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/cloud/aws/TestAwsS3Service.java b/plugins/repository-s3/src/test/java/org/elasticsearch/cloud/aws/TestAwsS3Service.java index 47e884d73bd..f83ad222b70 100644 --- a/plugins/repository-s3/src/test/java/org/elasticsearch/cloud/aws/TestAwsS3Service.java +++ b/plugins/repository-s3/src/test/java/org/elasticsearch/cloud/aws/TestAwsS3Service.java @@ -29,14 +29,6 @@ import java.util.IdentityHashMap; public class TestAwsS3Service extends InternalAwsS3Service { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-s3-service"; - } - @Override - public String description() { - return "plugs in mock s3 service"; - } public void onModule(S3Module s3Module) { S3Module.s3ServiceImpl = TestAwsS3Service.class; } diff --git a/plugins/store-smb/src/main/java/org/elasticsearch/plugin/store/smb/SMBStorePlugin.java b/plugins/store-smb/src/main/java/org/elasticsearch/plugin/store/smb/SMBStorePlugin.java index e93bc939e65..241f3d77e8b 100644 --- a/plugins/store-smb/src/main/java/org/elasticsearch/plugin/store/smb/SMBStorePlugin.java +++ b/plugins/store-smb/src/main/java/org/elasticsearch/plugin/store/smb/SMBStorePlugin.java @@ -26,16 +26,6 @@ import org.elasticsearch.plugins.Plugin; public class SMBStorePlugin extends Plugin { - @Override - public String name() { - return "store-smb"; - } - - @Override - public String description() { - return "SMB Store Plugin"; - } - @Override public void onIndexModule(IndexModule indexModule) { indexModule.addIndexStore("smb_mmap_fs", SmbMmapFsIndexStore::new); diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java b/test/framework/src/main/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java index cf881f4cd66..3bb77d34f8d 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java +++ b/test/framework/src/main/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java @@ -52,14 +52,6 @@ import static java.util.Collections.emptySet; public class MockInternalClusterInfoService extends InternalClusterInfoService { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-cluster-info-service"; - } - @Override - public String description() { - return "a mock cluster info service for testing"; - } public void onModule(ClusterModule module) { module.clusterInfoServiceImpl = MockInternalClusterInfoService.class; } diff --git a/test/framework/src/main/java/org/elasticsearch/index/MockEngineFactoryPlugin.java b/test/framework/src/main/java/org/elasticsearch/index/MockEngineFactoryPlugin.java index 3c72701f214..63b3361d48d 100644 --- a/test/framework/src/main/java/org/elasticsearch/index/MockEngineFactoryPlugin.java +++ b/test/framework/src/main/java/org/elasticsearch/index/MockEngineFactoryPlugin.java @@ -32,14 +32,6 @@ import java.util.Collections; // this must exist in the same package as IndexModule to allow access to setting the impl public class MockEngineFactoryPlugin extends Plugin { - @Override - public String name() { - return "mock-engine-factory"; - } - @Override - public String description() { - return "a mock engine factory for testing"; - } private Class readerWrapper = AssertingDirectoryReader.class; diff --git a/test/framework/src/main/java/org/elasticsearch/ingest/IngestTestPlugin.java b/test/framework/src/main/java/org/elasticsearch/ingest/IngestTestPlugin.java index df3036f8459..b32a2eab991 100644 --- a/test/framework/src/main/java/org/elasticsearch/ingest/IngestTestPlugin.java +++ b/test/framework/src/main/java/org/elasticsearch/ingest/IngestTestPlugin.java @@ -27,16 +27,6 @@ import org.elasticsearch.plugins.Plugin; */ public class IngestTestPlugin extends Plugin { - @Override - public String name() { - return "ingest-test"; - } - - @Override - public String description() { - return "Contains an ingest processor to be used in tests"; - } - public void onModule(NodeModule nodeModule) { nodeModule.registerProcessor("test", (registry) -> config -> new TestProcessor("id", "test", doc -> { diff --git a/test/framework/src/main/java/org/elasticsearch/node/NodeMocksPlugin.java b/test/framework/src/main/java/org/elasticsearch/node/NodeMocksPlugin.java index 598f5a7ee7c..a121ad46bcc 100644 --- a/test/framework/src/main/java/org/elasticsearch/node/NodeMocksPlugin.java +++ b/test/framework/src/main/java/org/elasticsearch/node/NodeMocksPlugin.java @@ -23,16 +23,6 @@ import org.elasticsearch.plugins.Plugin; public class NodeMocksPlugin extends Plugin { - @Override - public String name() { - return "node-mocks"; - } - - @Override - public String description() { - return "a plugin to setup mocks for node level classes"; - } - public void onModule(NodeModule module) { module.bigArraysImpl = MockBigArrays.class; } 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 4e06bbe8b45..9aa6aeb88f6 100644 --- a/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java +++ b/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java @@ -31,7 +31,7 @@ import java.util.List; import java.util.Map; /** - * A dummy script engine used for testing. Scripts must be a number. Many + * A dummy script engine used for testing. Scripts must be a number. Many * tests rely on the fact this thing returns a String as its compiled form. * they even try to serialize it over the network! */ @@ -51,22 +51,8 @@ public class MockScriptEngine implements ScriptEngineService { this.params = params; } } - + public static class TestPlugin extends Plugin { - - public TestPlugin() { - } - - @Override - public String name() { - return NAME; - } - - @Override - public String description() { - return "Mock script engine for integration tests"; - } - public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(MockScriptEngine.class, MockScriptEngine.NAME, true)); @@ -91,7 +77,7 @@ public class MockScriptEngine implements ScriptEngineService { @Override public ExecutableScript executable(CompiledScript compiledScript, @Nullable Map vars) { - assert compiledScript.compiled() instanceof MockCompiledScript + assert compiledScript.compiled() instanceof MockCompiledScript : "do NOT pass compiled scripts from other engines to me, I will fail your test, got: " + compiledScript; return new AbstractExecutableScript() { @Override diff --git a/test/framework/src/main/java/org/elasticsearch/search/MockSearchService.java b/test/framework/src/main/java/org/elasticsearch/search/MockSearchService.java index 1ed90408f7d..cabb67a8771 100644 --- a/test/framework/src/main/java/org/elasticsearch/search/MockSearchService.java +++ b/test/framework/src/main/java/org/elasticsearch/search/MockSearchService.java @@ -39,14 +39,6 @@ import java.util.concurrent.ConcurrentHashMap; public class MockSearchService extends SearchService { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-search-service"; - } - @Override - public String description() { - return "a mock search service for testing"; - } public void onModule(SearchModule module) { module.searchServiceImpl = MockSearchService.class; } diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java index 4e066bc7635..0ea17b1f868 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java @@ -1798,14 +1798,6 @@ public abstract class ESIntegTestCase extends ESTestCase { } public static final class TestSeedPlugin extends Plugin { - @Override - public String name() { - return "test-seed-plugin"; - } - @Override - public String description() { - return "a test plugin that registers index.tests.seed as an index setting"; - } public void onModule(SettingsModule module) { module.registerSetting(INDEX_TEST_SEED_SETTING); } diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalSettingsPlugin.java b/test/framework/src/main/java/org/elasticsearch/test/InternalSettingsPlugin.java index f76ae7b4b56..9d19fadcf2a 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalSettingsPlugin.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalSettingsPlugin.java @@ -25,15 +25,6 @@ import org.elasticsearch.common.settings.SettingsModule; import org.elasticsearch.plugins.Plugin; public final class InternalSettingsPlugin extends Plugin { - @Override - public String name() { - return "internal-settings-plugin"; - } - - @Override - public String description() { - return "a plugin that allows to set values for internal settings which are can't be set via the ordinary API without this plugin installed"; - } public static final Setting VERSION_CREATED = Setting.intSetting("index.version.created", 0, Property.IndexScope, Property.NodeScope); diff --git a/test/framework/src/main/java/org/elasticsearch/test/MockIndexEventListener.java b/test/framework/src/main/java/org/elasticsearch/test/MockIndexEventListener.java index f17fe024f14..1d62ea489d8 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/MockIndexEventListener.java +++ b/test/framework/src/main/java/org/elasticsearch/test/MockIndexEventListener.java @@ -52,14 +52,6 @@ public final class MockIndexEventListener { public static class TestPlugin extends Plugin { private final TestEventListener listener = new TestEventListener(); - @Override - public String name() { - return "mock-index-listener"; - } - @Override - public String description() { - return "a mock index listener for testing only"; - } /** * For tests to pass in to fail on listener invocation diff --git a/test/framework/src/main/java/org/elasticsearch/test/store/MockFSIndexStore.java b/test/framework/src/main/java/org/elasticsearch/test/store/MockFSIndexStore.java index d44cf60e9e3..568a93a531a 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/store/MockFSIndexStore.java +++ b/test/framework/src/main/java/org/elasticsearch/test/store/MockFSIndexStore.java @@ -49,14 +49,6 @@ public class MockFSIndexStore extends IndexStore { Setting.boolSetting("index.store.mock.check_index_on_close", true, Property.IndexScope, Property.NodeScope); public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-index-store"; - } - @Override - public String description() { - return "a mock index store for testing"; - } @Override public Settings additionalSettings() { return Settings.builder().put(IndexModule.INDEX_STORE_TYPE_SETTING.getKey(), "mock").build(); diff --git a/test/framework/src/main/java/org/elasticsearch/test/transport/AssertingLocalTransport.java b/test/framework/src/main/java/org/elasticsearch/test/transport/AssertingLocalTransport.java index a9687c27873..bdbbee0313a 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/transport/AssertingLocalTransport.java +++ b/test/framework/src/main/java/org/elasticsearch/test/transport/AssertingLocalTransport.java @@ -47,14 +47,6 @@ import java.util.Random; public class AssertingLocalTransport extends LocalTransport { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "asserting-local-transport"; - } - @Override - public String description() { - return "an asserting transport for testing"; - } public void onModule(NetworkModule module) { module.registerTransport("mock", AssertingLocalTransport.class); } diff --git a/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java b/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java index 05b8b23e90c..308b804231c 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java +++ b/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java @@ -79,14 +79,6 @@ import java.util.concurrent.CopyOnWriteArrayList; public class MockTransportService extends TransportService { public static class TestPlugin extends Plugin { - @Override - public String name() { - return "mock-transport-service"; - } - @Override - public String description() { - return "a mock transport service for testing"; - } public void onModule(NetworkModule module) { module.registerTransportService("mock", MockTransportService.class); } From 96321d77490f8eba8ae010e5fe722870fe742a46 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Thu, 16 Jun 2016 10:18:10 -0700 Subject: [PATCH 2/2] Remove outtdated comment referring to name/description for Plugin class --- .../elasticsearch/indices/analysis/AnalysisModule.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java b/core/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java index 02aca17e03c..b5b480fc909 100644 --- a/core/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java +++ b/core/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java @@ -54,16 +54,6 @@ import java.util.Map; * The {@link org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider} is only a functional interface that allows to register factory constructors directly like the plugin example below: *
  *     public class MyAnalysisPlugin extends Plugin {
- *       \@Override
- *       public String name() {
- *         return "analysis-my-plugin";
- *       }
- *
- *       \@Override
- *       public String description() {
- *         return "my very fast and efficient analyzer";
- *       }
- *
  *       public void onModule(AnalysisModule module) {
  *         module.registerAnalyzer("my-analyzer-name", MyAnalyzer::new);
  *       }