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

distcp overwrites files even when there are missing checksums

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0.2-alpha
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None

      Description

      If distcp can't read the checksum files for the source and destination files-- for any reason-- it ignores the checksums and overwrites the destination file. It does produce a log message, but I think the correct behavior would be to throw an error and stop the distcp.

      If the user really wants to ignore checksums, he or she can use -skipcrccheck to do so.

      The relevant code is in DistCpUtils#checksumsAreEquals:

          try {
            sourceChecksum = sourceFS.getFileChecksum(source);
            targetChecksum = targetFS.getFileChecksum(target);
          } catch (IOException e) {
            LOG.error("Unable to retrieve checksum for " + source + " or " + target, e);
          }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cmccabe Colin P. McCabe
              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: