Skip to content

Commit

Permalink
Inline no-op IndicesModule#getEngineFactories
Browse files Browse the repository at this point in the history
This method was introduced in elastic#31183 but it has no effect and is never
overridden so this commit removes it.
  • Loading branch information
DaveCTurner committed Jul 6, 2020
1 parent 4a43b03 commit af4db01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@
import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.engine.EngineFactory;
import org.elasticsearch.index.mapper.BinaryFieldMapper;
import org.elasticsearch.index.mapper.BooleanFieldMapper;
import org.elasticsearch.index.mapper.CompletionFieldMapper;
import org.elasticsearch.index.mapper.TimestampFieldMapper;
import org.elasticsearch.index.mapper.DateFieldMapper;
import org.elasticsearch.index.mapper.FieldAliasMapper;
import org.elasticsearch.index.mapper.FieldNamesFieldMapper;
Expand All @@ -54,6 +51,7 @@
import org.elasticsearch.index.mapper.SeqNoFieldMapper;
import org.elasticsearch.index.mapper.SourceFieldMapper;
import org.elasticsearch.index.mapper.TextFieldMapper;
import org.elasticsearch.index.mapper.TimestampFieldMapper;
import org.elasticsearch.index.mapper.TypeFieldMapper;
import org.elasticsearch.index.mapper.VersionFieldMapper;
import org.elasticsearch.index.seqno.RetentionLeaseBackgroundSyncAction;
Expand All @@ -66,12 +64,10 @@
import org.elasticsearch.plugins.MapperPlugin;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Predicate;
Expand Down Expand Up @@ -254,8 +250,4 @@ public MapperRegistry getMapperRegistry() {
return mapperRegistry;
}

public Collection<Function<IndexSettings, Optional<EngineFactory>>> getEngineFactories() {
return Collections.emptyList();
}

}
6 changes: 2 additions & 4 deletions server/src/main/java/org/elasticsearch/node/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,8 @@ protected Node(final Environment initialEnvironment,
// collect engine factory providers from server and from plugins
final Collection<EnginePlugin> enginePlugins = pluginsService.filterPlugins(EnginePlugin.class);
final Collection<Function<IndexSettings, Optional<EngineFactory>>> engineFactoryProviders =
Stream.concat(
indicesModule.getEngineFactories().stream(),
enginePlugins.stream().map(plugin -> plugin::getEngineFactory))
.collect(Collectors.toList());
enginePlugins.stream().map(plugin -> (Function<IndexSettings, Optional<EngineFactory>>)plugin::getEngineFactory)
.collect(Collectors.toList());


final Map<String, IndexStorePlugin.DirectoryFactory> indexStoreFactories =
Expand Down

0 comments on commit af4db01

Please sign in to comment.