diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java index 259a3f3e61e..449317328b9 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java @@ -46,6 +46,7 @@ import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.time.Duration; @@ -414,7 +415,7 @@ public class GetJobsStatsAction extends Action> stats = processManager.getStatistics(jobId); if (stats.isPresent()) { - PersistentTasksCustomMetaData.PersistentTask pTask = MlMetadata.getJobTask(jobId, tasks); + PersistentTask pTask = MlMetadata.getJobTask(jobId, tasks); DiscoveryNode node = state.nodes().get(pTask.getExecutorNode()); JobState jobState = MlMetadata.getJobState(jobId, tasks); String assignmentExplanation = pTask.getAssignment().getExplanation(); @@ -445,7 +446,7 @@ public class GetJobsStatsAction extends Action { - JobState jobState = MlMetadata.getJobState(request.jobId, tasks); + JobState jobState = MlMetadata.getJobState(jobId, tasks); PersistentTasksCustomMetaData.PersistentTask pTask = MlMetadata.getJobTask(jobId, tasks); String assignmentExplanation = null; if (pTask != null) { diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java index 68d81bcfd31..5ddaddaab55 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java @@ -96,7 +96,7 @@ public class TooManyJobsIT extends BaseMlIntegTestCase { closeRequest.setCloseTimeout(TimeValue.timeValueSeconds(20L)); CloseJobAction.Response closeResponse = client().execute(CloseJobAction.INSTANCE, closeRequest).actionGet(); assertTrue(closeResponse.isClosed()); - client().execute(OpenJobAction.INSTANCE, openJobRequest).get(); + client().execute(OpenJobAction.INSTANCE, openJobRequest).actionGet(); assertBusy(() -> { for (Client client : clients()) { GetJobsStatsAction.Response statsResponse =