From hdfs-issues-return-254108-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Mar 1 05:06:06 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 834DA180676 for ; Fri, 1 Mar 2019 06:06:05 +0100 (CET) Received: (qmail 53230 invoked by uid 500); 1 Mar 2019 05:06:04 -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 53201 invoked by uid 99); 1 Mar 2019 05:06:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Mar 2019 05:06:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 72147C9AA0 for ; Fri, 1 Mar 2019 05:06:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.5 X-Spam-Level: X-Spam-Status: No, score=-109.5 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, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ps_2OfJA9OSt for ; Fri, 1 Mar 2019 05:06:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3F7D55FE1F for ; Fri, 1 Mar 2019 05:06: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 5F1A9E0D27 for ; Fri, 1 Mar 2019 05:06: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 17A692457F for ; Fri, 1 Mar 2019 05:06:00 +0000 (UTC) Date: Fri, 1 Mar 2019 05:06: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= 1294#comment-16781294 ]=20 Srinivasu Majeti commented on HDFS-14323: ----------------------------------------- Hi [~jojochuang] and [~zvenczel], =C2=A0We would need try webhdfs url with some special character like below. [hdfs@c1265-node2 root]$=C2=A0hadoop distcp webhdfs://c2265-node2.hwx.com:5= 0070/tmp/date=3D1234557 /check You could see an failure with exception like below. 19/02/21 06:35:59 DEBUG security.UserGroupInformation: PrivilegedActionExce= ption as:xxxxxxxx=C2=A0 (auth:KERBEROS) cause:java.io.FileNotFoundException= : File does not exist: /tmp/date%3D1234557 19/02/21 06:35:59 DEBUG ipc.ProtobufRpcEngine: Call: delete took 4ms 19/02/21 06:35:59 ERROR tools.DistCp: Invalid input: org.apache.hadoop.tools.CopyListing$InvalidInputException: webhdfs://c2265-= node2.hwx.com:50070/tmp/date=3D1234557 doesn't exist c1265-node2 -> 3.x [ hadoop 3.2.0=C2=A0]=C2=A0client=C2=A0 c2265-node2.hwx.com -> 2.x=C2=A0cluster NN . 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 > > 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