From 7cf959cb66227cd4c396fc6afbcf68a213544ec6 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 21 Mar 2017 11:24:26 +0100 Subject: [PATCH] [ML] renamed getter as it overwrote super method that was used for a different purpose. Original commit: elastic/x-pack-elasticsearch@a8b70e769bd8e3745e6f7b1b65991eac0c372535 --- .../org/elasticsearch/xpack/ml/action/StartDatafeedAction.java | 2 +- .../org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunner.java | 2 +- .../elasticsearch/xpack/ml/datafeed/DatafeedJobRunnerTests.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java index 11b306beaaf..4c7db40d888 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java @@ -243,7 +243,7 @@ public class StartDatafeedAction return datafeedId; } - public long getStartTime() { + public long getDatafeedStartTime() { return startTime; } diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunner.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunner.java index b9beb4a6c25..1cf967ffb3f 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunner.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunner.java @@ -104,7 +104,7 @@ public class DatafeedJobRunner extends AbstractComponent { if (e != null) { handler.accept(e); } else { - innerRun(holder, task.getStartTime(), task.getEndTime()); + innerRun(holder, task.getDatafeedStartTime(), task.getEndTime()); } }); }, handler); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunnerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunnerTests.java index 5f015c081ed..3ba51d8aea0 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunnerTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunnerTests.java @@ -306,7 +306,7 @@ public class DatafeedJobRunnerTests extends ESTestCase { private static StartDatafeedAction.DatafeedTask createDatafeedTask(String datafeedId, long startTime, Long endTime) { StartDatafeedAction.DatafeedTask task = mock(StartDatafeedAction.DatafeedTask.class); when(task.getDatafeedId()).thenReturn(datafeedId); - when(task.getStartTime()).thenReturn(startTime); + when(task.getDatafeedStartTime()).thenReturn(startTime); when(task.getEndTime()).thenReturn(endTime); return task; }