You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by fj...@apache.org on 2019/08/14 04:48:50 UTC
[incubator-druid] branch master updated: adjust azure storage retry
conditions (#8296)
This is an automated email from the ASF dual-hosted git repository.
fjy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/master by this push:
new 7fa0ff5 adjust azure storage retry conditions (#8296)
7fa0ff5 is described below
commit 7fa0ff5e11d4552fa62e0fb78ff99219197f62b7
Author: Clint Wylie <cw...@apache.org>
AuthorDate: Tue Aug 13 21:48:45 2019 -0700
adjust azure storage retry conditions (#8296)
---
.../org/apache/druid/storage/azure/AzureUtils.java | 30 +++++++++-------------
1 file changed, 12 insertions(+), 18 deletions(-)
diff --git a/extensions-contrib/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureUtils.java b/extensions-contrib/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureUtils.java
index 562d207..2e732fe 100644
--- a/extensions-contrib/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureUtils.java
+++ b/extensions-contrib/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureUtils.java
@@ -30,29 +30,23 @@ import java.net.URISyntaxException;
public class AzureUtils
{
+ public static final Predicate<Throwable> AZURE_RETRY = e -> {
+ if (e instanceof URISyntaxException) {
+ return false;
+ }
- public static final Predicate<Throwable> AZURE_RETRY = new Predicate<Throwable>()
- {
- @Override
- public boolean apply(Throwable e)
- {
- if (e instanceof URISyntaxException) {
- return false;
- }
-
- if (e instanceof IOException) {
- return false;
- }
-
- if (e instanceof StorageException) {
- return true;
- }
+ if (e instanceof StorageException) {
+ return true;
+ }
- return false;
+ if (e instanceof IOException) {
+ return true;
}
+
+ return false;
};
- public static <T> T retryAzureOperation(Task<T> f, int maxTries) throws Exception
+ static <T> T retryAzureOperation(Task<T> f, int maxTries) throws Exception
{
return RetryUtils.retry(f, AZURE_RETRY, maxTries);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org