tasanuma commented on code in PR #4901:
URL: https://github.com/apache/hadoop/pull/4901#discussion_r977173136


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedWriter.java:
##########
@@ -82,8 +82,10 @@ class StripedWriter {
     assert targetStorageIds != null;
 
     writers = new StripedBlockWriter[targets.length];
-
     targetIndices = new short[targets.length];
+    Preconditions.checkArgument(
+            targetIndices.length <= dataBlkNum + parityBlkNum - 
reconstructor.getNumLiveBlocks(),
+            "Reconstrutcion work gets too much targets.");

Review Comment:
   @Kidd53685368 Sorry, I have one more request. `Reconstrutcion` is a typo of 
`Reconstruction`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to