List Info

Thread: Created: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException




Created: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException
country flaguser name
United States
2007-10-16 16:52:50
filenames with ':' colon throws
java.lang.IllegalArgumentException
------------------------------------------------------------
------

                 Key: HADOOP-2066
                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
             Project: Hadoop
          Issue Type: Bug
          Components: dfs
            Reporter: lohit vijayarenu


File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.

[lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
URI: testfile-2007-09-24-03:00:00.gz
	at org.apache.hadoop.fs.Path.initialize(Path.java:140)
	at org.apache.hadoop.fs.Path.<init>(Path.java:126)
	at org.apache.hadoop.fs.Path.<init>(Path.java:50)
	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
	at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

	at org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
	at org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
Caused by: java.net.URISyntaxException: Relative path in
absolute URI: testfile-2007-09-24-03:00:00.gz
	at java.net.URI.checkPath(URI.java:1787)
	at java.net.URI.<init>(URI.java:735)
	at org.apache.hadoop.fs.Path.initialize(Path.java:137)
	... 10 more
[lohitkrygw1000 ~]$ 

Path(String pathString) when given a filename which contains
':' treats it as URI and selects anything before ':' as
scheme, which in this case is clearly not a valid scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Commented: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException
country flaguser name
United States
2007-10-16 18:37:50
    [ https://issues.apache.org/jira/browse
/HADOOP-2066?page=com.atlassian.jira.plugin.system.issuetabp
anels:comment-tabpanel#action_12535371 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-2066:
------------------------------------------------

I guess / is the only invalid character for the path in
Linux.  All filenames below are valid.

A#B  A$B  A%B  A&B  A*B  A+B  A,B  A:B  A;B  A=B  A?B 
A[B  AB  A^B  A{B


> filenames with ':' colon throws
java.lang.IllegalArgumentException
>
------------------------------------------------------------
------
>
>                 Key: HADOOP-2066
>                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: lohit vijayarenu
>
> File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.
> [lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
> Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
> URI: testfile-2007-09-24-03:00:00.gz
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:140)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:126)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:50)
> 	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
> 	at
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
> 	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

> 	at
org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
> 	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
> 	at
org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
> Caused by: java.net.URISyntaxException: Relative path
in absolute URI: testfile-2007-09-24-03:00:00.gz
> 	at java.net.URI.checkPath(URI.java:1787)
> 	at java.net.URI.<init>(URI.java:735)
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:137)
> 	... 10 more
> [lohitkrygw1000 ~]$ 
> Path(String pathString) when given a filename which
contains ':' treats it as URI and selects anything before
':' as
> scheme, which in this case is clearly not a valid
scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Issue Comment Edited: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgume
country flaguser name
United States
2007-10-16 18:47:50
    [ https://issues.apache.org/jira/browse
/HADOOP-2066?page=com.atlassian.jira.plugin.system.issuetabp
anels:comment-tabpanel#action_12535371 ] 

szetszwo edited comment on HADOOP-2066 at 10/16/07 4:47 PM:
------------------------------------------------------------
--------------

I guess / is the only invalid character for the filename in
Linux (GNU/Linux).  All filenames below are valid.

A#B  A$B  A%B  A&B  A*B  A+B  A,B  A:B  A;B  A=B  A?B 
A[B  AB  A^B  A{B


      was (Author: szetszwo):
    I guess / is the only invalid character for the path in
Linux.  All filenames below are valid.

A#B  A$B  A%B  A&B  A*B  A+B  A,B  A:B  A;B  A=B  A?B 
A[B  AB  A^B  A{B

  
> filenames with ':' colon throws
java.lang.IllegalArgumentException
>
------------------------------------------------------------
------
>
>                 Key: HADOOP-2066
>                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: lohit vijayarenu
>
> File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.
> [lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
> Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
> URI: testfile-2007-09-24-03:00:00.gz
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:140)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:126)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:50)
> 	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
> 	at
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
> 	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

> 	at
org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
> 	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
> 	at
org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
> Caused by: java.net.URISyntaxException: Relative path
in absolute URI: testfile-2007-09-24-03:00:00.gz
> 	at java.net.URI.checkPath(URI.java:1787)
> 	at java.net.URI.<init>(URI.java:735)
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:137)
> 	... 10 more
> [lohitkrygw1000 ~]$ 
> Path(String pathString) when given a filename which
contains ':' treats it as URI and selects anything before
':' as
> scheme, which in this case is clearly not a valid
scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Commented: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException
country flaguser name
United States
2007-10-16 19:04:50
    [ https://issues.apache.org/jira/browse
/HADOOP-2066?page=com.atlassian.jira.plugin.system.issuetabp
anels:comment-tabpanel#action_12535378 ] 

Doug Cutting commented on HADOOP-2066:
--------------------------------------

The bug is not that this fails, but that it still fails even
if you escape the colons, turning them into '%3a'. 
Path(String) does not properly handle escapes.

> filenames with ':' colon throws
java.lang.IllegalArgumentException
>
------------------------------------------------------------
------
>
>                 Key: HADOOP-2066
>                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: lohit vijayarenu
>
> File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.
> [lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
> Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
> URI: testfile-2007-09-24-03:00:00.gz
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:140)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:126)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:50)
> 	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
> 	at
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
> 	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

> 	at
org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
> 	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
> 	at
org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
> Caused by: java.net.URISyntaxException: Relative path
in absolute URI: testfile-2007-09-24-03:00:00.gz
> 	at java.net.URI.checkPath(URI.java:1787)
> 	at java.net.URI.<init>(URI.java:735)
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:137)
> 	... 10 more
> [lohitkrygw1000 ~]$ 
> Path(String pathString) when given a filename which
contains ':' treats it as URI and selects anything before
':' as
> scheme, which in this case is clearly not a valid
scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Commented: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException
country flaguser name
United States
2007-10-17 05:14:50
    [ https://issues.apache.org/jira/browse
/HADOOP-2066?page=com.atlassian.jira.plugin.system.issuetabp
anels:comment-tabpanel#action_12535497 ] 

eric baldeschwieler commented on HADOOP-2066:
---------------------------------------------

The API used does not look like a URI API, hence a URI
quoting requirement also seems wrong.

> filenames with ':' colon throws
java.lang.IllegalArgumentException
>
------------------------------------------------------------
------
>
>                 Key: HADOOP-2066
>                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: lohit vijayarenu
>
> File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.
> [lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
> Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
> URI: testfile-2007-09-24-03:00:00.gz
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:140)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:126)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:50)
> 	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
> 	at
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
> 	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

> 	at
org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
> 	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
> 	at
org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
> Caused by: java.net.URISyntaxException: Relative path
in absolute URI: testfile-2007-09-24-03:00:00.gz
> 	at java.net.URI.checkPath(URI.java:1787)
> 	at java.net.URI.<init>(URI.java:735)
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:137)
> 	... 10 more
> [lohitkrygw1000 ~]$ 
> Path(String pathString) when given a filename which
contains ':' treats it as URI and selects anything before
':' as
> scheme, which in this case is clearly not a valid
scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Updated: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException
country flaguser name
United States
2007-10-17 12:47:51
     [ https://issues.apache.org/jira/browse/HADOOP-2066?page=co
m.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated HADOOP-2066:
---------------------------------

    Attachment: HADOOP-2066.patch

> The API used does not look like a URI API, hence a URI
quoting requirement also seems wrong.

It is like a URI constructor.  URI cannot be subclassed, and
we want to add behavior, so we wrap our URIs in Paths.  The
javadoc for the Path constructor says, and has always said,
"Path strings are URIs".  We long-ago settled on
URI syntax for file paths.  So URI escapes seem
appropriate.

I've attached a patch which fixes this on Linux.  Who knows
what havoc it will wreak on Windows, though, where colons in
paths are more common, and requiring applications to escape
them, while correct, may prove painful.


> filenames with ':' colon throws
java.lang.IllegalArgumentException
>
------------------------------------------------------------
------
>
>                 Key: HADOOP-2066
>                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: lohit vijayarenu
>         Attachments: HADOOP-2066.patch
>
>
> File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.
> [lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
> Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
> URI: testfile-2007-09-24-03:00:00.gz
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:140)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:126)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:50)
> 	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
> 	at
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
> 	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

> 	at
org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
> 	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
> 	at
org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
> Caused by: java.net.URISyntaxException: Relative path
in absolute URI: testfile-2007-09-24-03:00:00.gz
> 	at java.net.URI.checkPath(URI.java:1787)
> 	at java.net.URI.<init>(URI.java:735)
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:137)
> 	... 10 more
> [lohitkrygw1000 ~]$ 
> Path(String pathString) when given a filename which
contains ':' treats it as URI and selects anything before
':' as
> scheme, which in this case is clearly not a valid
scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Commented: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException
country flaguser name
United States
2007-10-17 12:49:51
    [ https://issues.apache.org/jira/browse
/HADOOP-2066?page=com.atlassian.jira.plugin.system.issuetabp
anels:comment-tabpanel#action_12535647 ] 

Doug Cutting commented on HADOOP-2066:
--------------------------------------

By, "fixes this", I mean this permits one to
include colons in filenames by using the escape sequence
"%3a".  In particular, 'bin/hadoop fs -put
foo%3abar baz' will copy the local file named 'foo:bar'.

> filenames with ':' colon throws
java.lang.IllegalArgumentException
>
------------------------------------------------------------
------
>
>                 Key: HADOOP-2066
>                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: lohit vijayarenu
>         Attachments: HADOOP-2066.patch
>
>
> File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.
> [lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
> Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
> URI: testfile-2007-09-24-03:00:00.gz
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:140)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:126)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:50)
> 	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
> 	at
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
> 	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

> 	at
org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
> 	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
> 	at
org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
> Caused by: java.net.URISyntaxException: Relative path
in absolute URI: testfile-2007-09-24-03:00:00.gz
> 	at java.net.URI.checkPath(URI.java:1787)
> 	at java.net.URI.<init>(URI.java:735)
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:137)
> 	... 10 more
> [lohitkrygw1000 ~]$ 
> Path(String pathString) when given a filename which
contains ':' treats it as URI and selects anything before
':' as
> scheme, which in this case is clearly not a valid
scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Commented: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException
country flaguser name
United States
2007-10-17 14:15:50
    [ https://issues.apache.org/jira/browse
/HADOOP-2066?page=com.atlassian.jira.plugin.system.issuetabp
anels:comment-tabpanel#action_12535683 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-2066:
------------------------------------------------

Do you want to use java.net.URLEncoder to encode filename,
so that 'bin/hadoop fs -put foo:bar baz' will work?

> filenames with ':' colon throws
java.lang.IllegalArgumentException
>
------------------------------------------------------------
------
>
>                 Key: HADOOP-2066
>                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: lohit vijayarenu
>         Attachments: HADOOP-2066.patch
>
>
> File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.
> [lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
> Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
> URI: testfile-2007-09-24-03:00:00.gz
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:140)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:126)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:50)
> 	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
> 	at
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
> 	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

> 	at
org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
> 	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
> 	at
org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
> Caused by: java.net.URISyntaxException: Relative path
in absolute URI: testfile-2007-09-24-03:00:00.gz
> 	at java.net.URI.checkPath(URI.java:1787)
> 	at java.net.URI.<init>(URI.java:735)
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:137)
> 	... 10 more
> [lohitkrygw1000 ~]$ 
> Path(String pathString) when given a filename which
contains ':' treats it as URI and selects anything before
':' as
> scheme, which in this case is clearly not a valid
scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Commented: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException
country flaguser name
United States
2007-10-17 14:47:50
    [ https://issues.apache.org/jira/browse
/HADOOP-2066?page=com.atlassian.jira.plugin.system.issuetabp
anels:comment-tabpanel#action_12535695 ] 

Doug Cutting commented on HADOOP-2066:
--------------------------------------

> Do you want to use java.net.URLEncoder to encode
filename, so that 'bin/hadoop fs -put foo:bar baz' will
work?

That would break things like 'bin/hadoop fs -cp
hdfs://a:999/foo/bar baz'.  Colons have an interpretation in
paths, that's why they need to be escaped.


> filenames with ':' colon throws
java.lang.IllegalArgumentException
>
------------------------------------------------------------
------
>
>                 Key: HADOOP-2066
>                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: lohit vijayarenu
>         Attachments: HADOOP-2066.patch
>
>
> File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.
> [lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
> Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
> URI: testfile-2007-09-24-03:00:00.gz
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:140)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:126)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:50)
> 	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
> 	at
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
> 	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

> 	at
org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
> 	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
> 	at
org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
> Caused by: java.net.URISyntaxException: Relative path
in absolute URI: testfile-2007-09-24-03:00:00.gz
> 	at java.net.URI.checkPath(URI.java:1787)
> 	at java.net.URI.<init>(URI.java:735)
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:137)
> 	... 10 more
> [lohitkrygw1000 ~]$ 
> Path(String pathString) when given a filename which
contains ':' treats it as URI and selects anything before
':' as
> scheme, which in this case is clearly not a valid
scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Commented: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException
country flaguser name
United States
2007-10-17 14:54:50
    [ https://issues.apache.org/jira/browse
/HADOOP-2066?page=com.atlassian.jira.plugin.system.issuetabp
anels:comment-tabpanel#action_12535701 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-2066:
------------------------------------------------

We could only encode filenames and directory names but not
the entire string.  Then, all characters except / can be
allowed.

Also, we probably should provide a option to allow user
giving a raw URI.

> filenames with ':' colon throws
java.lang.IllegalArgumentException
>
------------------------------------------------------------
------
>
>                 Key: HADOOP-2066
>                 URL: htt
ps://issues.apache.org/jira/browse/HADOOP-2066
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: lohit vijayarenu
>         Attachments: HADOOP-2066.patch
>
>
> File names containing colon ":" throws 
java.lang.IllegalArgumentException while LINUX file system
supports it.
> [lohitkrygw1000 ~]$ hadoop dfs -put
./testfile-2007-09-24-03:00:00.gz filenametest
> Exception in thread "main"
java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute
> URI: testfile-2007-09-24-03:00:00.gz
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:140)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:126)
> 	at
org.apache.hadoop.fs.Path.<init>(Path.java:50)
> 	at
org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:273)
> 	at
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:117)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:776)
> 	at
org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem
.java:757)
> 	at
org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:116)

> 	at
org.apache.hadoop.fs.FsShell.run(FsShell.java:1229)
> 	at
org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:187)
> 	at
org.apache.hadoop.fs.FsShell.main(FsShell.java:1342)
> Caused by: java.net.URISyntaxException: Relative path
in absolute URI: testfile-2007-09-24-03:00:00.gz
> 	at java.net.URI.checkPath(URI.java:1787)
> 	at java.net.URI.<init>(URI.java:735)
> 	at
org.apache.hadoop.fs.Path.initialize(Path.java:137)
> 	... 10 more
> [lohitkrygw1000 ~]$ 
> Path(String pathString) when given a filename which
contains ':' treats it as URI and selects anything before
':' as
> scheme, which in this case is clearly not a valid
scheme.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


[1-10] [11-20] [21-26]

about | contact  Other archives ( Real Estate discussion Medical topics )