Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 2E2FA17DB7 for ; Mon, 2 Mar 2015 03:34:06 +0000 (UTC) Received: (qmail 64311 invoked by uid 500); 2 Mar 2015 03:34:06 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 64266 invoked by uid 500); 2 Mar 2015 03:34:05 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 64255 invoked by uid 99); 2 Mar 2015 03:34:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2015 03:34:05 +0000 Date: Mon, 2 Mar 2015 03:34:05 +0000 (UTC) From: "Gera Shegalov (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-11618) DelegateToFileSystem always uses default FS's default port MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-11618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14342668#comment-14342668 ] Gera Shegalov commented on HADOOP-11618: ---------------------------------------- Thanks for the 001 patch [~brahmareddy]. The current regression test covers one important facet, the inability to create an {{DelegateToFileSystem}} instance with required authority if the default uri does not have a port. However, It would pass for the original implementation of {{DelegateToFileSystem}} if you add {code} FileSystem.setDefaultUri(conf, "hdfs://dummy-host:4321"); {code} that has nothing to do with FTP before the FtpFs construction. Because the issue is about the default port, I recommend to use a port-less URI to init FtpFs {{ftp://dummy-host}} for both cases. # default URI with port "hdfs://dummy-host:4321" # default URI without port "hdfs://dummy-host" In both cases, we are going to assert that {{ftpFs.getUri()}} results in {{ftp://dummy-host:21}} Since the problem is not specific to FtpFs, we are better off to have these tests in {{org.apache.hadoop.fs.TestDelegateToFileSystem}}. Instead of using the FtpFs constructor directly, we should use the standard idiom: {{AbstractFileSystem#get(uri, conf)}}. We can specify {{fs.AbstractFileSystem.ftp.impl}} either in the test configuration, or add it to core-default.xml > DelegateToFileSystem always uses default FS's default port > ----------------------------------------------------------- > > Key: HADOOP-11618 > URL: https://issues.apache.org/jira/browse/HADOOP-11618 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 2.6.0 > Reporter: Gera Shegalov > Assignee: Brahma Reddy Battula > Attachments: HADOOP-11618-001.patch, HADOOP-11618.patch > > > DelegateToFileSystem constructor has the following code: > {code} > super(theUri, supportedScheme, authorityRequired, > FileSystem.getDefaultUri(conf).getPort()); > {code} > The default port should be taken from theFsImpl instead. > {code} > super(theUri, supportedScheme, authorityRequired, > theFsImpl.getDefaultPort()); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)