anujmodi2021 commented on code in PR #5881:
URL: https://github.com/apache/hadoop/pull/5881#discussion_r1312881871
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -217,8 +220,29 @@ protected AbfsPerfTracker getAbfsPerfTracker() {
return abfsPerfTracker;
}
- ExponentialRetryPolicy getRetryPolicy() {
- return retryPolicy;
+ ExponentialRetryPolicy getExponentialRetryPolicy() {
+ return exponentialRetryPolicy;
+ }
+
+ StaticRetryPolicy getStaticRetryPolicy() {
+ return staticRetryPolicy;
+ }
+
+ /**
+ * Returns the retry policy to be used for Abfs Rest Operation Failure
+ * @param failureReason helps to decide which type of retryPolicy to be used
+ * @return retry policy to be used
+ */
+ public AbfsRetryPolicy getRetryPolicy(final String failureReason) {
+ if (!CONNECTION_TIMEOUT_ABBREVIATION.equals(failureReason)) {
+ return getExponentialRetryPolicy();
+ }
+
+ if (getAbfsConfiguration().getStaticRetryForConnectionTimeoutEnabled()) {
+ return getStaticRetryPolicy();
+ } else {
+ return getExponentialRetryPolicy();
+ }
Review Comment:
Taken
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]