Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-916

Rewrite DFSOutputStream to use a single thread with NIO


    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.22.0
    • Fix Version/s: None
    • Component/s: hdfs-client
    • Labels:


      The DFS write pipeline code has some really hairy multi-threaded synchronization. There have been a lot of bugs produced by this (HDFS-101, HDFS-793, HDFS-915, tens of others) since it's very hard to understand the message passing, lock sharing, and interruption properties. The reason for the multiple threads is to be able to simultaneously send and receive. If instead of using multiple threads, it used nonblocking IO, I think the whole thing would be a lot less error prone.

      I think we could do this in two halves: one half is the DFSOutputStream. The other half is BlockReceiver. I opened this JIRA first as I think it's simpler (only one TCP connection to deal with, rather than an up and downstream)

      Opinions? Am I crazy? I would like to see some agreement on the idea before I spend time writing code.

        Issue Links


          No work has yet been logged on this issue.


            • Assignee:
              Todd Lipcon
              Todd Lipcon
            • Votes:
              1 Vote for this issue
              22 Start watching this issue


              • Created: