You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/01/05 06:59:26 UTC

[GitHub] [ozone] rakeshadr commented on a change in pull request #2937: HDDS-6087. Compute composite CRC file checksum using chunk checksums from DataNodes.

rakeshadr commented on a change in pull request #2937:
URL: https://github.com/apache/ozone/pull/2937#discussion_r778574804



##########
File path: hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java
##########
@@ -1066,4 +1069,23 @@ public boolean isFSOptimizedBucket() {
     // TODO: Need to refine this part.
     return false;
   }
+
+  @Override
+  public FileChecksum getFileChecksum(Path f, long length) throws IOException {
+    Options.ChecksumCombineMode combineMode =
+        config.getObject(OzoneClientConfig.class).getChecksumCombineMode();
+
+    OFSPath ofsPath = new OFSPath(f);
+    String keyName = ofsPath.getKeyName();
+    if (keyName.length() == 0) {

Review comment:
       Please move the` if (keyName.length() == 0) {` validation inside `OzoneClientUtils.getFileChecksumWithCombineMode()` so that both o3fs and ofs will have the check.
   
   Also, Please make a `Preconditions.checkArgument(length >= 0);` check.

##########
File path: hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/OzoneClientConfig.java
##########
@@ -124,6 +125,14 @@
       tags = ConfigTag.CLIENT)
   private boolean checksumVerify = true;
 
+  @Config(key = "checksum.combine.mode",

Review comment:
       Please add `ozone.client.checksum.combine.mode` config to ozone-default.xml file.




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org