CalvinKirs commented on pull request #4140:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/4140#issuecomment-738492886


   > @lgcareer I get your mean. To avoid an always failed high-priority task 
block master consumer.
   > Maybe we can use `public E poll(long timeout, TimeUnit unit)` .
   > code like this
   > `String taskPriorityInfo = 
taskPriorityQueue.poll(Constants.SLEEP_TIME_MILLIS, TimeUnit.MILLISECONDS); 
if(Objects.isNull(taskPriorityInfo)){ continue; }`
   > 
   > And `TaskPriorityQueueImpl` add a method like this:
   > `@Override public String poll(long timeout, TimeUnit unit) throws 
Exception { return queue.poll(timeout,unit); }`
   > 
   > what do you think about?
   
   Why do you need to do this? Generally speaking, this is a good solution, but 
it may not be appropriate here. It does not belong to the PriorityQueue method. 
To be precise, it does not belong to the PriorityQueue category.


----------------------------------------------------------------
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:
[email protected]


Reply via email to