feat(java-client): Introduce retry mechanism into Java client
What problem does this PR solve?
Introduce retry mechanism into the Java client enhances user convenience and robustness.
The default retry policy will retry Integer.MAX_VALUE times, and default retry delay time is 20 ms. The exponentialBackoff retry policy will set by user self.
Tests
- Unit test, for DefaultRetryPolicy and ExponentialBackoffRetryPolicy
Code changes
- Has exported class clientoption.java: add retry parameter in clientoption
- Add class retryPolicy: an interface for retry mechanism.
- Add class DefaultRetryPolicy.java: implement default retry policy
- Add class ExponentialBackoffRetryPolicy.java: allows use-defined retry mechanism .
Some suggestions to improve the commit message: https://cbea.ms/git-commit/ https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/
I tried rerun the failed job but it still failed...
I tried rerun the failed job but it still failed...
the failed job is failed at start pegasus cluster. not java client unit test. Rerun one more time the job successful.