anujmodi2021 commented on code in PR #8043:
URL: https://github.com/apache/hadoop/pull/8043#discussion_r2470583329


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsRestOperation.java:
##########
@@ -611,10 +630,30 @@ AbfsJdkHttpOperation createAbfsHttpOperation() throws 
IOException {
 
   @VisibleForTesting
   AbfsAHCHttpOperation createAbfsAHCHttpOperation() throws IOException {
+    long tailLatency = getTailLatencyTimeoutIfEnabled();
     return new AbfsAHCHttpOperation(url, method, requestHeaders,
         
Duration.ofMillis(client.getAbfsConfiguration().getHttpConnectionTimeout()),
         Duration.ofMillis(client.getAbfsConfiguration().getHttpReadTimeout()),
-        client.getAbfsApacheHttpClient(), client);
+        tailLatency, client.getAbfsApacheHttpClient(), client);
+  }
+
+  /**
+   * Get Tail Latency Timeout value if profiling is enabled, timeout is enabled
+   * and retries due to tail latency request timeout is allowed.
+   * @return tail latency timeout value else return zero.
+   */
+  long getTailLatencyTimeoutIfEnabled() {
+    if (isTailLatencyTimeoutEnabled() && shouldTailLatencyTimeout) {
+      return (long) tailLatencyTracker.getTailLatency(this.operationType);
+    }
+    return ZERO;
+  }
+
+  boolean isTailLatencyTimeoutEnabled() {

Review Comment:
   Added



-- 
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]

Reply via email to