[
https://issues.apache.org/jira/browse/HADOOP-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178230#comment-13178230
]
Niels Basjes commented on HADOOP-7945:
--------------------------------------
Sorry, that was unreadable.
{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
{code}
> 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