rakeshadr commented on a change in pull request #2935:
URL: https://github.com/apache/ozone/pull/2935#discussion_r780911080
##########
File path: hadoop-hdds/common/src/main/resources/ozone-default.xml
##########
@@ -3023,4 +3023,15 @@
will create intermediate directories.
</description>
</property>
+
+ <property>
+ <name>ozone.client.checksum.combine.mode</name>
+ <value>MD5MD5CRC</value>
+ <tag>OZONE, CLIENT</tag>
+ <description>
+ The combined checksum type [MD5MD5CRC / COMPOSITE_CRC]
+ determines which algorithm would be used to compute checksum for
+ file checksum. Default checksum type is MD5MD5CRC.
Review comment:
Could you add few more details about the purpose of checksum types. How
about something like,
`COMPOSITE_CRC type to calculate combined CRC of the whole file, the
lower-level chunk/block checksums are combined into file-level checksum.
MD5MD5CRC type calculates MD5 of MD5 of checksums of individual chunks.`
##########
File path:
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/OzoneClientUtils.java
##########
@@ -64,4 +72,19 @@ public static BucketLayout
resolveLinkBucketLayout(OzoneBucket bucket,
}
return bucket.getBucketLayout();
}
+
+ public static FileChecksum getFileChecksumWithCombineMode(OzoneVolume volume,
+ OzoneBucket bucket, String keyName, long length,
+ Options.ChecksumCombineMode combineMode, ClientProtocol rpcClient)
+ throws IOException {
+ Preconditions.checkArgument(length >= 0);
+
+ if (keyName.length() == 0) {
Review comment:
Can you add integration test for the following cases:
```
testcase-1) Length < 0
testcase-2) keyName.length() <= 0
testcase-3) ofs#getFileChecksum and o3fs#getFileChecksum for valid paths.
```
--
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]