From 5461c87345346db873d7be86c30fac9d35261790 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 12 Apr 2017 20:32:02 +0200 Subject: [PATCH] [ML] use correct id Original commit: elastic/x-pack-elasticsearch@2801ef9f3530bb57e357f18cc09f0726c1d3847f --- .../elasticsearch/xpack/ml/action/GetJobsStatsAction.java | 5 +++-- .../elasticsearch/xpack/ml/integration/TooManyJobsIT.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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 =