diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/PrelertPlugin.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/PrelertPlugin.java index 456bf3a61e4..1bd36d35d49 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/PrelertPlugin.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/PrelertPlugin.java @@ -72,11 +72,11 @@ import org.elasticsearch.xpack.prelert.job.process.autodetect.BlackHoleAutodetec import org.elasticsearch.xpack.prelert.job.process.autodetect.NativeAutodetectProcessFactory; import org.elasticsearch.xpack.prelert.job.process.autodetect.output.AutodetectResultsParser; import org.elasticsearch.xpack.prelert.job.process.normalizer.NormalizerFactory; -import org.elasticsearch.xpack.prelert.job.scheduler.ScheduledJobRunner; +import org.elasticsearch.xpack.prelert.scheduler.ScheduledJobRunner; import org.elasticsearch.xpack.prelert.job.process.normalizer.NativeNormalizerProcessFactory; import org.elasticsearch.xpack.prelert.job.process.normalizer.MultiplyingNormalizerProcess; import org.elasticsearch.xpack.prelert.job.process.normalizer.NormalizerProcessFactory; -import org.elasticsearch.xpack.prelert.job.scheduler.http.HttpDataExtractorFactory; +import org.elasticsearch.xpack.prelert.scheduler.http.HttpDataExtractorFactory; import org.elasticsearch.xpack.prelert.job.status.StatusReporter; import org.elasticsearch.xpack.prelert.job.usage.UsageReporter; import org.elasticsearch.xpack.prelert.rest.job.RestCloseJobAction; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/DeleteSchedulerAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/DeleteSchedulerAction.java index 8b59d47c27d..d584d647b4f 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/DeleteSchedulerAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/DeleteSchedulerAction.java @@ -29,7 +29,7 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; import org.elasticsearch.xpack.prelert.utils.ExceptionsHelper; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/GetJobsAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/GetJobsAction.java index 08106cdbf73..0bc1a632f1c 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/GetJobsAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/GetJobsAction.java @@ -39,7 +39,7 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; import org.elasticsearch.xpack.prelert.job.DataCounts; import org.elasticsearch.xpack.prelert.job.Job; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.JobStatus; import org.elasticsearch.xpack.prelert.job.ModelSizeStats; import org.elasticsearch.xpack.prelert.job.manager.AutodetectProcessManager; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/PutSchedulerAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/PutSchedulerAction.java index 0753df8229f..bc662aaad33 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/PutSchedulerAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/PutSchedulerAction.java @@ -31,7 +31,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; import java.io.IOException; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/StartSchedulerAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/StartSchedulerAction.java index 66007d2cb86..842b116a719 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/StartSchedulerAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/StartSchedulerAction.java @@ -30,8 +30,8 @@ import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.scheduler.ScheduledJobRunner; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.ScheduledJobRunner; import org.elasticsearch.xpack.prelert.utils.ExceptionsHelper; import java.io.IOException; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/StopSchedulerAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/StopSchedulerAction.java index 1bcb53f1c9e..4a2030a3879 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/StopSchedulerAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/StopSchedulerAction.java @@ -33,11 +33,11 @@ import org.elasticsearch.rest.RestStatus; import org.elasticsearch.tasks.TaskInfo; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.messages.Messages; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.metadata.Scheduler; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.Scheduler; import org.elasticsearch.xpack.prelert.utils.ExceptionsHelper; import org.elasticsearch.xpack.prelert.utils.SchedulerStatusObserver; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/UpdateSchedulerStatusAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/UpdateSchedulerStatusAction.java index d1e359a76f0..cdf595bdd63 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/UpdateSchedulerStatusAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/action/UpdateSchedulerStatusAction.java @@ -25,8 +25,8 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.manager.JobManager; import org.elasticsearch.xpack.prelert.utils.ExceptionsHelper; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/extraction/DataExtractorFactory.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/extraction/DataExtractorFactory.java index 95b7dc7a742..585bad4a988 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/extraction/DataExtractorFactory.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/extraction/DataExtractorFactory.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.prelert.job.extraction; import org.elasticsearch.xpack.prelert.job.Job; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; public interface DataExtractorFactory { DataExtractor newExtractor(SchedulerConfig schedulerConfig, Job job); diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/manager/JobManager.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/manager/JobManager.java index a0eb136ae1b..b4262ec0f93 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/manager/JobManager.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/manager/JobManager.java @@ -25,12 +25,11 @@ import org.elasticsearch.xpack.prelert.job.IgnoreDowntime; import org.elasticsearch.xpack.prelert.job.Job; import org.elasticsearch.xpack.prelert.job.JobStatus; import org.elasticsearch.xpack.prelert.job.ModelSnapshot; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.audit.Auditor; import org.elasticsearch.xpack.prelert.job.messages.Messages; import org.elasticsearch.xpack.prelert.job.metadata.Allocation; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; -import org.elasticsearch.xpack.prelert.job.metadata.Scheduler; import org.elasticsearch.xpack.prelert.job.persistence.JobProvider; import org.elasticsearch.xpack.prelert.job.persistence.JobResultsPersister; import org.elasticsearch.xpack.prelert.job.persistence.QueryPage; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/metadata/PrelertMetadata.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/metadata/PrelertMetadata.java index 8ef4c4420a8..197d1d629f0 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/metadata/PrelertMetadata.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/metadata/PrelertMetadata.java @@ -23,10 +23,11 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.xpack.prelert.job.Job; import org.elasticsearch.xpack.prelert.job.JobStatus; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.Scheduler; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.messages.Messages; -import org.elasticsearch.xpack.prelert.job.scheduler.ScheduledJobValidator; +import org.elasticsearch.xpack.prelert.scheduler.ScheduledJobValidator; import org.elasticsearch.xpack.prelert.utils.ExceptionsHelper; import java.io.IOException; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/process/autodetect/writer/AggregatedJsonRecordReader.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/process/autodetect/writer/AggregatedJsonRecordReader.java index 51dd68c69c8..b23c8cdeeb7 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/process/autodetect/writer/AggregatedJsonRecordReader.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/process/autodetect/writer/AggregatedJsonRecordReader.java @@ -15,7 +15,7 @@ import org.apache.logging.log4j.Logger; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; /** * Reads highly hierarchical JSON structures. Currently very much geared to the diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/process/autodetect/writer/DataToProcessWriterFactory.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/process/autodetect/writer/DataToProcessWriterFactory.java index ce6b0a26301..6dc3fc8899c 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/process/autodetect/writer/DataToProcessWriterFactory.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/process/autodetect/writer/DataToProcessWriterFactory.java @@ -9,7 +9,6 @@ import org.apache.logging.log4j.Logger; import org.elasticsearch.xpack.prelert.job.AnalysisConfig; import org.elasticsearch.xpack.prelert.job.DataDescription; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; import org.elasticsearch.xpack.prelert.job.process.autodetect.AutodetectProcess; import org.elasticsearch.xpack.prelert.job.status.StatusReporter; import org.elasticsearch.xpack.prelert.job.transform.TransformConfigs; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestDeleteSchedulerAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestDeleteSchedulerAction.java index 32d2efe8727..ac0c52bd559 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestDeleteSchedulerAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestDeleteSchedulerAction.java @@ -14,7 +14,7 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.prelert.PrelertPlugin; import org.elasticsearch.xpack.prelert.action.DeleteSchedulerAction; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; import java.io.IOException; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestPutSchedulerAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestPutSchedulerAction.java index f5a47dfacb2..7f3c5c9474c 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestPutSchedulerAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestPutSchedulerAction.java @@ -16,7 +16,7 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.prelert.PrelertPlugin; import org.elasticsearch.xpack.prelert.action.PutSchedulerAction; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; import java.io.IOException; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStartSchedulerAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStartSchedulerAction.java index 5a38e4f806b..fb9ab99cf0c 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStartSchedulerAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStartSchedulerAction.java @@ -26,11 +26,11 @@ import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.xpack.prelert.PrelertPlugin; import org.elasticsearch.xpack.prelert.action.StartSchedulerAction; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.messages.Messages; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; -import org.elasticsearch.xpack.prelert.job.scheduler.ScheduledJobRunner; +import org.elasticsearch.xpack.prelert.scheduler.ScheduledJobRunner; import org.elasticsearch.xpack.prelert.utils.SchedulerStatusObserver; import java.io.IOException; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStopSchedulerAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStopSchedulerAction.java index c4f2008331d..538466413b6 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStopSchedulerAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStopSchedulerAction.java @@ -15,7 +15,7 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.prelert.PrelertPlugin; import org.elasticsearch.xpack.prelert.action.StopSchedulerAction; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; import java.io.IOException; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ProblemTracker.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ProblemTracker.java similarity index 98% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ProblemTracker.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ProblemTracker.java index c7bc1afe815..6920017767f 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ProblemTracker.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ProblemTracker.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.xpack.prelert.job.audit.Auditor; import org.elasticsearch.xpack.prelert.job.messages.Messages; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJob.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJob.java similarity index 99% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJob.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJob.java index 1a65f53fc29..fdb55b6d416 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJob.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJob.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler; +package org.elasticsearch.xpack.prelert.scheduler; import org.apache.logging.log4j.Logger; import org.elasticsearch.client.Client; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobRunner.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobRunner.java similarity index 98% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobRunner.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobRunner.java index 98cd35426ca..45d0f96f654 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobRunner.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobRunner.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.ResourceNotFoundException; @@ -22,7 +22,6 @@ import org.elasticsearch.xpack.prelert.action.UpdateSchedulerStatusAction; import org.elasticsearch.xpack.prelert.job.DataCounts; import org.elasticsearch.xpack.prelert.job.Job; import org.elasticsearch.xpack.prelert.job.JobStatus; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.audit.Auditor; import org.elasticsearch.xpack.prelert.job.config.DefaultFrequency; import org.elasticsearch.xpack.prelert.job.extraction.DataExtractor; @@ -30,7 +29,6 @@ import org.elasticsearch.xpack.prelert.job.extraction.DataExtractorFactory; import org.elasticsearch.xpack.prelert.job.messages.Messages; import org.elasticsearch.xpack.prelert.job.metadata.Allocation; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; -import org.elasticsearch.xpack.prelert.job.metadata.Scheduler; import org.elasticsearch.xpack.prelert.job.persistence.BucketsQueryBuilder; import org.elasticsearch.xpack.prelert.job.persistence.JobProvider; import org.elasticsearch.xpack.prelert.job.persistence.QueryPage; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobValidator.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobValidator.java similarity index 93% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobValidator.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobValidator.java index 1208335decb..4def82fb516 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobValidator.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobValidator.java @@ -3,12 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.xpack.prelert.job.AnalysisConfig; import org.elasticsearch.xpack.prelert.job.DataDescription; import org.elasticsearch.xpack.prelert.job.Job; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; import org.elasticsearch.xpack.prelert.job.messages.Messages; public final class ScheduledJobValidator { diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/metadata/Scheduler.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/Scheduler.java similarity index 89% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/metadata/Scheduler.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/Scheduler.java index bc176f7a89a..2109524abd2 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/metadata/Scheduler.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/Scheduler.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.metadata; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.cluster.AbstractDiffable; import org.elasticsearch.common.ParseField; @@ -14,8 +14,6 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; import java.io.IOException; import java.util.Objects; @@ -25,9 +23,9 @@ public class Scheduler extends AbstractDiffable implements ToXContent private static final ParseField CONFIG_FIELD = new ParseField("config"); private static final ParseField STATUS_FIELD = new ParseField("status"); - static final Scheduler PROTO = new Scheduler(null, null); + public static final Scheduler PROTO = new Scheduler(null, null); - static final ConstructingObjectParser PARSER = new ConstructingObjectParser<>("scheduler", + public static final ConstructingObjectParser PARSER = new ConstructingObjectParser<>("scheduler", a -> new Scheduler((SchedulerConfig) a[0], (SchedulerStatus) a[1])); static { diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/SchedulerConfig.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerConfig.java similarity index 99% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/SchedulerConfig.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerConfig.java index 8f96c523fc7..5a93971b3b0 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/SchedulerConfig.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerConfig.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.support.ToXContentToBytes; @@ -14,6 +14,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.XContentBuilder; +import org.elasticsearch.xpack.prelert.job.Job; import org.elasticsearch.xpack.prelert.job.messages.Messages; import org.elasticsearch.xpack.prelert.utils.ExceptionsHelper; import org.elasticsearch.xpack.prelert.utils.PrelertStrings; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/SchedulerStatus.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerStatus.java similarity index 95% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/SchedulerStatus.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerStatus.java index 0e6e0fc5eea..6ff56b65263 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/SchedulerStatus.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerStatus.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchDataExtractor.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchDataExtractor.java similarity index 99% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchDataExtractor.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchDataExtractor.java index 7348f757b10..707c21b2b39 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchDataExtractor.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchDataExtractor.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import org.apache.logging.log4j.Logger; import org.elasticsearch.xpack.prelert.job.extraction.DataExtractor; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchQueryBuilder.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchQueryBuilder.java similarity index 98% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchQueryBuilder.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchQueryBuilder.java index 0366fbeb7bd..583becb7987 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchQueryBuilder.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchQueryBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import org.apache.logging.log4j.Logger; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchUrlBuilder.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchUrlBuilder.java similarity index 96% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchUrlBuilder.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchUrlBuilder.java index d21a12a48b5..f20af2429f5 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchUrlBuilder.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchUrlBuilder.java @@ -3,13 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import java.util.List; import java.util.Locale; import java.util.Objects; import java.util.stream.Collectors; -import org.elasticsearch.common.settings.Settings; public class ElasticsearchUrlBuilder { diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpDataExtractorFactory.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpDataExtractorFactory.java similarity index 97% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpDataExtractorFactory.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpDataExtractorFactory.java index 5b4c0b4f63d..f1d69d31abb 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpDataExtractorFactory.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpDataExtractorFactory.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import org.apache.logging.log4j.Logger; import org.elasticsearch.ElasticsearchParseException; @@ -14,7 +14,7 @@ import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.xpack.prelert.job.Job; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; import org.elasticsearch.xpack.prelert.job.extraction.DataExtractor; import org.elasticsearch.xpack.prelert.job.extraction.DataExtractorFactory; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpRequester.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpRequester.java similarity index 99% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpRequester.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpRequester.java index 4dc7c506694..fe5c6290b9d 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpRequester.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpRequester.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.logging.Loggers; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpResponse.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpResponse.java similarity index 96% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpResponse.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpResponse.java index 15dd187683b..ac6f6e7ffb6 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpResponse.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import java.io.BufferedReader; import java.io.IOException; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ScrollState.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ScrollState.java similarity index 98% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ScrollState.java rename to elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ScrollState.java index e69175e9f4a..d8a54e05403 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ScrollState.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/scheduler/http/ScrollState.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import java.io.IOException; import java.io.InputStream; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/utils/SchedulerStatusObserver.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/utils/SchedulerStatusObserver.java index 7937db67153..de2e9b57620 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/utils/SchedulerStatusObserver.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/prelert/utils/SchedulerStatusObserver.java @@ -13,9 +13,9 @@ import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; -import org.elasticsearch.xpack.prelert.job.metadata.Scheduler; +import org.elasticsearch.xpack.prelert.scheduler.Scheduler; import java.util.function.Consumer; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/GetJobActionResponseTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/GetJobActionResponseTests.java index 4ac1fa42f1f..c34c4c9869c 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/GetJobActionResponseTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/GetJobActionResponseTests.java @@ -16,7 +16,7 @@ import org.elasticsearch.xpack.prelert.job.Job; import org.elasticsearch.xpack.prelert.job.JobStatus; import org.elasticsearch.xpack.prelert.job.ModelDebugConfig; import org.elasticsearch.xpack.prelert.job.ModelSizeStats; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.persistence.QueryPage; import org.elasticsearch.xpack.prelert.job.transform.TransformConfig; import org.elasticsearch.xpack.prelert.job.transform.TransformType; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/PutSchedulerActionRequestTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/PutSchedulerActionRequestTests.java index b30f4fd62f1..ad43677976d 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/PutSchedulerActionRequestTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/PutSchedulerActionRequestTests.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.prelert.action; import org.elasticsearch.common.ParseFieldMatcher; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.xpack.prelert.action.PutSchedulerAction.Request; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerConfigTests; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfigTests; import org.elasticsearch.xpack.prelert.support.AbstractStreamableXContentTestCase; import org.junit.Before; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/PutSchedulerActionResponseTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/PutSchedulerActionResponseTests.java index b097fec98c6..4158a0e85dc 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/PutSchedulerActionResponseTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/PutSchedulerActionResponseTests.java @@ -6,8 +6,8 @@ package org.elasticsearch.xpack.prelert.action; import org.elasticsearch.xpack.prelert.action.PutSchedulerAction.Response; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerConfigTests; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfigTests; import org.elasticsearch.xpack.prelert.support.AbstractStreamableTestCase; import java.util.Arrays; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/ScheduledJobsIT.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/ScheduledJobsIT.java index 17ad1db2511..a8770a7bf9f 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/ScheduledJobsIT.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/ScheduledJobsIT.java @@ -23,10 +23,10 @@ import org.elasticsearch.xpack.prelert.job.DataCounts; import org.elasticsearch.xpack.prelert.job.DataDescription; import org.elasticsearch.xpack.prelert.job.Detector; import org.elasticsearch.xpack.prelert.job.Job; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; -import org.elasticsearch.xpack.prelert.job.metadata.Scheduler; +import org.elasticsearch.xpack.prelert.scheduler.Scheduler; import org.elasticsearch.xpack.prelert.job.persistence.JobResultsPersister; import org.junit.After; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/StopSchedulerActionRequestTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/StopSchedulerActionRequestTests.java index bcd57a6ff13..c286e5b1313 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/StopSchedulerActionRequestTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/StopSchedulerActionRequestTests.java @@ -10,13 +10,13 @@ import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.xpack.prelert.action.StopSchedulerAction.Request; import org.elasticsearch.xpack.prelert.job.Job; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; import org.elasticsearch.xpack.prelert.support.AbstractStreamableTestCase; -import static org.elasticsearch.xpack.prelert.job.scheduler.ScheduledJobRunnerTests.createScheduledJob; -import static org.elasticsearch.xpack.prelert.job.scheduler.ScheduledJobRunnerTests.createSchedulerConfig; +import static org.elasticsearch.xpack.prelert.scheduler.ScheduledJobRunnerTests.createScheduledJob; +import static org.elasticsearch.xpack.prelert.scheduler.ScheduledJobRunnerTests.createSchedulerConfig; import static org.hamcrest.Matchers.equalTo; public class StopSchedulerActionRequestTests extends AbstractStreamableTestCase { diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/UpdateSchedulerStatusRequestTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/UpdateSchedulerStatusRequestTests.java index 0fda037a9c3..dfb37250cb3 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/UpdateSchedulerStatusRequestTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/action/UpdateSchedulerStatusRequestTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.prelert.action; import org.elasticsearch.xpack.prelert.action.UpdateSchedulerStatusAction.Request; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.support.AbstractStreamableTestCase; public class UpdateSchedulerStatusRequestTests extends AbstractStreamableTestCase { diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/metadata/PrelertMetadataTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/metadata/PrelertMetadataTests.java index c3073583eb7..1c44627717e 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/metadata/PrelertMetadataTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/metadata/PrelertMetadataTests.java @@ -20,15 +20,15 @@ import org.elasticsearch.xpack.prelert.job.DataDescription; import org.elasticsearch.xpack.prelert.job.Job; import org.elasticsearch.xpack.prelert.job.JobStatus; import org.elasticsearch.xpack.prelert.job.JobTests; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerStatus; import org.elasticsearch.xpack.prelert.support.AbstractSerializingTestCase; import java.io.IOException; import static org.elasticsearch.xpack.prelert.job.JobTests.buildJobBuilder; -import static org.elasticsearch.xpack.prelert.job.scheduler.ScheduledJobRunnerTests.createScheduledJob; -import static org.elasticsearch.xpack.prelert.job.scheduler.ScheduledJobRunnerTests.createSchedulerConfig; +import static org.elasticsearch.xpack.prelert.scheduler.ScheduledJobRunnerTests.createScheduledJob; +import static org.elasticsearch.xpack.prelert.scheduler.ScheduledJobRunnerTests.createSchedulerConfig; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStartJobSchedulerActionTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStartJobSchedulerActionTests.java index 33e96c6e960..8c43e7fd5cb 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStartJobSchedulerActionTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/rest/schedulers/RestStartJobSchedulerActionTests.java @@ -17,12 +17,11 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.xpack.prelert.job.Job; import org.elasticsearch.xpack.prelert.job.JobStatus; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; +import org.elasticsearch.xpack.prelert.scheduler.SchedulerConfig; import org.elasticsearch.xpack.prelert.job.metadata.PrelertMetadata; -import org.elasticsearch.xpack.prelert.job.scheduler.ScheduledJobRunnerTests; +import org.elasticsearch.xpack.prelert.scheduler.ScheduledJobRunnerTests; import java.util.HashMap; import java.util.Map; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ProblemTrackerTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ProblemTrackerTests.java similarity index 98% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ProblemTrackerTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ProblemTrackerTests.java index c40289379f5..b577ab92332 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ProblemTrackerTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ProblemTrackerTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.xpack.prelert.job.audit.Auditor; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobRunnerTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobRunnerTests.java similarity index 98% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobRunnerTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobRunnerTests.java index 48780d3b050..529a187f089 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobRunnerTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobRunnerTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.ResourceNotFoundException; @@ -28,8 +28,6 @@ import org.elasticsearch.xpack.prelert.job.DataDescription; import org.elasticsearch.xpack.prelert.job.Detector; import org.elasticsearch.xpack.prelert.job.Job; import org.elasticsearch.xpack.prelert.job.JobStatus; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; -import org.elasticsearch.xpack.prelert.job.SchedulerStatus; import org.elasticsearch.xpack.prelert.job.audit.Auditor; import org.elasticsearch.xpack.prelert.job.extraction.DataExtractor; import org.elasticsearch.xpack.prelert.job.extraction.DataExtractorFactory; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobTests.java similarity index 99% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobTests.java index 374fc278d54..b46cf1d9ef7 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.action.ActionFuture; import org.elasticsearch.client.Client; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobValidatorTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobValidatorTests.java similarity index 98% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobValidatorTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobValidatorTests.java index 184993a6c4c..b62b05fef2a 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/ScheduledJobValidatorTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/ScheduledJobValidatorTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; @@ -12,7 +12,6 @@ import org.elasticsearch.xpack.prelert.job.AnalysisConfig; import org.elasticsearch.xpack.prelert.job.DataDescription; import org.elasticsearch.xpack.prelert.job.Detector; import org.elasticsearch.xpack.prelert.job.Job; -import org.elasticsearch.xpack.prelert.job.SchedulerConfig; import org.elasticsearch.xpack.prelert.job.messages.Messages; import java.io.IOException; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/SchedulerConfigTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerConfigTests.java similarity index 99% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/SchedulerConfigTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerConfigTests.java index 7cb5e891d9a..8c2aee718ca 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/SchedulerConfigTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerConfigTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job; +package org.elasticsearch.xpack.prelert.scheduler; import com.carrotsearch.randomizedtesting.generators.CodepointSetGenerator; import org.apache.logging.log4j.Logger; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/JobSchedulerStatusTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerStatusTests.java similarity index 86% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/JobSchedulerStatusTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerStatusTests.java index 3b149e6de13..8aeba6da8fb 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/JobSchedulerStatusTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/SchedulerStatusTests.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job; +package org.elasticsearch.xpack.prelert.scheduler; import org.elasticsearch.test.ESTestCase; -public class JobSchedulerStatusTests extends ESTestCase { +public class SchedulerStatusTests extends ESTestCase { public void testForString() { assertEquals(SchedulerStatus.fromString("started"), SchedulerStatus.STARTED); diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchDataExtractorTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchDataExtractorTests.java similarity index 99% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchDataExtractorTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchDataExtractorTests.java index 59f4096b26d..0a95d84eb3c 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchDataExtractorTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchDataExtractorTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import org.apache.logging.log4j.Logger; import org.elasticsearch.test.ESTestCase; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchQueryBuilderTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchQueryBuilderTests.java similarity index 99% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchQueryBuilderTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchQueryBuilderTests.java index 801645466f7..4466097178b 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchQueryBuilderTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchQueryBuilderTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import org.apache.logging.log4j.Logger; import org.elasticsearch.test.ESTestCase; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchUrlBuilderTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchUrlBuilderTests.java similarity index 97% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchUrlBuilderTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchUrlBuilderTests.java index 3edc075068b..5acd0c632a4 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/ElasticsearchUrlBuilderTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/ElasticsearchUrlBuilderTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import org.elasticsearch.test.ESTestCase; diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpResponseTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpResponseTests.java similarity index 95% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpResponseTests.java rename to elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpResponseTests.java index 69e8b87c1a2..99d664eee37 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/job/scheduler/http/HttpResponseTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/prelert/scheduler/http/HttpResponseTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.prelert.job.scheduler.http; +package org.elasticsearch.xpack.prelert.scheduler.http; import org.elasticsearch.test.ESTestCase;