hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3429) DataNode reads checksums even if client does not need them
Date Mon, 01 Oct 2012 20:49:09 GMT

    [ https://issues.apache.org/jira/browse/HDFS-3429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467176#comment-13467176

Ted Yu commented on HDFS-3429:

Pardon my limited knowledge of hdfs.
+      boolean needToReadChecksum = verifyChecksum || sendChecksum;
The variable name might be a bit confusing where checksum reading depends on sendChecksum
-      checksumSize = checksum.getChecksumSize();
-      length = length < 0 ? replicaVisibleLength : length;
Why was the length adjustment omitted in BlockSender ctor ?
+   * @param maxChunks maximum number of bytes to send. If checksums are
The above javadoc is inconsistent with the following code change:
-  private int sendPacket(ByteBuffer pkt, int maxChunks, OutputStream out,
+  private int sendPacket(ByteBuffer pkt, int maxBytesToSend, OutputStream out,
+    // Number of chunks be sent in the packet
+    int numChunks = shouldReadChecksum() ? numberOfChunks(dataLen) : 0;
If we don't need to read checksum, why would numChunks be 0 ?
> DataNode reads checksums even if client does not need them
> ----------------------------------------------------------
>                 Key: HDFS-3429
>                 URL: https://issues.apache.org/jira/browse/HDFS-3429
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: data-node, performance
>    Affects Versions: 2.0.0-alpha
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>         Attachments: hdfs-3429.txt
> Currently, even if the client does not want to verify checksums, the datanode reads them
anyway and sends them over the wire. This means that performance improvements like HBase's
application-level checksums don't have much benefit when reading through the datanode, since
the DN is still causing seeks into the checksum file.
> (Credit goes to Dhruba for discovering this - filing on his behalf)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message