diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/DbTaskStorage.java b/indexing-service/src/main/java/io/druid/indexing/overlord/DbTaskStorage.java index ec2e2f99feb..92e1043c8eb 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/DbTaskStorage.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/DbTaskStorage.java @@ -220,7 +220,7 @@ public class DbTaskStorage implements TaskStorage } @Override - public List getRunningTasks() + public List getActiveTasks() { return dbi.withHandle( new HandleCallback>() diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/HeapMemoryTaskStorage.java b/indexing-service/src/main/java/io/druid/indexing/overlord/HeapMemoryTaskStorage.java index 7ebaa69dab9..ef23972ebe4 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/HeapMemoryTaskStorage.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/HeapMemoryTaskStorage.java @@ -128,7 +128,7 @@ public class HeapMemoryTaskStorage implements TaskStorage } @Override - public List getRunningTasks() + public List getActiveTasks() { giant.lock(); diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskQueue.java b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskQueue.java index 580dfd02a0d..a78aef84f6e 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskQueue.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskQueue.java @@ -100,7 +100,7 @@ public class TaskQueue // Get all running tasks and their locks final Multimap tasksByLock = ArrayListMultimap.create(); - for (final Task task : taskStorage.getRunningTasks()) { + for (final Task task : taskStorage.getActiveTasks()) { try { final List taskLocks = taskStorage.getLocks(task.getId()); diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskStorage.java b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskStorage.java index b74dc0d9c1a..3e3cbf46cdc 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskStorage.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskStorage.java @@ -77,9 +77,9 @@ public interface TaskStorage public List getAuditLogs(String taskid); /** - * Returns a list of currently-running tasks as stored in the storage facility, in no particular order. + * Returns a list of currently running or pending tasks as stored in the storage facility, in no particular order. */ - public List getRunningTasks(); + public List getActiveTasks(); /** * Returns a list of locks for a particular task.