[ 
https://issues.apache.org/jira/browse/HADOOP-12842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168437#comment-15168437
 ] 

Plamen Jeliazkov commented on HADOOP-12842:
-------------------------------------------

[~iwasakims], thanks for the link there.

If that is the intended specification then it is not being enforced; but that 
is a separate issue. Shall I close this JIRA then or re-purpose it?

> LocalFileSystem checksum file creation fails when source filename contains a 
> colon
> ----------------------------------------------------------------------------------
>
>                 Key: HADOOP-12842
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12842
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.6.4
>            Reporter: Plamen Jeliazkov
>            Assignee: Plamen Jeliazkov
>            Priority: Minor
>         Attachments: HADOOP-12842_trunk.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> In most FileSystems you can create a file with a colon character in it, 
> including HDFS. If you try to use the LocalFileSystem implementation (which 
> extends ChecksumFileSystem) to create a file with a colon character in it you 
> get a URISyntaxException during the creation of the checksum file because of 
> the use of {code}new Path(path, checksumFile){code} where checksumFile will 
> be considered as a relative path during URI parsing due to starting with a 
> "." and containing a ":" in the path.  
> Running the following test inside TestLocalFileSystem causes the failure:
> {code}
> @Test
>   public void testColonFilePath() throws Exception {
>     FileSystem fs = fileSys;
>     Path file = new Path(TEST_ROOT_DIR + Path.SEPARATOR + "fileWith:InIt");
>     fs.delete(file, true);
>     FSDataOutputStream out = fs.create(file);
>     try {
>       out.write("text1".getBytes());
>     } finally {
>       out.close();
>     }
> }
> {code}
> With the following stack trace:
> {code}
> java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative 
> path in absolute URI: .fileWith:InIt.crc
>       at java.net.URI.checkPath(URI.java:1804)
>       at java.net.URI.<init>(URI.java:752)
>       at org.apache.hadoop.fs.Path.initialize(Path.java:201)
>       at org.apache.hadoop.fs.Path.<init>(Path.java:170)
>       at org.apache.hadoop.fs.Path.<init>(Path.java:92)
>       at 
> org.apache.hadoop.fs.ChecksumFileSystem.getChecksumFile(ChecksumFileSystem.java:88)
>       at 
> org.apache.hadoop.fs.ChecksumFileSystem$ChecksumFSOutputSummer.<init>(ChecksumFileSystem.java:397)
>       at 
> org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:456)
>       at 
> org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:435)
>       at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:921)
>       at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:902)
>       at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:798)
>       at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:787)
>       at 
> org.apache.hadoop.fs.TestLocalFileSystem.testColonFilePath(TestLocalFileSystem.java:625)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to