Skip to content

add RetryerUtils to retry async & sync function gracefully#2697

Merged
qiaozhanwei merged 6 commits intoapache:devfrom
gabry-lab:retryer
May 14, 2020
Merged

add RetryerUtils to retry async & sync function gracefully#2697
qiaozhanwei merged 6 commits intoapache:devfrom
gabry-lab:retryer

Conversation

@gabry-lab
Copy link
Copy Markdown
Member

What is the purpose of the pull request

Now, dolphin already refactor worker ,and netty is being used.
It can be predicted that async method will be more and more used ,and function retryer is necessary .
If we simply call function twice or more , it's ugly and beyonds understanding

So I suggest we introduce a RetryerUtils class

Brief change log

  • Add guava-retrying to root pom.xml and dolphinscheduler-common pom.xml
  • Add RetryerUtils class
  • Add retry logic to TaskExecuteProcessor

#2679
https://github.com/rholder/guava-retrying

@codecov-io
Copy link
Copy Markdown

codecov-io commented May 13, 2020

Codecov Report

Merging #2697 into dev will decrease coverage by 0.04%.
The diff coverage is 72.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #2697      +/-   ##
============================================
- Coverage     37.12%   37.08%   -0.05%     
- Complexity     2545     2546       +1     
============================================
  Files           433      434       +1     
  Lines         19958    19975      +17     
  Branches       2423     2423              
============================================
- Hits           7409     7407       -2     
- Misses        11881    11900      +19     
  Partials        668      668              
Impacted Files Coverage Δ Complexity Δ
.../server/worker/processor/TaskExecuteProcessor.java 37.28% <0.00%> (+0.62%) 3.00 <0.00> (ø)
...he/dolphinscheduler/common/utils/RetryerUtils.java 100.00% <100.00%> (ø) 8.00 <8.00> (?)
...duler/server/entity/DataxTaskExecutionContext.java 35.00% <0.00%> (-60.00%) 7.00% <0.00%> (-6.00%)
...he/dolphinscheduler/api/service/LoggerService.java 82.60% <0.00%> (-8.70%) 9.00% <0.00%> (-1.00%)
...ver/master/consumer/TaskPriorityQueueConsumer.java 54.41% <0.00%> (-4.42%) 16.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4ee7d1...409f4db. Read the comment docs.

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

80.0% 80.0% Coverage
0.0% 0.0% Duplication

Copy link
Copy Markdown
Contributor

@qiaozhanwei qiaozhanwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@qiaozhanwei qiaozhanwei merged commit c28a697 into apache:dev May 14, 2020
@gabry-lab gabry-lab deleted the retryer branch May 14, 2020 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants