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

Rakesh R commented on HDFS-9818:
--------------------------------

Thanks [~jingzhao] for the patch. Overall patch looks good, I've just a minor 
comment. Could you please take a look at it.

In the case of {{!hasValidTargets}}, unnecessarily scheduling the task and 
later while executing the task it is just skipping. Can we avoid scheduling the 
task?. One idea is, constructor can throw an exception and do warn message. 
Also, this way can avoid adding new member variables. Another point is, could 
you please use {} instead of string concatenation.
{code}
+ hasValidTargets = getTargetIndices();

     public void run() {
+      if (!hasValidTargets) {
+        LOG.warn("No missing internal blocks. Skip reconstruction. "
+            + reconstructionInfo);
+        return;
+      }
{code}



> Correctly handle EC reconstruction work caused by not enough racks
> ------------------------------------------------------------------
>
>                 Key: HDFS-9818
>                 URL: https://issues.apache.org/jira/browse/HDFS-9818
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>    Affects Versions: 3.0.0
>            Reporter: Takuya Fukudome
>            Assignee: Jing Zhao
>         Attachments: HDFS-9818.000.patch, HDFS-9818.001.patch, 
> HDFS-9818.002.patch, HDFS-9818.003.patch
>
>
> This is reported by [~tfukudom]:
> In a system test where 1 of 7 datanode racks were stopped, 
> {{HadoopIllegalArgumentException}} was seen on DataNode side while 
> reconstructing missing EC blocks:
> {code}
> 2016-02-16 11:09:06,672 WARN  datanode.DataNode 
> (ErasureCodingWorker.java:run(482)) - Failed to recover striped block: 
> BP-480558282-172.29.4.13-1453805190696:blk_-9223372036850962784_278270
> org.apache.hadoop.HadoopIllegalArgumentException: Inputs not fully 
> corresponding to erasedIndexes in null places. erasedOrNotToReadIndexes: [1, 
> 2, 6], erasedIndexes: [3]
>       at 
> org.apache.hadoop.io.erasurecode.rawcoder.RSRawDecoder.doDecode(RSRawDecoder.java:166)
>       at 
> org.apache.hadoop.io.erasurecode.rawcoder.AbstractRawErasureDecoder.decode(AbstractRawErasureDecoder.java:84)
>       at 
> org.apache.hadoop.io.erasurecode.rawcoder.RSRawDecoder.decode(RSRawDecoder.java:89)
>       at 
> org.apache.hadoop.hdfs.server.datanode.erasurecode.ErasureCodingWorker$ReconstructAndTransferBlock.recoverTargets(ErasureCodingWorker.java:683)
>       at 
> org.apache.hadoop.hdfs.server.datanode.erasurecode.ErasureCodingWorker$ReconstructAndTransferBlock.run(ErasureCodingWorker.java:465)
> {code}



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

Reply via email to