Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98E509F0F for ; Sun, 1 Jan 2012 20:47:54 +0000 (UTC) Received: (qmail 32020 invoked by uid 500); 1 Jan 2012 20:47:54 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 31991 invoked by uid 500); 1 Jan 2012 20:47:54 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 31983 invoked by uid 99); 1 Jan 2012 20:47:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jan 2012 20:47:54 +0000 X-ASF-Spam-Status: No, hits=-2001.6 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jan 2012 20:47:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AAF20133CD1 for ; Sun, 1 Jan 2012 20:47:30 +0000 (UTC) Date: Sun, 1 Jan 2012 20:47:30 +0000 (UTC) From: "Niels Basjes (Commented) (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <204502699.56929.1325450850701.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1145991604.56798.1325436810908.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HADOOP-7945) Document that Path objects do not support ":" in them. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178228#comment-13178228 ] Niels Basjes commented on HADOOP-7945: -------------------------------------- Quick shot: Simply add another check to the already existing checkPathArg method in the Path class. I.e. something like this (I never tested this code): diff --git hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java index 81c79db..e135efb 100644 --- hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java +++ hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java @@ -90,7 +90,13 @@ public class Path implements Comparable { if( path.length() == 0 ) { throw new IllegalArgumentException( "Can not create a Path from an empty string"); - } + } + if( path.contains(":") ) { + throw new IllegalArgumentException( + "Can not create Path because Path is limited by URI semantics "+ + "in the sense that one cannot create files whose names include "+ + "characters such as \":\" etc."); + } } /** Construct a path from a String. Path strings are URIs, but with > Document that Path objects do not support ":" in them. > ------------------------------------------------------ > > Key: HADOOP-7945 > URL: https://issues.apache.org/jira/browse/HADOOP-7945 > Project: Hadoop Common > Issue Type: Improvement > Affects Versions: 0.20.0 > Reporter: Harsh J > Priority: Critical > Labels: newbie > > Until HADOOP-3257 is fixed, this particular exclusion should be documented. This is a major upsetter to many beginners. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira