Disable CCR REST endpoints if CCR disabled (#33619)

This commit avoids enabling the CCR REST endpoints if CCR is disabled.
This commit is contained in:
Jason Tedor 2018-09-12 01:54:34 -04:00 committed by GitHub
parent dcdacd2f3f
commit 20476b9e06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -163,6 +163,10 @@ public class Ccr extends Plugin implements ActionPlugin, PersistentTaskPlugin, E
IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter,
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<DiscoveryNodes> nodesInCluster) {
if (enabled == false) {
return emptyList();
}
return Arrays.asList(
// stats API
new RestCcrStatsAction(settings, restController),
@ -228,10 +232,7 @@ public class Ccr extends Plugin implements ActionPlugin, PersistentTaskPlugin, E
return Collections.emptyList();
}
FixedExecutorBuilder ccrTp = new FixedExecutorBuilder(settings, CCR_THREAD_POOL_NAME,
32, 100, "xpack.ccr.ccr_thread_pool");
return Collections.singletonList(ccrTp);
return Collections.singletonList(new FixedExecutorBuilder(settings, CCR_THREAD_POOL_NAME, 32, 100, "xpack.ccr.ccr_thread_pool"));
}
protected XPackLicenseState getLicenseState() { return XPackPlugin.getSharedLicenseState(); }