-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-28625 ExportSnapshot should verify checksums for the source file and the target file #5950
Conversation
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@@ -538,21 +537,47 @@ private FileChecksum getFileChecksum(final FileSystem fs, final Path path) { | |||
* Check if the two files are equal by looking at the file length, and at the checksum (if user | |||
* has specified the verifyChecksum flag). | |||
*/ | |||
private boolean sameFile(final FileStatus inputStat, final FileStatus outputStat) { | |||
private boolean sameFile(final FileStatus inputStat, final FileStatus outputStat, | |||
final boolean force) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter name 'force' seems a bit confusing here...
Maybe a better choice is to introduce another method called verifyCopyResult?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK sir, I will have a new commit soon.
…e and the target file
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…e and the target file (#5950)
…e and the target file (#5950)
…e and the target file (#5950)
…e and the target file (#5950)
…e and the target file (#5950)
I'm late to this, but from a file system perspective, we should be more graceful about it because checksums between file systems are not necessarily comparable. For example, if you export snapshot from HDFS to S3, The file checksum are simply different regardless. It would be nice to have a flag to skip the file checksum check, similar to the hdfs distcp -skipcrc option, or skip if the source and destination are on different FS. |
Ping @2005hithlj . Checked the code, at least if the FileChecksums are computed with different algorithm, we should not compare them... |
@Apache9 @jojochuang OK, sirs. I will open a new issue to solve this problem. |
https://issues.apache.org/jira/browse/HBASE-28625