Enable searchable snapshots in release builds (#62201)

Enables searchable snapshot functionality not only in snapshot, but also release builds.
This commit is contained in:
Yannick Welsch 2020-09-10 11:06:29 +02:00
parent 969a1c558b
commit e3feafc1e9
13 changed files with 68 additions and 185 deletions

View File

@ -54,7 +54,6 @@ testClusters.integTest {
setting 'indices.lifecycle.history_index_enabled', 'false' setting 'indices.lifecycle.history_index_enabled', 'false'
if (BuildParams.isSnapshotBuild() == false) { if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.autoscaling_feature_flag_registered', 'true' systemProperty 'es.autoscaling_feature_flag_registered', 'true'
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
} }
setting 'xpack.autoscaling.enabled', 'true' setting 'xpack.autoscaling.enabled', 'true'
setting 'xpack.eql.enabled', 'true' setting 'xpack.eql.enabled', 'true'

View File

@ -172,9 +172,6 @@ testClusters.all {
extraConfigFile nodeKey.name, nodeKey extraConfigFile nodeKey.name, nodeKey
extraConfigFile nodeCert.name, nodeCert extraConfigFile nodeCert.name, nodeCert
extraConfigFile 'roles.yml', file('src/test/resources/roles.yml') extraConfigFile 'roles.yml', file('src/test/resources/roles.yml')
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
} }

View File

@ -5,37 +5,18 @@
*/ */
package org.elasticsearch.xpack.searchablesnapshots; package org.elasticsearch.xpack.searchablesnapshots;
import org.elasticsearch.Build;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit; import org.elasticsearch.common.unit.ByteSizeUnit;
import static org.elasticsearch.index.IndexModule.INDEX_STORE_TYPE_SETTING; import static org.elasticsearch.index.IndexModule.INDEX_STORE_TYPE_SETTING;
public class SearchableSnapshotsConstants { public class SearchableSnapshotsConstants {
public static final boolean SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED;
static {
final String property = System.getProperty("es.searchable_snapshots_feature_enabled");
if ("true".equals(property)) {
SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED = true;
} else if ("false".equals(property)) {
SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED = false;
} else if (property == null) {
SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED = Build.CURRENT.isSnapshot();
} else {
throw new IllegalArgumentException(
"expected es.searchable_snapshots_feature_enabled to be unset or [true|false] but was [" + property + "]"
);
}
}
public static final String SNAPSHOT_DIRECTORY_FACTORY_KEY = "snapshot"; public static final String SNAPSHOT_DIRECTORY_FACTORY_KEY = "snapshot";
public static final String SNAPSHOT_RECOVERY_STATE_FACTORY_KEY = "snapshot_prewarm"; public static final String SNAPSHOT_RECOVERY_STATE_FACTORY_KEY = "snapshot_prewarm";
public static boolean isSearchableSnapshotStore(Settings indexSettings) { public static boolean isSearchableSnapshotStore(Settings indexSettings) {
return SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED return SNAPSHOT_DIRECTORY_FACTORY_KEY.equals(INDEX_STORE_TYPE_SETTING.get(indexSettings));
&& SNAPSHOT_DIRECTORY_FACTORY_KEY.equals(INDEX_STORE_TYPE_SETTING.get(indexSettings));
} }
public static final String CACHE_FETCH_ASYNC_THREAD_POOL_NAME = "searchable_snapshots_cache_fetch_async"; public static final String CACHE_FETCH_ASYNC_THREAD_POOL_NAME = "searchable_snapshots_cache_fetch_async";

View File

@ -1,5 +1,3 @@
import org.elasticsearch.gradle.info.BuildParams
apply plugin: 'elasticsearch.java-rest-test' apply plugin: 'elasticsearch.java-rest-test'
File repoDir = file("$buildDir/testclusters/repo") File repoDir = file("$buildDir/testclusters/repo")
@ -11,9 +9,6 @@ javaRestTest {
testClusters.javaRestTest { testClusters.javaRestTest {
testDistribution = 'DEFAULT' testDistribution = 'DEFAULT'
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
numberOfNodes = 4 numberOfNodes = 4
setting 'path.repo', repoDir.absolutePath setting 'path.repo', repoDir.absolutePath

View File

@ -1,5 +1,3 @@
import org.elasticsearch.gradle.info.BuildParams
apply plugin: 'elasticsearch.yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-test'
restResources { restResources {
@ -14,9 +12,6 @@ restResources {
testClusters.all { testClusters.all {
testDistribution = 'DEFAULT' testDistribution = 'DEFAULT'
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
// Data streams is basic, but a few tests test data streams in combination with paid features // Data streams is basic, but a few tests test data streams in combination with paid features
setting 'xpack.license.self_generated.type', 'trial' setting 'xpack.license.self_generated.type', 'trial'
// disable ILM history, since it disturbs tests using _all // disable ILM history, since it disturbs tests using _all

View File

@ -1,6 +1,3 @@
import org.elasticsearch.gradle.test.RestIntegTestTask
import org.elasticsearch.gradle.info.BuildParams
apply plugin: 'elasticsearch.java-rest-test' apply plugin: 'elasticsearch.java-rest-test'
dependencies { dependencies {
@ -16,9 +13,6 @@ javaRestTest {
testClusters.all { testClusters.all {
testDistribution = 'DEFAULT' testDistribution = 'DEFAULT'
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
numberOfNodes = 4 numberOfNodes = 4
setting 'path.repo', repoDir.absolutePath setting 'path.repo', repoDir.absolutePath

View File

@ -1,5 +1,3 @@
import org.elasticsearch.gradle.info.BuildParams
apply plugin: 'elasticsearch.internal-cluster-test' apply plugin: 'elasticsearch.internal-cluster-test'
apply plugin: 'elasticsearch.esplugin' apply plugin: 'elasticsearch.esplugin'
esplugin { esplugin {
@ -39,10 +37,3 @@ def testJar = tasks.register("testJar", Jar) {
artifacts { artifacts {
testArtifacts testJar testArtifacts testJar
} }
internalClusterTest {
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
}

View File

@ -51,10 +51,6 @@ testClusters.integTest {
testDistribution = 'DEFAULT' testDistribution = 'DEFAULT'
plugin repositoryPlugin.path plugin repositoryPlugin.path
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
keystore 'azure.client.searchable_snapshots.account', azureAccount keystore 'azure.client.searchable_snapshots.account', azureAccount
if (azureKey != null && azureKey.isEmpty() == false) { if (azureKey != null && azureKey.isEmpty() == false) {
keystore 'azure.client.searchable_snapshots.key', azureKey keystore 'azure.client.searchable_snapshots.key', azureKey

View File

@ -95,10 +95,6 @@ testClusters.integTest {
testDistribution = 'DEFAULT' testDistribution = 'DEFAULT'
plugin repositoryPlugin.path plugin repositoryPlugin.path
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
keystore 'gcs.client.searchable_snapshots.credentials_file', serviceAccountFile, IGNORE_VALUE keystore 'gcs.client.searchable_snapshots.credentials_file', serviceAccountFile, IGNORE_VALUE
if (useFixture) { if (useFixture) {
tasks.integTest.dependsOn createServiceAccountFile tasks.integTest.dependsOn createServiceAccountFile

View File

@ -1,4 +1,3 @@
import org.elasticsearch.gradle.info.BuildParams
import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE
apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.standalone-rest-test'
@ -37,10 +36,6 @@ testClusters.integTest {
testDistribution = 'DEFAULT' testDistribution = 'DEFAULT'
plugin repositoryPlugin.path plugin repositoryPlugin.path
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
keystore 's3.client.searchable_snapshots.access_key', 'access_key' keystore 's3.client.searchable_snapshots.access_key', 'access_key'
keystore 's3.client.searchable_snapshots.secret_key', 'secret_key' keystore 's3.client.searchable_snapshots.secret_key', 'secret_key'
setting 'xpack.license.self_generated.type', 'trial' setting 'xpack.license.self_generated.type', 'trial'

View File

@ -1,5 +1,3 @@
import org.elasticsearch.gradle.info.BuildParams
apply plugin: 'elasticsearch.testclusters' apply plugin: 'elasticsearch.testclusters'
apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-test'
@ -17,9 +15,6 @@ integTest {
testClusters.integTest { testClusters.integTest {
testDistribution = 'DEFAULT' testDistribution = 'DEFAULT'
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
setting 'path.repo', repoDir.absolutePath setting 'path.repo', repoDir.absolutePath
setting 'xpack.license.self_generated.type', 'trial' setting 'xpack.license.self_generated.type', 'trial'
} }

View File

@ -51,10 +51,6 @@ testClusters.integTest {
testDistribution = 'DEFAULT' testDistribution = 'DEFAULT'
plugin repositoryPlugin.path plugin repositoryPlugin.path
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
keystore 's3.client.searchable_snapshots.access_key', s3AccessKey keystore 's3.client.searchable_snapshots.access_key', s3AccessKey
keystore 's3.client.searchable_snapshots.secret_key', s3SecretKey keystore 's3.client.searchable_snapshots.secret_key', s3SecretKey
setting 'xpack.license.self_generated.type', 'trial' setting 'xpack.license.self_generated.type', 'trial'

View File

@ -82,7 +82,6 @@ import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsCon
import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.CACHE_FETCH_ASYNC_THREAD_POOL_SETTING; import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.CACHE_FETCH_ASYNC_THREAD_POOL_SETTING;
import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.CACHE_PREWARMING_THREAD_POOL_NAME; import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.CACHE_PREWARMING_THREAD_POOL_NAME;
import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.CACHE_PREWARMING_THREAD_POOL_SETTING; import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.CACHE_PREWARMING_THREAD_POOL_SETTING;
import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED;
import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.SNAPSHOT_BLOB_CACHE_INDEX; import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.SNAPSHOT_BLOB_CACHE_INDEX;
import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.SNAPSHOT_DIRECTORY_FACTORY_KEY; import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.SNAPSHOT_DIRECTORY_FACTORY_KEY;
import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.SNAPSHOT_RECOVERY_STATE_FACTORY_KEY; import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.SNAPSHOT_RECOVERY_STATE_FACTORY_KEY;
@ -173,23 +172,19 @@ public class SearchableSnapshots extends Plugin implements IndexStorePlugin, Eng
@Override @Override
public List<Setting<?>> getSettings() { public List<Setting<?>> getSettings() {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { return org.elasticsearch.common.collect.List.of(
return org.elasticsearch.common.collect.List.of( SNAPSHOT_REPOSITORY_SETTING,
SNAPSHOT_REPOSITORY_SETTING, SNAPSHOT_SNAPSHOT_NAME_SETTING,
SNAPSHOT_SNAPSHOT_NAME_SETTING, SNAPSHOT_SNAPSHOT_ID_SETTING,
SNAPSHOT_SNAPSHOT_ID_SETTING, SNAPSHOT_INDEX_NAME_SETTING,
SNAPSHOT_INDEX_NAME_SETTING, SNAPSHOT_INDEX_ID_SETTING,
SNAPSHOT_INDEX_ID_SETTING, SNAPSHOT_CACHE_ENABLED_SETTING,
SNAPSHOT_CACHE_ENABLED_SETTING, SNAPSHOT_CACHE_PREWARM_ENABLED_SETTING,
SNAPSHOT_CACHE_PREWARM_ENABLED_SETTING, SNAPSHOT_CACHE_EXCLUDED_FILE_TYPES_SETTING,
SNAPSHOT_CACHE_EXCLUDED_FILE_TYPES_SETTING, SNAPSHOT_UNCACHED_CHUNK_SIZE_SETTING,
SNAPSHOT_UNCACHED_CHUNK_SIZE_SETTING, CacheService.SNAPSHOT_CACHE_SIZE_SETTING,
CacheService.SNAPSHOT_CACHE_SIZE_SETTING, CacheService.SNAPSHOT_CACHE_RANGE_SIZE_SETTING
CacheService.SNAPSHOT_CACHE_RANGE_SIZE_SETTING );
);
} else {
return org.elasticsearch.common.collect.List.of();
}
} }
@Override @Override
@ -206,42 +201,28 @@ public class SearchableSnapshots extends Plugin implements IndexStorePlugin, Eng
final IndexNameExpressionResolver resolver, final IndexNameExpressionResolver resolver,
final Supplier<RepositoriesService> repositoriesServiceSupplier final Supplier<RepositoriesService> repositoriesServiceSupplier
) { ) {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { final CacheService cacheService = new CacheService(new NodeEnvironmentCacheCleaner(nodeEnvironment), settings);
final CacheService cacheService = new CacheService(new NodeEnvironmentCacheCleaner(nodeEnvironment), settings); this.cacheService.set(cacheService);
this.cacheService.set(cacheService); this.repositoriesServiceSupplier = repositoriesServiceSupplier;
this.repositoriesServiceSupplier = repositoriesServiceSupplier; this.threadPool.set(threadPool);
this.threadPool.set(threadPool); final BlobStoreCacheService blobStoreCacheService = new BlobStoreCacheService(
final BlobStoreCacheService blobStoreCacheService = new BlobStoreCacheService( clusterService,
clusterService, threadPool,
threadPool, client,
client, SNAPSHOT_BLOB_CACHE_INDEX
SNAPSHOT_BLOB_CACHE_INDEX );
); this.blobStoreCacheService.set(blobStoreCacheService);
this.blobStoreCacheService.set(blobStoreCacheService); this.failShardsListener.set(new FailShardsOnInvalidLicenseClusterListener(getLicenseState(), clusterService.getRerouteService()));
this.failShardsListener.set( return org.elasticsearch.common.collect.List.of(cacheService, blobStoreCacheService);
new FailShardsOnInvalidLicenseClusterListener(getLicenseState(), clusterService.getRerouteService())
);
return org.elasticsearch.common.collect.List.of(cacheService, blobStoreCacheService);
} else {
this.repositoriesServiceSupplier = () -> {
assert false : "searchable snapshots are disabled";
return null;
};
return org.elasticsearch.common.collect.List.of();
}
} }
@Override @Override
public Collection<Module> createGuiceModules() { public Collection<Module> createGuiceModules() {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { if (transportClientMode) {
if (transportClientMode) { return Collections.emptyList();
return Collections.emptyList();
}
return Collections.singleton(b -> XPackPlugin.bindFeatureSet(b, SearchableSnapshotsFeatureSet.class));
} else {
return org.elasticsearch.common.collect.List.of();
} }
return Collections.singleton(b -> XPackPlugin.bindFeatureSet(b, SearchableSnapshotsFeatureSet.class));
} }
@Override @Override
@ -261,29 +242,25 @@ public class SearchableSnapshots extends Plugin implements IndexStorePlugin, Eng
@Override @Override
public Map<String, DirectoryFactory> getDirectoryFactories() { public Map<String, DirectoryFactory> getDirectoryFactories() {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { return org.elasticsearch.common.collect.Map.of(SNAPSHOT_DIRECTORY_FACTORY_KEY, (indexSettings, shardPath) -> {
return org.elasticsearch.common.collect.Map.of(SNAPSHOT_DIRECTORY_FACTORY_KEY, (indexSettings, shardPath) -> { final RepositoriesService repositories = repositoriesServiceSupplier.get();
final RepositoriesService repositories = repositoriesServiceSupplier.get(); assert repositories != null;
assert repositories != null; final CacheService cache = cacheService.get();
final CacheService cache = cacheService.get(); assert cache != null;
assert cache != null; final ThreadPool threadPool = this.threadPool.get();
final ThreadPool threadPool = this.threadPool.get(); assert threadPool != null;
assert threadPool != null; final BlobStoreCacheService blobCache = blobStoreCacheService.get();
final BlobStoreCacheService blobCache = blobStoreCacheService.get(); assert blobCache != null;
assert blobCache != null; return SearchableSnapshotDirectory.create(
return SearchableSnapshotDirectory.create( repositories,
repositories, cache,
cache, indexSettings,
indexSettings, shardPath,
shardPath, System::nanoTime,
System::nanoTime, threadPool,
threadPool, blobCache
blobCache );
); });
});
} else {
return org.elasticsearch.common.collect.Map.of();
}
} }
@Override @Override
@ -299,16 +276,12 @@ public class SearchableSnapshots extends Plugin implements IndexStorePlugin, Eng
@Override @Override
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() { public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { return org.elasticsearch.common.collect.List.of(
return org.elasticsearch.common.collect.List.of( new ActionHandler<>(SearchableSnapshotsStatsAction.INSTANCE, TransportSearchableSnapshotsStatsAction.class),
new ActionHandler<>(SearchableSnapshotsStatsAction.INSTANCE, TransportSearchableSnapshotsStatsAction.class), new ActionHandler<>(ClearSearchableSnapshotsCacheAction.INSTANCE, TransportClearSearchableSnapshotsCacheAction.class),
new ActionHandler<>(ClearSearchableSnapshotsCacheAction.INSTANCE, TransportClearSearchableSnapshotsCacheAction.class), new ActionHandler<>(MountSearchableSnapshotAction.INSTANCE, TransportMountSearchableSnapshotAction.class),
new ActionHandler<>(MountSearchableSnapshotAction.INSTANCE, TransportMountSearchableSnapshotAction.class), new ActionHandler<>(RepositoryStatsAction.INSTANCE, TransportRepositoryStatsAction.class)
new ActionHandler<>(RepositoryStatsAction.INSTANCE, TransportRepositoryStatsAction.class) );
);
} else {
return org.elasticsearch.common.collect.List.of();
}
} }
public List<RestHandler> getRestHandlers( public List<RestHandler> getRestHandlers(
@ -320,25 +293,17 @@ public class SearchableSnapshots extends Plugin implements IndexStorePlugin, Eng
IndexNameExpressionResolver indexNameExpressionResolver, IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<DiscoveryNodes> nodesInCluster Supplier<DiscoveryNodes> nodesInCluster
) { ) {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { return org.elasticsearch.common.collect.List.of(
return org.elasticsearch.common.collect.List.of( new RestSearchableSnapshotsStatsAction(),
new RestSearchableSnapshotsStatsAction(), new RestClearSearchableSnapshotsCacheAction(),
new RestClearSearchableSnapshotsCacheAction(), new RestMountSearchableSnapshotAction(),
new RestMountSearchableSnapshotAction(), new RestRepositoryStatsAction()
new RestRepositoryStatsAction() );
);
} else {
return org.elasticsearch.common.collect.List.of();
}
} }
@Override @Override
public Map<String, ExistingShardsAllocator> getExistingShardsAllocators() { public Map<String, ExistingShardsAllocator> getExistingShardsAllocators() {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { return org.elasticsearch.common.collect.Map.of(SearchableSnapshotAllocator.ALLOCATOR_NAME, new SearchableSnapshotAllocator());
return Collections.singletonMap(SearchableSnapshotAllocator.ALLOCATOR_NAME, new SearchableSnapshotAllocator());
} else {
return Collections.emptyMap();
}
} }
// overridable by tests // overridable by tests
@ -348,30 +313,18 @@ public class SearchableSnapshots extends Plugin implements IndexStorePlugin, Eng
@Override @Override
public Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings) { public Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings) {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { return org.elasticsearch.common.collect.List.of(
return org.elasticsearch.common.collect.List.of( new SearchableSnapshotAllocationDecider(() -> getLicenseState().isAllowed(XPackLicenseState.Feature.SEARCHABLE_SNAPSHOTS))
new SearchableSnapshotAllocationDecider(() -> getLicenseState().isAllowed(XPackLicenseState.Feature.SEARCHABLE_SNAPSHOTS)) );
);
} else {
return Collections.emptyList();
}
} }
public List<ExecutorBuilder<?>> getExecutorBuilders(Settings settings) { public List<ExecutorBuilder<?>> getExecutorBuilders(Settings settings) {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { return org.elasticsearch.common.collect.List.of(executorBuilders());
return org.elasticsearch.common.collect.List.of(executorBuilders());
} else {
return org.elasticsearch.common.collect.List.of();
}
} }
@Override @Override
public Map<String, RecoveryStateFactory> getRecoveryStateFactories() { public Map<String, RecoveryStateFactory> getRecoveryStateFactories() {
if (SEARCHABLE_SNAPSHOTS_FEATURE_ENABLED) { return Collections.singletonMap(SNAPSHOT_RECOVERY_STATE_FACTORY_KEY, SearchableSnapshotRecoveryState::new);
return Collections.singletonMap(SNAPSHOT_RECOVERY_STATE_FACTORY_KEY, SearchableSnapshotRecoveryState::new);
} else {
return Collections.emptyMap();
}
} }
public static ScalingExecutorBuilder[] executorBuilders() { public static ScalingExecutorBuilder[] executorBuilders() {