[ https://issues.apache.org/jira/browse/HDFS-13045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426165#comment-16426165 ]
Wei Yan commented on HDFS-13045: -------------------------------- {quote}bq.I went with your first proposal there; I had to remember the original path but that's fairly simple (didn't check super carefully if there was another place with the original path though). {quote} Recording the orginal path is a very good idea. One tracky here is, if the destination contains repeated destination paths, the replacement will replace all destination paths. For example, mount point "/ns1/a" maps "/a" in ns1, and the error message like "...../a/a/b...", the replacement will replace both "/a". BTW, could u explain more about the following code... get confused here. {code:java} while (newMsg.equals(msg) && i < dst.length() && i < src.length()) { // Check if we can replace sub folders char dstChar = dst.charAt(dst.length() - 1 - i); char srcChar = src.charAt(src.length() - 1 - i); if (dstChar == srcChar && dstChar != '/') { i++; } else { String dst1 = dst.substring(0, dst.length() - 1 - i); String src1 = src.substring(0, src.length() - 1 - i); newMsg = msg.replaceAll(dst1, src1); } }{code} > 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 > > > Currently, Router directly returns exception response from subcluster to > client, which may not have the correct 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 > user1 does a chown operation on "/a/b", and he doesn't have corresponding > privilege, currently the error msg looks like "Permission denied. user=user1 > is not the owner of inode=/c/d", which may confuse user. Would be better to > reverse the path back to original mount path. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org