From hdfs-issues-return-215757-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Apr 6 20:45:03 2018 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 2FB1E180649 for ; Fri, 6 Apr 2018 20:45:03 +0200 (CEST) Received: (qmail 84125 invoked by uid 500); 6 Apr 2018 18:45:02 -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 84113 invoked by uid 99); 6 Apr 2018 18:45:02 -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, 06 Apr 2018 18:45:02 +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 9733FC1225 for ; Fri, 6 Apr 2018 18:45:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, 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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id GuTXqfAuwGsV for ; Fri, 6 Apr 2018 18:45: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 D6ACF5F17F for ; Fri, 6 Apr 2018 18:45:00 +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 7196CE024A for ; Fri, 6 Apr 2018 18:45: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 3214D2562B for ; Fri, 6 Apr 2018 18:45:00 +0000 (UTC) Date: Fri, 6 Apr 2018 18:45:00 +0000 (UTC) From: "Wei Yan (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-13045) RBF: Improve error message returned from subcluster 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-13045?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1642= 8768#comment-16428768 ]=20 Wei Yan commented on HDFS-13045: -------------------------------- I cannot produce the error pattern I mentioned above through some fs operat= ions. Not sure whether it is still valid. The following code is just a quic= k test against this error pattern. {code:java} String msg =3D "Parent directory doesn't exist: /a/a/b"; String src =3D "/ns1/a"; String dst =3D "/a"; String newMsg =3D msg.replaceAll(dst, src); int minLen =3D Math.min(dst.length(), src.length()); for (int i =3D 0; newMsg.equals(msg) && i < minLen; i++) { // Check if we can replace sub folders String dst1 =3D dst.substring(0, dst.length() - 1 - i); String src1 =3D src.substring(0, src.length() - 1 - i); newMsg =3D msg.replaceAll(dst1, src1); } System.out.println(newMsg);{code} I think currently the patch cannot handle it, as it replaceAll at the first= place. One more nit thing is, we may also need to set the stackTrace back when gen= erating the new exception. > RBF: Improve error message returned from subcluster > --------------------------------------------------- > > Key: HDFS-13045 > URL: https://issues.apache.org/jira/browse/HDFS-13045 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: Wei Yan > Assignee: Wei Yan > Priority: Minor > Attachments: HDFS-13045.000.patch, HDFS-13045.001.patch, HDFS-130= 45.002.patch > > > Currently, Router directly returns exception response from subcluster to = client, which may not have the=C2=A0correct error message, especially when = the error message containing a path. > One example, we have a mount path "/a/b" mapped to subclusterA's "/c/d". = If=C2=A0user1 does a=C2=A0chown=C2=A0operation on "/a/b",=C2=A0and he doesn= 't have corresponding privilege, currently the error msg looks like "Permis= sion denied. user=3Duser1 is not the owner of inode=3D/c/d", which may conf= use user. Would be better to reverse the path back to original mount path. > =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