rakeshadr commented on a change in pull request #2937:
URL: https://github.com/apache/ozone/pull/2937#discussion_r778645151
##########
File path:
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BaseFileChecksumHelper.java
##########
@@ -191,6 +207,35 @@ private FileChecksum makeMd5CrcResult() {
crcPerBlock, fileMD5);
}
+ FileChecksum makeCompositeCrcResult() throws IOException {
+ long blockSizeHint = 0;
+ if (keyLocationInfos.size() > 0) {
+ blockSizeHint = keyLocationInfos.get(0).getLength();
+ }
+ CrcComposer crcComposer =
+ CrcComposer.newCrcComposer(DataChecksum.Type.CRC32, blockSizeHint);
Review comment:
I think, we need to use the `checksumData.getType()` from the
ContainerProtos.
```
ContainerProtos.ChecksumData checksumData =
chunkInfos.get(0).getChecksumData();
BaseFileChecksumHelper#setChecksumType(checksumData.getType());
```
--
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]