Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 71185 invoked from network); 17 Oct 2007 19:48:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Oct 2007 19:48:12 -0000 Received: (qmail 88482 invoked by uid 500); 17 Oct 2007 19:47:59 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 88440 invoked by uid 500); 17 Oct 2007 19:47:59 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 88431 invoked by uid 99); 17 Oct 2007 19:47:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2007 12:47:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2007 19:48:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C3ADF714208 for ; Wed, 17 Oct 2007 12:47:50 -0700 (PDT) Message-ID: <25438021.1192650470798.JavaMail.jira@brutus> Date: Wed, 17 Oct 2007 12:47:50 -0700 (PDT) From: "Doug Cutting (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Commented: (HADOOP-2066) filenames with ':' colon throws java.lang.IllegalArgumentException In-Reply-To: <33532274.1192571570841.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-2066?page=com.atlassian.jira.plugin.system.issuetabpanels: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: https://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. > [lohit@krygw1000 ~]$ 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.(Path.java:126) > at org.apache.hadoop.fs.Path.(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.(URI.java:735) > at org.apache.hadoop.fs.Path.initialize(Path.java:137) > ... 10 more > [lohit@krygw1000 ~]$ > 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.