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

Rakesh R commented on HDFS-10460:
---------------------------------

Thanks [~drankye], Attached new patch fixing the comments.

bq. 1. In StripedBlockChecksumReconstructor#reconstruct(), could we move the 
most of the new codes to a new function like 
checksumWithTargetOutput(targetBuffer)? Doing this would separate the checksum 
logic from the reconstruction stuffs and when we add to handle more failures 
than one, the new function can be reused.
Agreed, I have moved most of the code to new method. Probably will refine it 
while implementing multiple failures HDFS-10461

bq. 1) The 1 requestedLen case is good to have, might also have a larger one 
like 10?
Added this case also.

bq. 2) Don't quite get why we have an array for the only one filepath. 3) You 
have quite a few tests like this, guess you could move the codes of preparing 
for the test file to a common place.
I've combined these two points, just modified {{#prepareTestFiles()}} by taking 
{{filePaths}} argument and preparing required files for each test case.


> Erasure Coding: Recompute block checksum for a particular range less than 
> file size on the fly by reconstructing missed block
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-10460
>                 URL: https://issues.apache.org/jira/browse/HDFS-10460
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>         Attachments: HDFS-10460-00.patch, HDFS-10460-01.patch, 
> HDFS-10460-02.patch, HDFS-10460-03.patch, HDFS-10460-04.patch
>
>
> This jira is HDFS-9833 follow-on task to address reconstructing block and 
> then recalculating block checksum for a particular range query.
> For example,
> {code}
> // create a file 'stripedFile1' with fileSize = cellSize * numDataBlocks = 
> 65536 * 6 = 393216
> FileChecksum stripedFileChecksum = getFileChecksum(stripedFile1, 10, true);
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to