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

HDFS reports file already exists if there is a file/dir name end with ._COPYING_

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7.0
    • Fix Version/s: None
    • Component/s: fs
    • Labels:
      None

      Description

      Because CLI is using CommandWithDestination.java which add ".COPYING" to the tail of file name when it does the copy. It will cause problem if there is a file/dir already called *.COPYING on HDFS.

      For file:
      -bash-4.1$ hadoop fs -put 5M /user/occ/
      -bash-4.1$ hadoop fs -mv /user/occ/5M /user/occ/5M.COPYING
      -bash-4.1$ hadoop fs -ls /user/occ/
      Found 1 items
      rw-rr- 1 occ supergroup 5242880 2015-06-26 05:16 /user/occ/5M.COPYING
      -bash-4.1$ hadoop fs -put 128K /user/occ/5M
      -bash-4.1$ hadoop fs -ls /user/occ/
      Found 1 items
      rw-rr- 1 occ supergroup 131072 2015-06-26 05:19 /user/occ/5M

      For dir:
      -bash-4.1$ hadoop fs -mkdir /user/occ/5M.COPYING
      -bash-4.1$ hadoop fs -ls /user/occ/
      Found 1 items
      drwxr-xr-x - occ supergroup 0 2015-06-26 05:24 /user/occ/5M.COPYING
      -bash-4.1$ hadoop fs -put 128K /user/occ/5M
      put: /user/occ/5M.COPYING already exists as a directory
      -bash-4.1$ hadoop fs -ls /user/occ/
      (/user/occ/5M.COPYING is gone)

        Attachments

        1. HADOOP-8673.004.patch
          7 kB
          Chen He
        2. HDFS-8673.000.patch
          6 kB
          Chen He
        3. HDFS-8673.000-WIP.patch
          1 kB
          Chen He
        4. HDFS-8673.001.patch
          7 kB
          Chen He
        5. HDFS-8673.002.patch
          7 kB
          Chen He
        6. HDFS-8673.003.patch
          7 kB
          Chen He
        7. HDFS-8673.003.patch
          7 kB
          Chen He

          Issue Links

            Activity

              People

              • Assignee:
                airbots Chen He
                Reporter:
                airbots Chen He
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: