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

Copying a file to local with Crc throws an exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.20.0
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      $ hadoop dfs -get -crc /user/aa/test.txt test.txt
      get: org.apache.hadoop.dfs.DistributedFileSystem cannot be cast to
      org.apache.hadoop.fs.ChecksumFileSystem

      The problem seems to be caused by the line 251 in FsShell#copyToLocal:

      250;      if (copyCrc) {
      251:        ChecksumFileSystem csfs = (ChecksumFileSystem) srcFS;
                     ...
                   }
      

      Copying crc files to local should not require the source file system to be ChecksumFileSystem.

        Attachments

        1. crcChecksum.patch
          1 kB
          Hairong Kuang
        2. crcChecksum1.patch
          1 kB
          Hairong Kuang

          Activity

            People

            • Assignee:
              hairong Hairong Kuang
              Reporter:
              hairong Hairong Kuang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: