Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7285 Erasure Coding Support inside HDFS
  3. HDFS-8288

Refactor DFSStripedOutputStream and StripedDataStreamer

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • hdfs-client
    • None

    Description

      • DFSStripedOutputStream has a list of StripedDataStreamer(s). The streamers share a data structure List<BlockingQueue<LocatedBlock>> stripeBlocks for communicate located block and end block information.
        For example,
        //StripedDataStreamer.endBlock()
              // before retrieving a new block, transfer the finished block to
              // leading streamer
              LocatedBlock finishedBlock = new LocatedBlock(
                  new ExtendedBlock(block.getBlockPoolId(), block.getBlockId(),
                      block.getNumBytes(), block.getGenerationStamp()), null);
              try {
                boolean offSuccess = stripedBlocks.get(0).offer(finishedBlock, 30,
                    TimeUnit.SECONDS);
        

        It is unnecessary to create a LocatedBlock object for an end block since the locations passed is null. Also, the return value is ignored (i.e. offSuccess is not used).

      • DFSStripedOutputStream has another data structure cellBuffers for computing parity. It should be refactored to a class.

      Attachments

        1. h8288_20150429.patch
          37 kB
          Tsz-wo Sze
        2. HDFS-8288-HDFS-7285.20150430.patch
          36 kB
          Tsz-wo Sze

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: