You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "dragon (JIRA)" <ji...@apache.org> on 2016/03/15 09:17:35 UTC

[jira] [Created] (HDFS-10138) CLONE - Erasure Coding: fix one cell need two packets

dragon created HDFS-10138:
-----------------------------

             Summary: CLONE - Erasure Coding: fix one cell need two packets
                 Key: HDFS-10138
                 URL: https://issues.apache.org/jira/browse/HDFS-10138
             Project: Hadoop HDFS
          Issue Type: Sub-task
            Reporter: dragon
            Assignee: Walter Su
             Fix For: HDFS-7285


The default WritePacketSize is 64k
Currently default cellSize is 64k

We hope one cell consumes one packet. In fact it's not.

By default,
chunkSize = 516( 512 data + 4 checksum)
packetSize = 64k
chunksPerPacket = 126 ( See DFSOutputStream#computePacketChunkSize for details)
numBytes of data in one packet = 64512
cellSize = 65536

When first packet is full ( with 64512 data), there are still 65536 - 64512 = 1024 bytes left.
{code}
        super.writeChunk(bytes, offset, len, checksum, ckoff, cklen);

        // cell is full and current packet has not been enqueued,
        if (cellFull && currentPacket != null) {
          enqueueCurrentPacketFull();
        }   
{code}
When  the last 1024 bytes of the cell was written, we meet {{cellFull}} and create another packet.



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