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

Cannot rename file with space in name

    XMLWordPrintableJSON

    Details

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

      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. TestWithStrangeFilenames.java
          2 kB
          Dylan Werner-Meier
        2. pom.xml
          1 kB
          Dylan Werner-Meier

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: