Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15228

Cannot rename file with space in name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.2.0
    • None
    • webhdfs
    • None
    • Oracle jdk1.8.161

    Description

      Hello,

      While using webhdfs, I encountered a strange bug where I just cannot rename a file if it has a space in the filename.

      It seems strange to me, is there anything I am missing ?

       

      Edit: After some debugging, it seems to be linked with the way spaces are encoded the webhdfs url: the JDK's URLEncoder uses '+' to encode spaces, whereas a CURL command where the filename is encoded with '%20' for spaces works just fine.

      Attachments

        1. pom.xml
          1 kB
          Dylan Werner-Meier
        2. TestWithStrangeFilenames.java
          2 kB
          Dylan Werner-Meier

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dwernerm Dylan Werner-Meier
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: