Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13792

Stackoverflow for schemeless defaultFS with trailing slash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.2
    • 3.0.0-alpha2
    • fs
    • None
    • Incompatible change, Reviewed
    • FileSystem#getDefaultUri will throw IllegalArgumentException if default FS has no scheme and can not be fixed.

    Description

      Command: hadoop fs -fs 172.16.12.79/ -mkdir -p /usr/hduser

      Results in a Stack Overflow

      Exception in thread "main" java.lang.StackOverflowError
      	at java.lang.String.indexOf(String.java:1503)
      	at java.net.URI$Parser.scan(URI.java:2951)
      	at java.net.URI$Parser.parseHierarchical(URI.java:3104)
      	at java.net.URI$Parser.parse(URI.java:3063)
      	at java.net.URI.<init>(URI.java:588)
      	at java.net.URI.create(URI.java:850)
      	at org.apache.hadoop.fs.FileSystem.getDefaultUri(FileSystem.java:180)
      	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:172)
      	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:357)
      	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:172)
      	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:357)
              (...)
      

      The Problem is the Slash at the End of the IP Address. When I remove it, the command is executed correctly.

      Attachments

        1. HADOOP-13792.001.patch
          6 kB
          John Zhuge
        2. HADOOP-13792.002.patch
          6 kB
          John Zhuge
        3. HADOOP-13792.003.patch
          6 kB
          John Zhuge

        Issue Links

          Activity

            People

              jzhuge John Zhuge
              dariusgm Darius Murawski
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: