Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-13

filenames with ':' colon throws java.lang.IllegalArgumentException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

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

      $ 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

      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.

      1. 2066_20071022.patch
        4 kB
        Tsz Wo Nicholas Sze
      2. HADOOP-2066.patch
        2 kB
        Doug Cutting

        Issue Links

          Activity

          Lohit Vijayarenu created issue -
          Jim Kellerman made changes -
          Field Original Value New Value
          Link This issue duplicates HADOOP-2056 [ HADOOP-2056 ]
          Jim Kellerman made changes -
          Link This issue duplicates HADOOP-2056 [ HADOOP-2056 ]
          Doug Cutting made changes -
          Attachment HADOOP-2066.patch [ 12367891 ]
          Lohit Vijayarenu made changes -
          Description 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.<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
          [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.
          File names containing colon ":" throws java.lang.IllegalArgumentException while LINUX file system supports it.

          $ 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

          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.
          Tsz Wo Nicholas Sze made changes -
          Attachment 2066_20071019.patch [ 12368059 ]
          Tsz Wo Nicholas Sze made changes -
          Attachment 2066_20071022.patch [ 12368184 ]
          Tsz Wo Nicholas Sze made changes -
          Attachment 2066_20071019.patch [ 12368059 ]
          Arun C Murthy made changes -
          Link This issue is related to HADOOP-3256 [ HADOOP-3256 ]
          Arun C Murthy made changes -
          Link This issue is part of HADOOP-3257 [ HADOOP-3257 ]
          Tsz Wo Nicholas Sze made changes -
          Link This issue is related to HADOOP-3173 [ HADOOP-3173 ]
          Tsz Wo Nicholas Sze made changes -
          Link This issue relates to HADOOP-3733 [ HADOOP-3733 ]
          Owen O'Malley made changes -
          Project Hadoop Common [ 12310240 ] HDFS [ 12310942 ]
          Key HADOOP-2066 HDFS-13
          Component/s dfs [ 12310710 ]
          Tsz Wo Nicholas Sze made changes -
          Link This issue is related to HADOOP-6334 [ HADOOP-6334 ]
          Harsh J made changes -
          Link This issue is duplicated by HDFS-2557 [ HDFS-2557 ]
          Harsh J made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Lohit Vijayarenu
            • Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development