ZanderXu commented on code in PR #8393:
URL: https://github.com/apache/hadoop/pull/8393#discussion_r3050980434
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedBlockChecksumReconstructor.java:
##########
@@ -52,7 +52,13 @@ protected
StripedBlockChecksumReconstructor(ErasureCodingWorker worker,
assert targetIndices != null;
this.checksumWriter = checksumWriter;
this.requestedLen = requestedBlockLength;
- init();
+ try {
Review Comment:
refer to the class `StripedBlockReconstructor`.
How about moving the `init()` out of the constructor and calling it before
using `reconstruct()`?
```
try (StripedBlockChecksumReconstructor checksumRecon =
groupChecksumType == BlockChecksumType.COMPOSITE_CRC ?
new StripedBlockChecksumCompositeCrcReconstructor(
getDatanode().getErasureCodingWorker(), stripedReconInfo,
blockChecksumBuf, blockLength) :
new StripedBlockChecksumMd5CrcReconstructor(
getDatanode().getErasureCodingWorker(), stripedReconInfo,
blockChecksumBuf, blockLength)) {
// Here
checksumRecon.init();
checksumRecon.reconstruct();
...
}
```
--
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]