[ 
https://issues.apache.org/jira/browse/HADOOP-18632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17690154#comment-17690154
 ] 

ASF GitHub Bot commented on HADOOP-18632:
-----------------------------------------

pranavsaxena-microsoft commented on code in PR #5399:
URL: https://github.com/apache/hadoop/pull/5399#discussion_r1109318466


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/TimeoutOptimizer.java:
##########
@@ -0,0 +1,227 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.fs.azurebfs.services;
+
+import org.apache.hadoop.fs.azurebfs.AbfsConfiguration;
+import org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys;
+import org.apache.hadoop.fs.azurebfs.constants.HttpQueryParams;
+import org.apache.http.client.utils.URIBuilder;
+
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import static 
org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.DEFAULT_TIMEOUT;
+
+public class TimeoutOptimizer {

Review Comment:
   This I understand is per-call level. Should we use the feedback loop across 
the lifetime of abfsClient.
   
   ex: 10th Read call should use the intellegence it achieved in the first Read 
call.
   
   Also, since we say that we will start from aggressive value, the retries 
would be same across all API calls in the lifetime of AbfsClient object. 
   ex: lets take out connTimeout is aggresive say 100 ms. And network is not 
able to connect in that time. And through our heuristic lets say on 10th retry, 
connTimeout become 1 sec which is good with network. Now all API call would 
have to fail nearly 10 times to work on that network
   
   CC: @snvijaya @anmolanmol1234 





> ABFS: Customize and optimize timeouts made based on each separate request
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-18632
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18632
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>            Reporter: Sree Bhattacharyya
>            Assignee: Sree Bhattacharyya
>            Priority: Minor
>              Labels: pull-request-available
>
> In present day ABFS Driver functioning, all API request calls use the same 
> values of default timeouts. This is sub-optimal in the scenarios where a 
> request is failing due to hitting a particular busy node, and would benefit 
> simply by retrying quicker.
> For this, the change to be brought in chooses customized timeouts based on 
> which API call is being made. Further, starting with smaller, optimized 
> values of timeouts, the timeout values would increase by a certain 
> incremental factor for subsequent retries to ensure quicker retries and 
> success.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to