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 "Walter Su (JIRA)" <ji...@apache.org> on 2015/11/18 06:54:11 UTC
[jira] [Commented] (HDFS-8957) Consolidate client striping input
stream codes for stateful read and positional read
[ https://issues.apache.org/jira/browse/HDFS-8957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15010299#comment-15010299 ]
Walter Su commented on HDFS-8957:
---------------------------------
bq. Read directly into application's buffer, as currently positional read does.
You shouldn't do that. You shouldn't remove {{curStripeBuf}}. It's bad if caller repeats to call _read()_, or _read(final byte buf\[\], int off, int len)_ with small buf. We read and cache a whole stripe, to avoid re-decoding if one cell is missing.
> Consolidate client striping input stream codes for stateful read and positional read
> ------------------------------------------------------------------------------------
>
> Key: HDFS-8957
> URL: https://issues.apache.org/jira/browse/HDFS-8957
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Kai Zheng
> Assignee: Kai Zheng
> Fix For: HDFS-7285
>
> Attachments: HDFS-8957-v1.patch
>
>
> Currently we have different implementations for client striping read, having both *StatefulStripeReader* and *PositionStripeReader*. I attempted to consolidate the two implementations into one, and it results in much simpler codes, and also better performance. Now in both read paths, it will:
> * Use pooled ByteBuffers, as currently stateful read does;
> * Read directly into application's buffer, as currently positional read does;
> * Try to align and merge multiple stripes, as currently positional read does;
> * Use *ECChunk* version decode API.
> The resultant *StripeReader* is approaching very near now to the ideal state desired by next step, employing *ErasureCoder* API instead of *RawErasureCoder* API.
> Will upload an initial patch to illustrate the rough change, even though it depends on other issues.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)