hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira Ajisaka (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MAPREDUCE-6587) Remove unused params in connection-related methods of Fetcher
Date Tue, 23 Aug 2016 08:14:21 GMT

     [ https://issues.apache.org/jira/browse/MAPREDUCE-6587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Akira Ajisaka updated MAPREDUCE-6587:
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.8.0
           Status: Resolved  (was: Patch Available)

Committed this to trunk, branch-2, and branch-2.8. Thanks [~linyiqun] for cleaning up the
code.

> Remove unused params in connection-related methods of Fetcher
> -------------------------------------------------------------
>
>                 Key: MAPREDUCE-6587
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6587
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>    Affects Versions: 2.7.1
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: MAPREDUCE-6587.001.patch
>
>
> There are some unused params in Fecther#openConnectionWithRetry.The code is following:
> {code}
> private void openConnectionWithRetry(MapHost host,
>       Set<TaskAttemptID> remaining, URL url) throws IOException {
>     long startTime = Time.monotonicNow();
>     boolean shouldWait = true;
>     while (shouldWait) {
>       try {
>         openConnection(url);
>         shouldWait = false;
>       } catch (IOException e) {
>         if (!fetchRetryEnabled) {
>            // throw exception directly if fetch's retry is not enabled
>            throw e;
>         }
>         if ((Time.monotonicNow() - startTime) >= this.fetchRetryTimeout) {
>           LOG.warn("Failed to connect to host: " + url + "after " 
>               + fetchRetryTimeout + " milliseconds.");
>           throw e;
>         }
>         try {
>           Thread.sleep(this.fetchRetryInterval);
>         } catch (InterruptedException e1) {
>           if (stopped) {
>             return;
>           }
>         }
>       }
>     }
>   }
> {code}
> we can see that the param remaing and host is not be used in this method. So we need
to remove these param and update the method params which invoke this method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message