You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "slfan1989 (via GitHub)" <gi...@apache.org> on 2023/05/12 02:39:04 UTC

[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5636: YARN-11492. Improve createJerseyClient#setConnectTimeout Code.

slfan1989 commented on code in PR #5636:
URL: https://github.com/apache/hadoop/pull/5636#discussion_r1191851956


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServiceUtil.java:
##########
@@ -363,14 +363,30 @@ public static AppsInfo mergeAppsInfo(ArrayList<AppInfo> appsInfo,
    */
   protected static Client createJerseyClient(Configuration conf) {
     Client client = Client.create();
-    client.setConnectTimeout((int) conf
-        .getTimeDuration(YarnConfiguration.ROUTER_WEBAPP_CONNECT_TIMEOUT,
-            YarnConfiguration.DEFAULT_ROUTER_WEBAPP_CONNECT_TIMEOUT,
-            TimeUnit.MILLISECONDS));
-    client.setReadTimeout((int) conf
-        .getTimeDuration(YarnConfiguration.ROUTER_WEBAPP_READ_TIMEOUT,
-            YarnConfiguration.DEFAULT_ROUTER_WEBAPP_READ_TIMEOUT,
-            TimeUnit.MILLISECONDS));
+
+    long connectTimeOut = conf.getTimeDuration(YarnConfiguration.ROUTER_WEBAPP_CONNECT_TIMEOUT,
+        YarnConfiguration.DEFAULT_ROUTER_WEBAPP_CONNECT_TIMEOUT, TimeUnit.MILLISECONDS);
+    long readTimeout = conf.getTimeDuration(YarnConfiguration.ROUTER_WEBAPP_READ_TIMEOUT,

Review Comment:
   Thank you for your help in reviewing the code! I will first fix the java doc involved in this pr, and then I will submit a separate pr to fix all the java docs related to `yarn federation` (different modules may require 1-2 pr).



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org