-
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-28656 Optimize the verifyCopyResult logic in ExportSnapshot #5996
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. |
Please check the failed UTs? |
@Apache9 Ok. Additionally, I will add a UT to cover the code. |
🎊 +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. |
@jojochuang @Apache9 Could you all take a look? Thanks. |
Ping @jojochuang |
// or the algorithms of input and output are not equal, that means there is no comparison | ||
// and return not compatible. else if matched, return compatible with the matched result. | ||
if ( | ||
!inputScheme.equals(outputScheme) || inChecksum == null || outChecksum == null |
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.
I would like to ask to drop the scheme name comparison.
I think it makes sense to check for algorithm name mismatch and to check for checksum nullity, but at file system level, we are starting to see more of them support compatible checksums.
E.g. HDFS and GCS supports COMPOSITE_CRC (Ozone supports it too)
https://cloud.google.com/architecture/hadoop/validating-data-transfers
I'd suggest to follow the file checksum comparision implemented in DistCP, return ChecksumComparison.INCOMPATIBLE if either of them is null. https://github.com/apache/hadoop/blob/9b8cc104fcafa604b03dd1565ff2283a6eaadbe4/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/DistCpUtils.java#L591
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.
@jojochuang Ok, sir. and I already have a new commit, please review it.
🎊 +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. |
) Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org> (cherry picked from commit dd694e4)
if ( | ||
inChecksum == null || outChecksum == null | ||
|| !inChecksum.getAlgorithmName().equals(outChecksum.getAlgorithmName()) | ||
) { |
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.
@2005hithlj
I'm sorry for my late reply, as I just discovered this issue.
For LocalFileSystem, since it did not override the getFileChecksum method, LocalFileSystem.getFileChecksum always returns null.
Therefore, if we start a standalone hbase (eg: set hbase.rootdir file:///tmp/hbase), executing Exportsnapshot will fail because checksum failed in here.
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.
@guluo2016 Thank you for the review, for cases where LocalFileSystem.getFileChecksum returns null, you can specify --no-checksum-verify to ignore checksum verification.
https://issues.apache.org/jira/browse/HBASE-28656