Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-17932

Distcp file length comparison have no effect

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      the params for compareFileLengthsAndChecksums in RetriableFileCopyCommand have no effect

      current is

              DistCpUtils.compareFileLengthsAndChecksums(source.getLen(), sourceFS,
                      sourcePath, sourceChecksum, targetFS,
                      targetPath, skipCrc, source.getLen());
      public static void compareFileLengthsAndChecksums(long srcLen,
                 FileSystem sourceFS, Path source, FileChecksum sourceChecksum,
                 FileSystem targetFS, Path target, boolean skipCrc,
                 long targetLen) throws IOException {
        if (srcLen != targetLen) {
          throw new IOException(
              DistCpConstants.LENGTH_MISMATCH_ERROR_MSG + source + " (" + srcLen
                  + ") and target:" + target + " (" + targetLen + ")");
        }
      

      so, compare source.getLen() with source.getLen()...

      It should be like below in history view

              DistCpUtils.compareFileLengthsAndChecksums(source.getLen(), sourceFS,
                      sourcePath, sourceChecksum, targetFS,
                      targetPath, skipCrc, offset + bytesRead);
      

       

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            adol yinan zhan
            adol yinan zhan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m

                Slack

                  Issue deployment