Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4090

getFileChecksum() result incompatible when called against zero-byte files.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.23.4, 2.0.2-alpha
    • Fix Version/s: 2.0.3-alpha, 0.23.5
    • Component/s: hdfs-client
    • Labels:
      None

      Description

      When getFileChecksum() is called against a zero-byte file, the branch-1 client returns MD5MD5CRC32FileChecksum with crcPerBlock=0, bytePerCrc=0 and md5=70bc8f4b72a86921468bf8e8441dce51, whereas a null is returned in trunk.

      The null makes sense since there is no actual block checksums, but this breaks the compatibility when doing distCp and calling getFileChecksum() via webhdfs or hftp.

      This JIRA is to make the client to return the same 'magic' value that the branch-1 and earlier clients return.

        Activity

        Kihwal Lee created issue -
        Kihwal Lee made changes -
        Field Original Value New Value
        Assignee Kihwal Lee [ kihwal ]
        Kihwal Lee made changes -
        Attachment hdfs-4090.patch [ 12550084 ]
        Kihwal Lee made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Daryn Sharp made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 3.0.0 [ 12320356 ]
        Fix Version/s 2.0.3-alpha [ 12323274 ]
        Fix Version/s 0.23.5 [ 12323313 ]
        Resolution Fixed [ 1 ]
        Thomas Graves made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Allen Wittenauer made changes -
        Fix Version/s 3.0.0 [ 12320356 ]

          People

          • Assignee:
            Kihwal Lee
            Reporter:
            Kihwal Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development