-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement] Move delay calculation to Master #15278
[Improvement] Move delay calculation to Master #15278
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #15278 +/- ##
============================================
+ Coverage 38.09% 38.10% +0.01%
+ Complexity 4672 4662 -10
============================================
Files 1280 1278 -2
Lines 44583 44543 -40
Branches 4803 4792 -11
============================================
- Hits 16983 16973 -10
+ Misses 25731 25703 -28
+ Partials 1869 1867 -2 ☔ View full report in Codecov by Sentry. |
...g/apache/dolphinscheduler/server/master/runner/execute/PriorityDelayTaskExecuteRunnable.java
Fixed
Show fixed
Hide fixed
5f10044
to
0ecec0f
Compare
@@ -90,7 +84,7 @@ | |||
return ((ThreadPoolExecutor) this.execService).getActiveCount(); | |||
} | |||
|
|||
public Map<Integer, WorkerTaskExecuteRunnable> getTaskExecuteThreadMap() { | |||
public Map<Integer, WorkerTaskExecutor> getTaskExecuteThreadMap() { |
Check notice
Code scanning / CodeQL
Exposing internal representation Note
after this call to getTaskExecuteThreadMap
public ProcessInstance getWorkflowInstance() { | ||
return workflowInstance; | ||
} | ||
public abstract class PriorityDelayTaskExecuteRunnable extends BaseTaskExecuteRunnable implements Delayed { |
Check warning
Code scanning / CodeQL
Inconsistent compareTo Warning
compareTo
0ecec0f
to
7f56f96
Compare
...a/org/apache/dolphinscheduler/server/master/runner/GlobalMasterTaskExecuteRunnableQueue.java
Outdated
Show resolved
Hide resolved
@@ -29,7 +27,7 @@ | |||
@Component | |||
public class GlobalTaskDispatchWaitingQueue { | |||
|
|||
private final PriorityBlockingQueue<DefaultTaskExecuteRunnable> queue = new PriorityBlockingQueue<>(); | |||
private final DelayQueue<DefaultTaskExecuteRunnable> queue = new DelayQueue<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be DelayPriorityQueue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JDK doesn't have DelayPriorityQueue
, the DelayQueue contains priority logic, in fact, the DelayQueue use PriorityQueue to store element.
.../dolphinscheduler/server/master/runner/operator/BaseTaskExecuteRunnableDispatchOperator.java
Show resolved
Hide resolved
.../java/org/apache/dolphinscheduler/server/worker/runner/DefaultWorkerTaskExecutorFactory.java
Show resolved
Hide resolved
1d78067
to
004ba76
Compare
004ba76
to
9bda0bc
Compare
Please retry analysis of this Pull-Request directly on SonarCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
Purpose of the pull request
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
If your pull request contain incompatible change, you should also add it to
docs/docs/en/guide/upgrede/incompatible.md