Skip to content

Commit

Permalink
Remove clusterPlugin
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Nov 8, 2024
1 parent 68c4100 commit 6e1ef20
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ext {

licenseHeaders.enabled = true
testingConventions.enabled = false
forbiddenApis.ignoreFailures = true
forbiddenApis.ignoreFailures = false

dependencyLicenses.enabled = false
thirdPartyAudit.enabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package org.opensearch.jobscheduler;

import org.opensearch.action.ActionRequest;
import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodes;
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Settings;
Expand Down Expand Up @@ -46,7 +45,6 @@
import org.opensearch.jobscheduler.transport.schedule.TransportGetScheduleAction;
import org.opensearch.jobscheduler.utils.JobDetailsService;
import org.opensearch.plugins.ActionPlugin;
import org.opensearch.plugins.ClusterPlugin;
import org.opensearch.plugins.ExtensiblePlugin;
import org.opensearch.plugins.Plugin;
import org.opensearch.plugins.SystemIndexPlugin;
Expand All @@ -71,7 +69,7 @@

import com.google.common.collect.ImmutableList;

public class JobSchedulerPlugin extends Plugin implements ActionPlugin, ExtensiblePlugin, SystemIndexPlugin, ClusterPlugin {
public class JobSchedulerPlugin extends Plugin implements ActionPlugin, ExtensiblePlugin, SystemIndexPlugin {

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";
Expand Down Expand Up @@ -268,9 +266,4 @@ public List getRestHandlers(
return Arrays.asList(new ActionHandler<>(GetScheduleAction.INSTANCE, TransportGetScheduleAction.class));
}

@Override
public void onNodeStarted(DiscoveryNode localNode) {
sweeper.afterStart();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,6 @@ void initBackgroundSweep() {
this.fullSweepExecutor.submit(this::sweepAllJobIndices);
}
};
Runnable sweepOnStartup = () -> { this.fullSweepExecutor.submit(this::sweepAllJobIndices); };
// Sweep on startup
if (this.threadPool.generic() != null) {
this.threadPool.generic().submit(sweepOnStartup);
}
this.scheduledFullSweep = this.threadPool.scheduleWithFixedDelay(scheduledSweep, sweepPeriod, ThreadPool.Names.SAME);
}

Expand Down

0 comments on commit 6e1ef20

Please sign in to comment.