From e9d36379eedd1bbe9f11bc3e0512f87a8c808b58 Mon Sep 17 00:00:00 2001 From: Joshua Palis Date: Tue, 12 Sep 2023 14:07:32 -0700 Subject: [PATCH] Revert "Converts .opendistro-job-scheduler-lock index into a system index (#474) (#478)" (#494) This reverts commit 9107d411d7216fbfc1fa736805f5f060fcd1bb48. --- .../jobscheduler/spi/utils/LockService.java | 2 +- .../opensearch/jobscheduler/JobSchedulerPlugin.java | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/spi/src/main/java/org/opensearch/jobscheduler/spi/utils/LockService.java b/spi/src/main/java/org/opensearch/jobscheduler/spi/utils/LockService.java index 7651f7a0..0ddd4a79 100644 --- a/spi/src/main/java/org/opensearch/jobscheduler/spi/utils/LockService.java +++ b/spi/src/main/java/org/opensearch/jobscheduler/spi/utils/LockService.java @@ -44,7 +44,7 @@ public final class LockService { private static final Logger logger = LogManager.getLogger(LockService.class); - public static final String LOCK_INDEX_NAME = ".opendistro-job-scheduler-lock"; + private static final String LOCK_INDEX_NAME = ".opendistro-job-scheduler-lock"; private final Client client; private final ClusterService clusterService; diff --git a/src/main/java/org/opensearch/jobscheduler/JobSchedulerPlugin.java b/src/main/java/org/opensearch/jobscheduler/JobSchedulerPlugin.java index 96d7eddc..f99b8897 100644 --- a/src/main/java/org/opensearch/jobscheduler/JobSchedulerPlugin.java +++ b/src/main/java/org/opensearch/jobscheduler/JobSchedulerPlugin.java @@ -37,12 +37,10 @@ import org.opensearch.env.Environment; import org.opensearch.env.NodeEnvironment; import org.opensearch.index.IndexModule; -import org.opensearch.indices.SystemIndexDescriptor; import org.opensearch.jobscheduler.utils.JobDetailsService; import org.opensearch.plugins.ActionPlugin; import org.opensearch.plugins.ExtensiblePlugin; import org.opensearch.plugins.Plugin; -import org.opensearch.plugins.SystemIndexPlugin; import org.opensearch.repositories.RepositoriesService; import org.opensearch.rest.RestController; import org.opensearch.script.ScriptService; @@ -63,7 +61,7 @@ import com.google.common.collect.ImmutableList; -public class JobSchedulerPlugin extends Plugin implements ActionPlugin, ExtensiblePlugin, SystemIndexPlugin { +public class JobSchedulerPlugin extends Plugin implements ActionPlugin, ExtensiblePlugin { public static final String OPEN_DISTRO_JOB_SCHEDULER_THREAD_POOL_NAME = "open_distro_job_scheduler"; public static final String JS_BASE_URI = "/_plugins/_job_scheduler"; @@ -83,13 +81,6 @@ public JobSchedulerPlugin() { this.indexToJobProviders = new HashMap<>(); } - @Override - public Collection getSystemIndexDescriptors(Settings settings) { - return Collections.singletonList( - new SystemIndexDescriptor(LockService.LOCK_INDEX_NAME, "Stores lock documents used for plugin job execution") - ); - } - @Override public Collection createComponents( Client client,