Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EE605200D67 for ; Sun, 24 Dec 2017 15:39:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E3ED0160C1D; Sun, 24 Dec 2017 14:39:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3484B160C0B for ; Sun, 24 Dec 2017 15:39:13 +0100 (CET) Received: (qmail 48713 invoked by uid 500); 24 Dec 2017 14:39:12 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 48696 invoked by uid 99); 24 Dec 2017 14:39:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Dec 2017 14:39:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A1EC6180A4D for ; Sun, 24 Dec 2017 14:39:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id r4SujTs6dKsk for ; Sun, 24 Dec 2017 14:39:10 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 4309C5F39D for ; Sun, 24 Dec 2017 14:39:10 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C4E22E0012 for ; Sun, 24 Dec 2017 14:39:08 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B960A240E2 for ; Sun, 24 Dec 2017 14:39:04 +0000 (UTC) Date: Sun, 24 Dec 2017 14:39:00 +0000 (UTC) From: "Ted Yu (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-6092) DistributedFileSystem#getCanonicalServiceName() and DistributedFileSystem#getUri() may return inconsistent results w.r.t. port MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 24 Dec 2017 14:39:14 -0000 [ https://issues.apache.org/jira/browse/HDFS-6092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HDFS-6092: ------------------------- Status: Open (was: Patch Available) > DistributedFileSystem#getCanonicalServiceName() and DistributedFileSystem#getUri() may return inconsistent results w.r.t. port > ------------------------------------------------------------------------------------------------------------------------------ > > Key: HDFS-6092 > URL: https://issues.apache.org/jira/browse/HDFS-6092 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 2.3.0 > Reporter: Ted Yu > Labels: BB2015-05-TBR > Attachments: HDFS-6092-v4.patch, haosdent-HDFS-6092-v2.patch, haosdent-HDFS-6092.patch, hdfs-6092-v1.txt, hdfs-6092-v2.txt, hdfs-6092-v3.txt > > > I discovered this when working on HBASE-10717 > Here is sample code to reproduce the problem: > {code} > Path desPath = new Path("hdfs://127.0.0.1/"); > FileSystem desFs = desPath.getFileSystem(conf); > > String s = desFs.getCanonicalServiceName(); > URI uri = desFs.getUri(); > {code} > Canonical name string contains the default port - 8020 > But uri doesn't contain port. > This would result in the following exception: > {code} > testIsSameHdfs(org.apache.hadoop.hbase.util.TestFSHDFSUtils) Time elapsed: 0.001 sec <<< ERROR! > java.lang.IllegalArgumentException: port out of range:-1 > at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143) > at java.net.InetSocketAddress.(InetSocketAddress.java:224) > at org.apache.hadoop.hbase.util.FSHDFSUtils.getNNAddresses(FSHDFSUtils.java:88) > {code} > Thanks to Brando Li who helped debug this. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org