From ce23e971b427b561e10c93c88ceade9cc9efa190 Mon Sep 17 00:00:00 2001 From: Robert Levas Date: Wed, 19 Jun 2019 17:43:14 +0100 Subject: [PATCH] HADOOP-16340. ABFS driver continues to retry on IOException responses from REST operations. Contributed by Robert Levas. This makes the HttpException constructor protected rather than public, so it is possible to implement custom subclasses of this exception -exceptions which will not be retried. Change-Id: Ie8aaa23a707233c2db35948784908b6778ff3a8f --- .../hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java index df7b1990f3f..1d3a122860a 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java @@ -164,6 +164,8 @@ public final class AzureADAuthenticator { * requestId and error message, it is thrown when AzureADAuthenticator * failed to get the Azure Active Directory token. */ + @InterfaceAudience.LimitedPrivate("authorization-subsystems") + @InterfaceStability.Unstable public static class HttpException extends IOException { private int httpErrorCode; private String requestId; @@ -184,7 +186,7 @@ public final class AzureADAuthenticator { return this.requestId; } - HttpException(int httpErrorCode, String requestId, String message) { + protected HttpException(int httpErrorCode, String requestId, String message) { super(message); this.httpErrorCode = httpErrorCode; this.requestId = requestId;