You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Tsz Wo Nicholas Sze (JIRA)" <ji...@apache.org> on 2015/04/30 05:47:06 UTC

[jira] [Updated] (HDFS-8288) Refactor DFSStripedOutputStream and StripedDataStreamer

     [ https://issues.apache.org/jira/browse/HDFS-8288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo Nicholas Sze updated HDFS-8288:
--------------------------------------
    Attachment: h8288_20150429.patch

h8288_20150429.patch: adds Coordinator and CellBuffers.

> Refactor DFSStripedOutputStream and StripedDataStreamer
> -------------------------------------------------------
>
>                 Key: HDFS-8288
>                 URL: https://issues.apache.org/jira/browse/HDFS-8288
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>         Attachments: h8288_20150429.patch
>
>
> - 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,
> {code}
> //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);
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)