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

Erasure coding: preallocate multiple generation stamps and serialize updates from data streamers

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: HDFS-7285
    • Fix Version/s: None
    • Component/s: erasure-coding

      Description

      A non-striped DataStreamer goes through the following steps in error handling:

      1) Finds error => 2) Asks NN for new GS => 3) Gets new GS from NN => 4) Applies new GS to DN (createBlockOutputStream) => 5) Ack from DN => 6) Updates block on NN
      

      With multiple streamer threads run in parallel, we need to correctly handle a large number of possible combinations of interleaved thread events. For example, streamer_B starts step 2 in between events streamer_A.2 and streamer_A.3.

      HDFS-9040 moves steps 1, 2, 3, 6 from streamer to DFSStripedOutputStream. This JIRA proposes some further optimizations based on HDFS-9040:

      1. We can preallocate GS when NN creates a new striped block group (FSN#createNewBlock). For each new striped block group we can reserve NUM_PARITY_BLOCKS GS's. If more than NUM_PARITY_BLOCKS errors have happened we shouldn't try to further recover anyway.
      2. We can use a dedicated event processor to offload the error handling logic from DFSStripedOutputStream, which is not a long running daemon.
      3. We can limit the lifespan of a streamer to be a single block. A streamer ends either after finishing the current block or when encountering a DN failure.

      With the proposed change, a StripedDataStreamer's flow becomes:

      1) Finds DN error => 2) Notify coordinator (async, not waiting for response) => terminates
      1) Finds external error => 2) Applies new GS to DN (createBlockOutputStream) => 3) Ack from DN => 4) Notify coordinator (async, not waiting for response)
      

        Attachments

        1. HDFS-9079-HDFS-7285.00.patch
          41 kB
          Zhe Zhang
        2. HDFS-9079.01.patch
          40 kB
          Zhe Zhang
        3. HDFS-9079.02.patch
          44 kB
          Zhe Zhang
        4. HDFS-9079.03.patch
          48 kB
          Zhe Zhang
        5. HDFS-9079.04.patch
          49 kB
          Zhe Zhang
        6. HDFS-9079.05.patch
          55 kB
          Zhe Zhang
        7. HDFS-9079.06.patch
          56 kB
          Zhe Zhang
        8. HDFS-9079.07.patch
          56 kB
          Zhe Zhang
        9. HDFS-9079.08.patch
          59 kB
          Zhe Zhang
        10. HDFS-9079.09.patch
          61 kB
          Zhe Zhang
        11. HDFS-9079.10.patch
          61 kB
          Zhe Zhang
        12. HDFS-9079.11.patch
          61 kB
          Zhe Zhang
        13. HDFS-9079.12.patch
          61 kB
          Zhe Zhang
        14. HDFS-9079.13.patch
          64 kB
          Zhe Zhang
        15. HDFS-9079.14.patch
          64 kB
          Zhe Zhang
        16. HDFS-9079.15.patch
          65 kB
          Zhe Zhang

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                zhz Zhe Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated: