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

Kai Zheng commented on HDFS-7663:
---------------------------------

Thanks [~jingzhao] and [~walter.k.su] for the good discussion and nice work!

The latest patch looks good to me.
1. It solves the first case listed in the issue description. For the other two 
cases, I'm happy to see exceptions will be thrown when bumping into. It would 
be good to have the follow-on issues fired and add the comments in the places 
accordingly so somebody may know the gaps easier.
2. I understand the added test is good enough for the current supported case. 
The new data will be appended in the block group boundary and as new block 
group. To be more general, the test can be enhanced so any variable length of 
data can be appended.
3. The new test may be better to be renamed: TestFileAppendStriped => 
TestStripedFileAppend.
4. A minor, the following loop isn't necessary, because the buffer can be 
written at once.
{code}
+      for (int i = 0; i < splitLength; i++) {
+        out.write(expected[fileLength++]);
+      }
{code}

> Erasure Coding: Append on striped file
> --------------------------------------
>
>                 Key: HDFS-7663
>                 URL: https://issues.apache.org/jira/browse/HDFS-7663
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0
>            Reporter: Jing Zhao
>            Assignee: Walter Su
>         Attachments: HDFS-7663.00.txt, HDFS-7663.01.patch
>
>
> Append should be easy if we have variable length block support from 
> HDFS-3689, i.e., the new data will be appended to a new block. We need to 
> revisit whether and how to support appending data to the original last block.
> 1. Append to a closed striped file, with NEW_BLOCK flag enabled (this)
> 2. Append to a under-construction striped file, with NEW_BLOCK flag enabled 
> (HDFS-9173)
> 3. Append to a striped file, by appending to last block group (follow-on)
> This jira attempts to implement the #1, and also track #2, #3.



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

Reply via email to