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

Zhe Zhang commented on HDFS-9255:
---------------------------------

Thanks Walter for the work. The 04 patch looks good overall. Some minors:
# {{Datanode#recoverBlocks}} doesn't need a return value. We can also consider 
replacing the method with a getter for {{blockRecoveryWorker}} and 
{{getBlockRecoveryWorker().recoverBlocks}}.
# The structure of {{BlockRecoveryWorker}} can also be simplified. Following 
the example of {{ErasureCodingWorker}} we can make {{RecoveryTaskContiguous}} 
itself a daemon. But since this is just a refactor JIRA, we can address this 
issue and the previous one in a separate JIRA.
# Since we are explicitly naming {{RecoveryTaskContiguous}}, should also throw 
unsupported exception for striped blocks?
{code}
+        for(RecoveringBlock b : blocks) {
+          try {
+            logRecoverBlock(who, b);
+            RecoveryTaskContiguous task = new RecoveryTaskContiguous(b);
+            task.recover();
{code}
# I guess changes in {{PBHelper}}, {{DatanodeManager}}, and {{FSNamesystem}} 
are all misc optimizations not directly related to this refactor? {{PBHelper}} 
and {{DatanodeManager}} changes LGTM. But I haven't fully reviewed 
{{FSNamesystem}}. It looks a decent size optimization by itself. How about do 
it separately?

> Consolidate block recovery related implementation into a single class
> ---------------------------------------------------------------------
>
>                 Key: HDFS-9255
>                 URL: https://issues.apache.org/jira/browse/HDFS-9255
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>            Reporter: Walter Su
>            Assignee: Walter Su
>            Priority: Minor
>         Attachments: HDFS-9255.01.patch, HDFS-9255.02.patch, 
> HDFS-9255.03.patch, HDFS-9255.04.patch
>
>




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

Reply via email to