Loading dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/queue/TaskQueueZkImpl.java +10 −10 Original line number Diff line number Diff line Loading @@ -45,9 +45,9 @@ public class TaskQueueZkImpl implements ITaskQueue { try { String tasksQueuePath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_QUEUE); String tasksCancelPath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_KILL); String tasksKillPath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_KILL); for(String key : new String[]{tasksQueuePath,tasksCancelPath}){ for (String key : new String[]{tasksQueuePath,tasksKillPath}){ if (!zookeeperOperator.isExisted(key)){ zookeeperOperator.persist(key, ""); logger.info("create tasks queue parent node success : {}", key); Loading Loading @@ -340,14 +340,14 @@ public class TaskQueueZkImpl implements ITaskQueue { public void delete(){ try { String tasksQueuePath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_QUEUE); String tasksCancelPath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_KILL); String tasksKillPath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_KILL); for(String taskQueuePath : new String[]{tasksQueuePath,tasksCancelPath}){ if(zookeeperOperator.isExisted(taskQueuePath)){ List<String> list = zookeeperOperator.getChildrenKeys(taskQueuePath); for (String key : new String[]{tasksQueuePath,tasksKillPath}){ if (zookeeperOperator.isExisted(key)){ List<String> list = zookeeperOperator.getChildrenKeys(key); for (String task : list) { zookeeperOperator.remove(taskQueuePath + Constants.SINGLE_SLASH + task); logger.info("delete task from tasks queue : {}/{} ",taskQueuePath,task); zookeeperOperator.remove(key + Constants.SINGLE_SLASH + task); logger.info("delete task from tasks queue : {}/{} ", key, task); } } } Loading Loading
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/queue/TaskQueueZkImpl.java +10 −10 Original line number Diff line number Diff line Loading @@ -45,9 +45,9 @@ public class TaskQueueZkImpl implements ITaskQueue { try { String tasksQueuePath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_QUEUE); String tasksCancelPath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_KILL); String tasksKillPath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_KILL); for(String key : new String[]{tasksQueuePath,tasksCancelPath}){ for (String key : new String[]{tasksQueuePath,tasksKillPath}){ if (!zookeeperOperator.isExisted(key)){ zookeeperOperator.persist(key, ""); logger.info("create tasks queue parent node success : {}", key); Loading Loading @@ -340,14 +340,14 @@ public class TaskQueueZkImpl implements ITaskQueue { public void delete(){ try { String tasksQueuePath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_QUEUE); String tasksCancelPath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_KILL); String tasksKillPath = getTasksPath(Constants.DOLPHINSCHEDULER_TASKS_KILL); for(String taskQueuePath : new String[]{tasksQueuePath,tasksCancelPath}){ if(zookeeperOperator.isExisted(taskQueuePath)){ List<String> list = zookeeperOperator.getChildrenKeys(taskQueuePath); for (String key : new String[]{tasksQueuePath,tasksKillPath}){ if (zookeeperOperator.isExisted(key)){ List<String> list = zookeeperOperator.getChildrenKeys(key); for (String task : list) { zookeeperOperator.remove(taskQueuePath + Constants.SINGLE_SLASH + task); logger.info("delete task from tasks queue : {}/{} ",taskQueuePath,task); zookeeperOperator.remove(key + Constants.SINGLE_SLASH + task); logger.info("delete task from tasks queue : {}/{} ", key, task); } } } Loading