Remove leftover class and fix compile issues from master merge

This commit is contained in:
Ryan Ernst 2015-08-18 14:28:03 -07:00
parent 7393068417
commit 54ae55662c
4 changed files with 10 additions and 50 deletions

View File

@ -1,35 +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.plugins;
import org.elasticsearch.common.component.LifecycleComponent;
import org.elasticsearch.common.inject.Module;
import org.elasticsearch.common.settings.Settings;
import java.io.Closeable;
import java.util.Collection;
import java.util.Collections;
/**
* A base class for a plugin which returns no services or modules.
*/
public abstract class AbstractPlugin extends Plugin {
}

View File

@ -25,7 +25,7 @@ import org.elasticsearch.index.store.IndexStoreModule;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;
public class PluginsServiceTests extends ESTestCase { public class PluginsServiceTests extends ESTestCase {
public static class AdditionalSettingsPlugin1 extends AbstractPlugin { public static class AdditionalSettingsPlugin1 extends Plugin {
@Override @Override
public String name() { public String name() {
return "additional-settings1"; return "additional-settings1";
@ -39,7 +39,7 @@ public class PluginsServiceTests extends ESTestCase {
return Settings.builder().put("foo.bar", "1").put(IndexStoreModule.STORE_TYPE, IndexStoreModule.Type.MMAPFS.getSettingsKey()).build(); return Settings.builder().put("foo.bar", "1").put(IndexStoreModule.STORE_TYPE, IndexStoreModule.Type.MMAPFS.getSettingsKey()).build();
} }
} }
public static class AdditionalSettingsPlugin2 extends AbstractPlugin { public static class AdditionalSettingsPlugin2 extends Plugin {
@Override @Override
public String name() { public String name() {
return "additional-settings2"; return "additional-settings2";

View File

@ -20,7 +20,6 @@
package org.elasticsearch.snapshots.mockstore; package org.elasticsearch.snapshots.mockstore;
import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterService;
import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.metadata.SnapshotId; import org.elasticsearch.cluster.metadata.SnapshotId;
@ -37,7 +36,6 @@ import org.elasticsearch.common.settings.SettingsFilter;
import org.elasticsearch.env.Environment; import org.elasticsearch.env.Environment;
import org.elasticsearch.index.snapshots.IndexShardRepository; import org.elasticsearch.index.snapshots.IndexShardRepository;
import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository;
import org.elasticsearch.plugins.AbstractPlugin;
import org.elasticsearch.repositories.RepositoriesModule; import org.elasticsearch.repositories.RepositoriesModule;
import org.elasticsearch.repositories.RepositoryName; import org.elasticsearch.repositories.RepositoryName;
import org.elasticsearch.repositories.RepositorySettings; import org.elasticsearch.repositories.RepositorySettings;
@ -50,8 +48,6 @@ import java.io.UnsupportedEncodingException;
import java.nio.file.Path; import java.nio.file.Path;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@ -64,7 +60,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
public class MockRepository extends FsRepository { public class MockRepository extends FsRepository {
public static class Plugin extends AbstractPlugin { public static class Plugin extends org.elasticsearch.plugins.Plugin {
@Override @Override
public String name() { public String name() {
@ -81,10 +77,8 @@ public class MockRepository extends FsRepository {
} }
@Override @Override
public Collection<Class<? extends Module>> modules() { public Collection<Module> nodeModules() {
Collection<Class<? extends Module>> modules = new ArrayList<>(); return Collections.<Module>singletonList(new SettingsFilteringModule());
modules.add(SettingsFilteringModule.class);
return modules;
} }
public static class SettingsFilteringModule extends AbstractModule { public static class SettingsFilteringModule extends AbstractModule {

View File

@ -20,12 +20,13 @@
package org.elasticsearch.plugin.mapper; package org.elasticsearch.plugin.mapper;
import org.elasticsearch.common.inject.Module; import org.elasticsearch.common.inject.Module;
import org.elasticsearch.plugins.AbstractPlugin; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.Plugin;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
public class MapperMurmur3Plugin extends AbstractPlugin { public class MapperMurmur3Plugin extends Plugin {
@Override @Override
public String name() { public String name() {
@ -38,8 +39,8 @@ public class MapperMurmur3Plugin extends AbstractPlugin {
} }
@Override @Override
public Collection<Class<? extends Module>> indexModules() { public Collection<Module> indexModules(Settings settings) {
return Collections.<Class<? extends Module>>singleton(MapperMurmur3IndexModule.class); return Collections.<Module>singletonList(new MapperMurmur3IndexModule());
} }
} }