Merge pull request #18906 from rjernst/plugin_name_api

Plugins: Remove name() and description() from api
This commit is contained in:
Ryan Ernst 2016-06-16 14:35:25 -07:00 committed by GitHub
commit eebb089c02
96 changed files with 20 additions and 1135 deletions

View File

@ -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:
* <pre>
* 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);
* }

View File

@ -40,16 +40,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.
*/

View File

@ -117,7 +117,7 @@ public class PluginsService extends AbstractComponent {
// first we load plugins that are on the classpath. this is for tests and transport clients
for (Class<? extends Plugin> 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);
}
@ -201,12 +201,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));
@ -238,10 +238,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;
}
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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<Class<? extends LifecycleComponent>> nodeServices() {
List<Class<? extends LifecycleComponent>> services = new ArrayList<>(1);

View File

@ -53,22 +53,6 @@ public class SettingsFilteringIT extends ESIntegTestCase {
public static final Setting<Boolean> 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();

View File

@ -47,21 +47,6 @@ public class SettingsListenerIT extends ESIntegTestCase {
private final SettingsTestingService service = new SettingsTestingService();
private static final Setting<Integer> 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";
}
@Override
public List<Setting<?>> getSettings() {

View File

@ -175,16 +175,6 @@ public class WaitUntilRefreshIT extends ESIntegTestCase {
}
public static class DeletePlzPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "delete_please";
}
@Override
public String description() {
return "adds a script that converts any update into a delete for testing";
}
@Override
public List<NativeScriptFactory> getNativeScripts() {
return Collections.singletonList(new DeletePlzFactory());

View File

@ -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"));

View File

@ -761,17 +761,6 @@ public class FunctionScoreQueryBuilderTests extends AbstractQueryTestCase<Functi
}
public static class TestPlugin extends Plugin {
@Override
public String name() {
return "test-plugin";
}
@Override
public String description() {
return "Adds random function with fixed seed";
}
public void onModule(SearchModule module) {
module.registerScoreFunction(RandomScoreFunctionBuilderWithFixedSeed::new,
RandomScoreFunctionBuilderWithFixedSeed::fromXContent, RandomScoreFunctionBuilderWithFixedSeed.FUNCTION_NAME_FIELD);

View File

@ -30,16 +30,6 @@ import java.io.IOException;
public class DummyQueryParserPlugin extends Plugin {
@Override
public String name() {
return "dummy";
}
@Override
public String description() {
return "dummy query";
}
public void onModule(SearchModule module) {
module.registerQuery(DummyQueryBuilder::new, DummyQueryBuilder::fromXContent, DummyQueryBuilder.QUERY_NAME_FIELD);
}
@ -72,4 +62,4 @@ public class DummyQueryParserPlugin extends Plugin {
return classHash();
}
}
}
}

View File

@ -590,15 +590,6 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase {
}
public static final class TestPlugin extends Plugin {
@Override
public String name() {
return "index-a-setting";
}
@Override
public String description() {
return "a plugin that adds a dynamic tst setting";
}
private static final Setting<String> INDEX_A =
new Setting<>("index.a", "", Function.identity(), Property.Dynamic, Property.IndexScope);

View File

@ -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());

View File

@ -201,15 +201,6 @@ public class RandomExceptionCircuitBreakerIT extends ESIntegTestCase {
public static final Setting<Double> 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";
}
@Override
public List<Setting<?>> getSettings() {
return Arrays.asList(EXCEPTION_TOP_LEVEL_RATIO_SETTING, EXCEPTION_LOW_LEVEL_RATIO_SETTING);

View File

@ -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);
}

View File

@ -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());
}

View File

@ -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;
}
}

View File

@ -19,6 +19,11 @@
package org.elasticsearch.plugins;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.settings.Settings;
@ -26,35 +31,14 @@ import org.elasticsearch.env.Environment;
import org.elasticsearch.index.IndexModule;
import org.elasticsearch.test.ESTestCase;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
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();
@ -62,33 +46,12 @@ 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");
}
}
public static class FilterablePlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "filter-plugin";
}
@Override
public String description() {
return "is filterable";
}
}
public static class FilterablePlugin extends Plugin implements ScriptPlugin {}
public static class BrokenModule extends AbstractModule {
@ -123,8 +86,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()));
}
}

View File

@ -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);
}

View File

@ -175,17 +175,6 @@ public class ScriptFieldIT extends ESIntegTestCase {
}
public static class CustomScriptPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "custom_script";
}
@Override
public String description() {
return "script ";
}
@Override
public List<NativeScriptFactory> getNativeScripts() {
return Arrays.asList(new IntArrayScriptFactory(), new LongArrayScriptFactory(), new FloatArrayScriptFactory(),

View File

@ -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");

View File

@ -67,16 +67,6 @@ public class SearchTimeoutIT extends ESIntegTestCase {
}
public static class ScriptedTimeoutPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "test-scripted-search-timeout";
}
@Override
public String description() {
return "Test for scripted timeouts on searches";
}
@Override
public List<NativeScriptFactory> getNativeScripts() {
return Collections.singletonList(new NativeTestScriptedTimeout.Factory());

View File

@ -43,17 +43,6 @@ public class DateScriptMocks {
* Mock plugin for the {@link DateScriptMocks.ExtractFieldScript} and {@link DateScriptMocks.PlusOneMonthScript}
*/
public static class DateScriptsMockPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "DateScriptMocks";
}
@Override
public String description() {
return "A mock script plugin.";
}
@Override
public List<NativeScriptFactory> getNativeScripts() {
return Arrays.asList(new ExtractFieldScriptFactory(), new PlusOneMonthScriptFactory());

View File

@ -219,17 +219,6 @@ public class IpRangeIT extends ESIntegTestCase {
}
public static class DummyScriptPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "DummyScriptPlugin";
}
@Override
public String description() {
return "A mock script plugin.";
}
@Override
public List<NativeScriptFactory> getNativeScripts() {
return Collections.singletonList(new DummyScriptFactory());

View File

@ -168,15 +168,6 @@ public class SignificantTermsSignificanceScoreIT extends ESIntegTestCase {
}
public static class CustomSignificanceHeuristicPlugin extends Plugin implements ScriptPlugin {
@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);

View File

@ -357,17 +357,6 @@ public class AvgIT extends AbstractNumericTestCase {
* Mock plugin for the {@link ExtractFieldScriptEngine}
*/
public static class ExtractFieldScriptPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return ExtractFieldScriptEngine.NAME;
}
@Override
public String description() {
return "Mock script engine for " + AvgIT.class;
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new ExtractFieldScriptEngine();
@ -477,17 +466,6 @@ public class AvgIT extends AbstractNumericTestCase {
* Mock plugin for the {@link FieldValueScriptEngine}
*/
public static class FieldValueScriptPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return FieldValueScriptEngine.NAME;
}
@Override
public String description() {
return "Mock script engine for " + AvgIT.class;
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new FieldValueScriptEngine();

View File

@ -351,17 +351,6 @@ public class SumIT extends AbstractNumericTestCase {
* Mock plugin for the {@link ExtractFieldScriptEngine}
*/
public static class ExtractFieldScriptPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return ExtractFieldScriptEngine.NAME;
}
@Override
public String description() {
return "Mock script engine for " + SumIT.class;
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new ExtractFieldScriptEngine();
@ -478,17 +467,6 @@ public class SumIT extends AbstractNumericTestCase {
* Mock plugin for the {@link FieldValueScriptEngine}
*/
public static class FieldValueScriptPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return FieldValueScriptEngine.NAME;
}
@Override
public String description() {
return "Mock script engine for " + SumIT.class;
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new FieldValueScriptEngine();

View File

@ -213,17 +213,6 @@ public class ValueCountIT extends ESIntegTestCase {
* Mock plugin for the {@link FieldValueScriptEngine}
*/
public static class FieldValueScriptPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return FieldValueScriptEngine.NAME;
}
@Override
public String description() {
return "Mock script engine for " + ValueCountIT.class;
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new FieldValueScriptEngine();

View File

@ -159,17 +159,9 @@ public class SearchWithRandomExceptionsIT extends ESIntegTestCase {
public static final Setting<Double> 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";
}
@Override
public List<Setting<?>> getSettings() {
return Arrays.asList(EXCEPTION_TOP_LEVEL_RATIO_SETTING, 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);
}

View File

@ -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());
}

View File

@ -22,25 +22,12 @@ package org.elasticsearch.search.functionscore;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.plugins.ScriptPlugin;
import org.elasticsearch.script.NativeScriptFactory;
import org.elasticsearch.script.ScriptModule;
import java.util.Collections;
import java.util.List;
public class ExplainableScriptPlugin extends Plugin implements ScriptPlugin {
public ExplainableScriptPlugin() {}
@Override
public String name() {
return "native-explainable-script";
}
@Override
public String description() {
return "Native explainable script";
}
@Override
public List<NativeScriptFactory> getNativeScripts() {
return Collections.singletonList(new ExplainableScriptIT.MyNativeScriptFactory());

View File

@ -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);

View File

@ -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());
}

View File

@ -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);
}

View File

@ -63,16 +63,6 @@ public class MockRepository extends FsRepository {
public static final Setting<String> 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);
}

View File

@ -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<Module> nodeModules() {
return Collections.<Module>singletonList(new ActionLoggingModule());

View File

@ -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);
}

View File

@ -70,14 +70,6 @@ public class UpdateByNativeScriptIT extends ESIntegTestCase {
public static class CustomNativeScriptFactory implements NativeScriptFactory {
public static class TestPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "mock-native-script";
}
@Override
public String description() {
return "a mock native script for testing";
}
@Override
public List<NativeScriptFactory> getNativeScripts() {
return Collections.singletonList(new CustomNativeScriptFactory());

View File

@ -78,20 +78,6 @@ import static org.hamcrest.Matchers.nullValue;
public class UpdateIT extends ESIntegTestCase {
public static class PutFieldValuesScriptPlugin extends Plugin implements ScriptPlugin {
public PutFieldValuesScriptPlugin() {
}
@Override
public String name() {
return PutFieldValuesScriptEngine.NAME;
}
@Override
public String description() {
return "Mock script engine for " + UpdateIT.class;
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new PutFieldValuesScriptEngine();
@ -169,20 +155,6 @@ public class UpdateIT extends ESIntegTestCase {
}
public static class FieldIncrementScriptPlugin extends Plugin implements ScriptPlugin {
public FieldIncrementScriptPlugin() {
}
@Override
public String name() {
return FieldIncrementScriptEngine.NAME;
}
@Override
public String description() {
return "Mock script engine for " + UpdateIT.class;
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new FieldIncrementScriptEngine();
@ -254,20 +226,6 @@ public class UpdateIT extends ESIntegTestCase {
}
public static class ScriptedUpsertScriptPlugin extends Plugin implements ScriptPlugin {
public ScriptedUpsertScriptPlugin() {
}
@Override
public String name() {
return ScriptedUpsertScriptEngine.NAME;
}
@Override
public String description() {
return "Mock script engine for " + UpdateIT.class + ".testScriptedUpsert";
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new ScriptedUpsertScriptEngine();
@ -339,20 +297,6 @@ public class UpdateIT extends ESIntegTestCase {
}
public static class ExtractContextInSourceScriptPlugin extends Plugin implements ScriptPlugin {
public ExtractContextInSourceScriptPlugin() {
}
@Override
public String name() {
return ExtractContextInSourceScriptEngine.NAME;
}
@Override
public String description() {
return "Mock script engine for " + UpdateIT.class;
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new ExtractContextInSourceScriptEngine();

View File

@ -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

View File

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Dummy Site Plugin on Node 3</title>
</head>
<body>
<p>Welcome to this dummy elasticsearch plugin</p>
</body>
</html>

View File

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Dummy Site Plugin on Node 3</title>
</head>
<body>
<p>Welcome to this dummy elasticsearch plugin</p>
</body>
</html>

View File

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Dummy Site Plugin on Node 3</title>
</head>
<body>
<p>Welcome to this dummy elasticsearch plugin</p>
</body>
</html>

View File

@ -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(),

View File

@ -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()));

View File

@ -28,16 +28,6 @@ import org.elasticsearch.script.ScriptModule;
public class ExpressionPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "lang-expression";
}
@Override
public String description() {
return "Lucene expressions integration for Elasticsearch";
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new ExpressionScriptEngineService(settings);

View File

@ -28,16 +28,6 @@ import org.elasticsearch.script.ScriptModule;
public class GroovyPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "lang-groovy";
}
@Override
public String description() {
return "Groovy scripting integration for Elasticsearch";
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new GroovyScriptEngineService(settings);

View File

@ -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);
}

View File

@ -28,16 +28,6 @@ import org.elasticsearch.script.ScriptModule;
public class MustachePlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "lang-mustache";
}
@Override
public String description() {
return "Mustache scripting integration for Elasticsearch";
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new MustacheScriptEngineService(settings);

View File

@ -37,16 +37,6 @@ public final class PainlessPlugin extends Plugin implements ScriptPlugin {
Definition.VOID_TYPE.hashCode();
}
@Override
public String name() {
return "lang-painless";
}
@Override
public String description() {
return "Painless scripting language for Elasticsearch";
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new PainlessScriptEngineService(settings);

View File

@ -48,16 +48,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);

View File

@ -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);

View File

@ -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());

View File

@ -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.
*/

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -48,16 +48,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<Module> nodeModules() {
return Collections.singletonList((Module) new AzureDiscoveryModule(settings));

View File

@ -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;
}

View File

@ -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;
}

View File

@ -73,17 +73,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();
}
@Override
public List<Setting<?>> getSettings() {
return Arrays.asList(AzureComputeService.Management.ENDPOINT_SETTING);

View File

@ -69,23 +69,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<Module> nodeModules() {
Collection<Module> modules = new ArrayList<>();

View File

@ -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() {

View File

@ -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<Class<? extends Plugin>> nodePlugins() {
return pluginList(Ec2DiscoveryPlugin.class, TestPlugin.class);
return pluginList(Ec2DiscoveryPlugin.class);
}
@Override

View File

@ -69,23 +69,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<Module> nodeModules() {
return Collections.singletonList(new GceModule());

View File

@ -65,17 +65,6 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTi
public class GceDiscoverTests extends ESIntegTestCase {
public static class TestPlugin extends Plugin {
@Override
public String name() {
return "GceDiscoverTests";
}
@Override
public String description() {
return "GceDiscoverTests";
}
@Override
public List<Setting<?>> getSettings() {
return Arrays.asList(GceComputeServiceImpl.GCE_HOST, GceComputeServiceImpl.GCE_ROOT_URL,

View File

@ -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());

View File

@ -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<String, DatabaseReader> databaseReaders = loadDatabaseReaders(geoIpConfigDirectory);

View File

@ -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<Module> nodeModules() {
return Collections.<Module>singletonList(new ConfiguredExampleModule());

View File

@ -27,9 +27,6 @@ import org.elasticsearch.script.ScriptEngineService;
import org.elasticsearch.script.ScriptModule;
import org.elasticsearch.script.javascript.JavaScriptScriptEngineService;
/**
*
*/
public class JavaScriptPlugin extends Plugin implements ScriptPlugin {
static {
@ -37,16 +34,6 @@ public class JavaScriptPlugin extends Plugin implements ScriptPlugin {
JavaScriptScriptEngineService.init();
}
@Override
public String name() {
return "lang-javascript";
}
@Override
public String description() {
return "JavaScript plugin allowing to add javascript scripting support";
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new JavaScriptScriptEngineService(settings);

View File

@ -27,21 +27,7 @@ import org.elasticsearch.script.ScriptEngineService;
import org.elasticsearch.script.ScriptModule;
import org.elasticsearch.script.python.PythonScriptEngineService;
/**
*
*/
public class PythonPlugin extends Plugin implements ScriptPlugin {
@Override
public String name() {
return "lang-python";
}
@Override
public String description() {
return "Adds support for writing scripts in Python";
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new PythonScriptEngineService(settings);

View File

@ -32,20 +32,9 @@ import java.util.List;
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";
}
@Override
public List<Setting<?>> getSettings() {
deprecationLogger.deprecated("[mapper-attachments] plugin has been deprecated and will be replaced by [ingest-attachment] plugin.");

View File

@ -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());
}

View File

@ -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());
}

View File

@ -50,16 +50,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<Module> nodeModules() {
return Collections.singletonList((Module) new AzureRepositoryModule(settings));

View File

@ -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;
}

View File

@ -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<Module> nodeModules() {
return Collections.singletonList(new GoogleCloudStorageModule());

View File

@ -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);
}

View File

@ -64,16 +64,6 @@ public class S3RepositoryPlugin extends Plugin {
});
}
@Override
public String name() {
return "repository-s3";
}
@Override
public String description() {
return "S3 Repository Plugin";
}
@Override
public Collection<Module> nodeModules() {
Collection<Module> modules = new ArrayList<>();

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
}

View File

@ -35,14 +35,6 @@ import java.util.List;
// 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<? extends FilterDirectoryReader> readerWrapper = AssertingDirectoryReader.class;

View File

@ -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 -> {

View File

@ -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;
}

View File

@ -53,20 +53,6 @@ public class MockScriptEngine implements ScriptEngineService {
}
public static class TestPlugin extends Plugin implements ScriptPlugin {
public TestPlugin() {
}
@Override
public String name() {
return NAME;
}
@Override
public String description() {
return "Mock script engine for integration tests";
}
@Override
public ScriptEngineService getScriptEngineService(Settings settings) {
return new MockScriptEngine();

View File

@ -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;
}

View File

@ -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";
}
@Override
public List<Setting<?>> getSettings() {
return Arrays.asList(INDEX_TEST_SEED_SETTING);

View File

@ -28,15 +28,6 @@ import java.util.Arrays;
import java.util.List;
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<Integer> VERSION_CREATED =
Setting.intSetting("index.version.created", 0, Property.IndexScope, Property.NodeScope);

View File

@ -54,14 +54,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

View File

@ -51,14 +51,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();

View File

@ -49,14 +49,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);
}

View File

@ -80,14 +80,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);
}