You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/02 13:56:00 UTC
[jira] [Work logged] (MAPREDUCE-7385) impove JobEndNotifier#httpNotification With recommended methods
[ https://issues.apache.org/jira/browse/MAPREDUCE-7385?focusedWorklogId=797240&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-797240 ]
ASF GitHub Bot logged work on MAPREDUCE-7385:
---------------------------------------------
Author: ASF GitHub Bot
Created on: 02/Aug/22 13:55
Start Date: 02/Aug/22 13:55
Worklog Time Spent: 10m
Work Description: slfan1989 commented on PR #4403:
URL: https://github.com/apache/hadoop/pull/4403#issuecomment-1202624547
@ayushtkn Can you help review this pr?this pr replaces some deprecated method, thank you very much!
Issue Time Tracking
-------------------
Worklog Id: (was: 797240)
Time Spent: 2h 50m (was: 2h 40m)
> impove JobEndNotifier#httpNotification With recommended methods
> ---------------------------------------------------------------
>
> Key: MAPREDUCE-7385
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7385
> Project: Hadoop Map/Reduce
> Issue Type: Improvement
> Reporter: fanshilun
> Assignee: fanshilun
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
> JobEndNotifier#httpNotification's DefaultHttpClient has been Deprecated, use the recommended method instead
> JobEndNotifier#httpNotification
> {code:java}
> private static int httpNotification(String uri, int timeout)
> throws IOException, URISyntaxException {
> DefaultHttpClient client = new DefaultHttpClient();
> client.getParams()
> .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, timeout)
> .setLongParameter(ClientPNames.CONN_MANAGER_TIMEOUT, (long) timeout);
> HttpGet httpGet = new HttpGet(new URI(uri));
> httpGet.setHeader("Accept", "*/*");
> return client.execute(httpGet).getStatusLine().getStatusCode();
> } {code}
> * CoreConnectionPNames.SO_TIMEOUT
> * Use RequestConfig.setSocketTimeout instead
> {code:java}
> Deprecated.Defines the socket timeout (SO_TIMEOUT) in milliseconds, which is the timeout for waiting for data or, put differently, a maximum period inactivity between two consecutive data packets). A timeout value of zero is interpreted as an infinite timeout. {code}
>
> * ClientPNames.CONN_MANAGER_TIMEOUT
> * Use RequestConfig.setConnectionRequestTimeout instead
> {code:java}
> Deprecated. Defines the timeout in milliseconds used when retrieving an instance of ManagedClientConnection from the ClientConnectionManager. {code}
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org