You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/01/07 06:40:18 UTC

[GitHub] [incubator-dolphinscheduler] gabrywu opened a new issue #1742: [Feature] ITaskQueue should have "hasTask" function

gabrywu opened a new issue #1742: [Feature] ITaskQueue should have "hasTask" function
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1742
 
 
   # ITaskQueue should have "hasTask" function
   ## Background
   In FetchTaskThread.run method ,using getAllTasks to determine if there is a task,why not using "hasTask"
   
   ## Solution
   
   1、ITaskQueue add "boolean hasTask(String key)"  function
   2、ZookeeperOperator add “public boolean hasChildren(final String key)” fuction
   
   public boolean hasChildren(final String key){
           try {
               Stat stat = zkClient.checkExists().forPath(key);
               return stat.getNumChildren() >= 1;
           } catch (InterruptedException ex) {
               logger.error("hasChildren key : {} InterruptedException", key);
               throw new IllegalStateException(ex);
           } catch (Exception ex) {
               logger.error("hasChildren key : {}", key, ex);
               throw new RuntimeException(ex);
           }
    }
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] qiaozhanwei commented on issue #1742: [Feature] ITaskQueue should have "hasTask" function

Posted by GitBox <gi...@apache.org>.
qiaozhanwei commented on issue #1742: [Feature] ITaskQueue should have "hasTask" function
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1742#issuecomment-571472310
 
 
   +1

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] gabrywu closed issue #1742: [Feature] ITaskQueue should have "hasTask" function

Posted by GitBox <gi...@apache.org>.
gabrywu closed issue #1742: [Feature] ITaskQueue should have "hasTask" function
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1742
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services