Return-Path: X-Original-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49F62182B7 for ; Wed, 23 Dec 2015 03:38:48 +0000 (UTC) Received: (qmail 17422 invoked by uid 500); 23 Dec 2015 03:38:47 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 17278 invoked by uid 500); 23 Dec 2015 03:38:47 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 17244 invoked by uid 99); 23 Dec 2015 03:38:46 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Dec 2015 03:38:46 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 997592C1F4E for ; Wed, 23 Dec 2015 03:38:46 +0000 (UTC) Date: Wed, 23 Dec 2015 03:38:46 +0000 (UTC) From: "Lin Yiqun (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (MAPREDUCE-6587) Remove unused params in connection-related methods of Fetcher MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Lin Yiqun created MAPREDUCE-6587: ------------------------------------ Summary: 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: Lin Yiqun Assignee: Lin Yiqun Priority: Trivial There are some unused params in Fecther#openConnectionWithRetry.The code is following: {code} private void openConnectionWithRetry(MapHost host, Set 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)