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 "fanshilun (Jira)" <ji...@apache.org> on 2022/06/05 06:44:00 UTC
[jira] [Updated] (MAPREDUCE-7385) impove JobEndNotifier#httpNotification With recommended methods
[ https://issues.apache.org/jira/browse/MAPREDUCE-7385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
fanshilun updated MAPREDUCE-7385:
---------------------------------
Description:
{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}
> 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
> Priority: Minor
>
>
> {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}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org