From hdfs-issues-return-254176-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Mar 1 12:33:04 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 09B42180647 for ; Fri, 1 Mar 2019 13:33:03 +0100 (CET) Received: (qmail 29049 invoked by uid 500); 1 Mar 2019 12:33:03 -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 29033 invoked by uid 99); 1 Mar 2019 12:33:03 -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; Fri, 01 Mar 2019 12:33:03 +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 86FC9180DFB for ; Fri, 1 Mar 2019 12:33:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, 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 tZBRbRmFTyTe for ; Fri, 1 Mar 2019 12:33:01 +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 0887E6112D for ; Fri, 1 Mar 2019 12:33:01 +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 72B27E01AC for ; Fri, 1 Mar 2019 12:33:00 +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 20A06256F0 for ; Fri, 1 Mar 2019 12:33:00 +0000 (UTC) Date: Fri, 1 Mar 2019 12:33:00 +0000 (UTC) From: "Srinivasu Majeti (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-14323) Distcp fails in Hadoop 3.x when 2.x source webhdfs url has special characters in hdfs file path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-14323?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1678= 1621#comment-16781621 ]=20 Srinivasu Majeti commented on HDFS-14323: ----------------------------------------- Hi [~hadoopqa], =C2=A0Below test case covers single cluster webhdfs url with special charac= ters already.=C2=A0 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/Te= stWebHdfsUrl.java . Specific to this bug , we need one hadoop 3.x and one 2= .x cluster ideally which is not feasible to automate test i guess. Others c= an comment . Thanks and Regards, Majeti. > Distcp fails in Hadoop 3.x when 2.x source webhdfs url has special charac= ters in hdfs file path > -------------------------------------------------------------------------= ---------------------- > > Key: HDFS-14323 > URL: https://issues.apache.org/jira/browse/HDFS-14323 > Project: Hadoop HDFS > Issue Type: Bug > Components: webhdfs > Affects Versions: 3.2.0 > Reporter: Srinivasu Majeti > Priority: Major > Attachments: HDFS-14323v0.patch > > > There was an enhancement to allow semicolon in source/target URLs for dis= tcp use case as part of HDFS-13176 and backward compatibility fix as part o= f=C2=A0HDFS-13582 . Still there seems to be an issue when trying to trigger= distcp from 3.x cluster to pull webhdfs data from 2.x hadoop cluster. We m= ight need to deal with existing fix as described below by making sure if ur= l is already encoded or not. That fixes it.=C2=A0 > diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apa= che/hadoop/hdfs/web/WebHdfsFileSystem.java b/hadoop-hdfs-project/hadoop-hdf= s-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java > index 5936603c34a..dc790286aff 100644 > --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/had= oop/hdfs/web/WebHdfsFileSystem.java > +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/had= oop/hdfs/web/WebHdfsFileSystem.java > @@ -609,7 +609,10 @@ URL toUrl(final HttpOpParam.Op op, final Path fspath= , > boolean pathAlreadyEncoded =3D false; > try { > fspathUriDecoded =3D URLDecoder.decode(fspathUri.getPath(), "UTF-8"); > - pathAlreadyEncoded =3D true; > + if(!fspathUri.getPath().equals(fspathUriDecoded)) > + { > + pathAlreadyEncoded =3D true; > + } > } catch (IllegalArgumentException ex) { > LOG.trace("Cannot decode URL encoded file", ex); > } > =C2=A0 > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org