smengcl opened a new pull request, #11444: URL: https://github.com/apache/ozone/pull/11444
Generated-by: Claude Code (Opus 5.5) ## What changes were proposed in this pull request? HBase keeps its own checksums in HFile blocks. `HFileSystem` opens a second `FileSystem` instance, calls `setVerifyChecksum(false)` on it and reads HFile blocks through it. ofs and o3fs do not override that method, so the call does nothing and the Ozone client verifies every read anyway. With verification on, each read is also widened to `ozone.client.bytes.per.checksum` boundaries. This PR makes the call take effect: - `BasicOzoneFileSystem` and `BasicRootedOzoneFileSystem` override `setVerifyChecksum` and forward it through `OzoneClientAdapter`. - `ClientProtocol` gets `setVerifyChecksum` as a default no-op. `RpcClient` applies it to its own `OzoneClientConfig`, which the read streams consult when they are opened. The setting is per `FileSystem` instance, as in `DistributedFileSystem`, and applies to streams opened after the call. Other instances keep verifying, which HBase relies on for its fallback when an HFile checksum fails. `ozone.client.verify.checksum=false` cannot do that because it applies to the whole process. No protocol change is needed. ReadChunk, short-circuit read and streaming ReadBlock already read this flag. Benchmark numbers are in the Jira. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16783 ## How was this patch tested? New `testSetVerifyChecksum` in the existing ofs and o3fs suites (`AbstractRootedOzoneFileSystemTest` and `AbstractOzoneFileSystemTest`), sharing one helper in `OzoneFileSystemTestBase`. It writes a single replica file, corrupts its chunk on the datanode, then checks that an instance with `setVerifyChecksum(false)` reads the corrupt bytes while the shared instance still throws `OzoneChecksumException`. The test passes in `TestOFS`, `TestOFSWithFSO`, `TestOFSWithFSPaths`, `TestO3FS`, `TestO3FSWithFSO` and `TestO3FSWithFSPaths`, and fails when the `RpcClient` change is removed. -- 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]
