smengcl commented on code in PR #11444:
URL: https://github.com/apache/ozone/pull/11444#discussion_r4216843183


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -3007,6 +3007,11 @@ public void setTimes(OzoneObj obj, String keyName, long 
mtime, long atime)
     ozoneManagerClient.setTimes(builder.build(), mtime, atime);
   }
 
+  @Override
+  public void setVerifyChecksum(boolean verifyChecksum) {
+    clientConfig.setChecksumVerify(verifyChecksum);
+  }

Review Comment:
   Made `OzoneClientConfig#checksumVerify` volatile in ee5c9015142, since this 
PR is what lets the flag change while other threads open read streams.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java:
##########
@@ -725,6 +725,11 @@ workingDir, getUsername(), true)
     return statuses.toArray(new FileStatus[0]);
   }
 
+  @Override
+  public void setVerifyChecksum(boolean verifyChecksum) {

Review Comment:
   No change. `org.apache.hadoop.fs.FileSystem#setVerifyChecksum` is an empty 
method and `FileSystem` has no `getVerifyChecksum` or verify checksum field, so 
there is no base state for `super` to keep in sync. `DistributedFileSystem` 
does not call `super` either.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java:
##########
@@ -978,6 +978,11 @@ private List<FileStatusAdapter> listStatusAdapter(Path f, 
boolean lite) throws I
     return statuses;
   }
 
+  @Override
+  public void setVerifyChecksum(boolean verifyChecksum) {

Review Comment:
   No change, for the same reason as in `BasicOzoneFileSystem`: the base 
`FileSystem#setVerifyChecksum` is empty and keeps no state.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java:
##########
@@ -1639,6 +1639,14 @@ ListSnapshotDiffJobResponse listSnapshotDiffJobs(
   void setTimes(OzoneObj obj, String keyName, long mtime, long atime)
       throws IOException;
 
+  /**
+   * Set whether this client verifies checksums when reading. Overrides 
ozone.client.verify.checksum for this client
+   * only. Takes effect for input streams opened afterwards, streams that are 
already open may or may not pick it up.
+   * @param verifyChecksum false to skip checksum verification, e.g. when the 
application verifies its own checksums.
+   */
+  default void setVerifyChecksum(boolean verifyChecksum) {
+  }

Review Comment:
   No change. The checkstyle limit in this repo is 120 characters, these lines 
are within it and checkstyle reports no violations.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



-- 
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