[
https://issues.apache.org/jira/browse/YARN-11492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17721987#comment-17721987
]
ASF GitHub Bot commented on YARN-11492:
---------------------------------------
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).
> Improve createJerseyClient#setConnectTimeout Code
> -------------------------------------------------
>
> Key: YARN-11492
> URL: https://issues.apache.org/jira/browse/YARN-11492
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: federation
> Affects Versions: 3.4.0
> Reporter: Shilun Fan
> Assignee: Shilun Fan
> Priority: Major
> Labels: pull-request-available
>
> createJerseyClient#setConnectTimeout There is a type conversion code that
> converts long to int, we should be careful with this part of code, I added
> some verification rules.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]