[
https://issues.apache.org/jira/browse/HDFS-3689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14278136#comment-14278136
]
Tsz Wo Nicholas Sze commented on HDFS-3689:
-------------------------------------------
Thanks for working on this! Some comments so far:
- Instead of adding append2, how about adding another append method with a
boolean appendToNewBlock parameter? The original append could just call it
with appendToNewBlock=false. We also don't need
Append2RequestProto/Append2ResponseProto. Just add an optional field to
AppendRequestProto/AppendResponseProto.
- We could also add appendToNewBlock to DFSOutputStream constructor to reduce
code duplication.
- Typo in the code below? Should it be flushBuffer(!endBlock, true)?
{code}
//DFSOutputStream.flushOrSync
- // flush checksum buffer, but keep checksum buffer intact
- int numKept = flushBuffer(true, true);
+ // flush checksum buffer, but keep checksum buffer intact if we do not
+ // need to end the current block
+ int numKept = flushBuffer(true, !endBlock);
{code}
> Add support for variable length block
> -------------------------------------
>
> Key: HDFS-3689
> URL: https://issues.apache.org/jira/browse/HDFS-3689
> Project: Hadoop HDFS
> Issue Type: New Feature
> Components: datanode, hdfs-client, namenode
> Affects Versions: 3.0.0
> Reporter: Suresh Srinivas
> Assignee: Jing Zhao
> Attachments: HDFS-3689.000.patch, HDFS-3689.001.patch,
> HDFS-3689.002.patch, HDFS-3689.003.patch, HDFS-3689.003.patch,
> HDFS-3689.004.patch, HDFS-3689.005.patch
>
>
> Currently HDFS supports fixed length blocks. Supporting variable length block
> will allow new use cases and features to be built on top of HDFS.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)