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

TransferFsImage.downloadEditsToStorage should use a tmp file for destination

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.2-alpha
    • Fix Version/s: 2.1.0-beta
    • Component/s: None
    • Labels:
      None

      Description

      Currently, in TransferFsImage.downloadEditsToStorage, we download the edits file directly to its finalized path. So, if the transfer fails in the middle, a half-written file is left and cannot be distinguished from a correct file. So, future checkpoints by the 2NN will fail, since the file is truncated in the middle – but it won't ever download a good copy because it thinks it already has the proper file.

        Attachments

        1. hdfs-4300-1.patch
          10 kB
          Andrew Wang
        2. hdfs-4300-2.patch
          17 kB
          Andrew Wang
        3. hdfs-4300-3.patch
          17 kB
          Andrew Wang
        4. hdfs-4300-4.patch
          17 kB
          Aaron T. Myers
        5. hdfs-4300-5.patch
          17 kB
          Andrew Wang

          Issue Links

            Activity

              People

              • Assignee:
                andrew.wang Andrew Wang
                Reporter:
                tlipcon Todd Lipcon
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: