You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by yi...@apache.org on 2023/03/07 17:47:35 UTC
[hudi] branch master updated: [HUDI-5883] Avoid throwing error if data table does not exist in Metadata Table Validator (#8108)
This is an automated email from the ASF dual-hosted git repository.
yihua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 2ba1423ff5e [HUDI-5883] Avoid throwing error if data table does not exist in Metadata Table Validator (#8108)
2ba1423ff5e is described below
commit 2ba1423ff5eaa5600a1c222f775505b34bcd55ac
Author: Y Ethan Guo <et...@gmail.com>
AuthorDate: Tue Mar 7 09:47:24 2023 -0800
[HUDI-5883] Avoid throwing error if data table does not exist in Metadata Table Validator (#8108)
This PR makes the Metadata Table Validator (`HoodieMetadataTableValidator`) to skip the validation of the metadata table if the data table does not exist based on the provided base path, to avoid false positives. A warning message is still printed.
---
.../org/apache/hudi/utilities/HoodieMetadataTableValidator.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieMetadataTableValidator.java b/hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieMetadataTableValidator.java
index f56fcb638db..5bd54d1e8ca 100644
--- a/hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieMetadataTableValidator.java
+++ b/hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieMetadataTableValidator.java
@@ -343,12 +343,14 @@ public class HoodieMetadataTableValidator implements Serializable {
sparkConf.set("spark.executor.memory", cfg.sparkMemory);
JavaSparkContext jsc = new JavaSparkContext(sparkConf);
- HoodieMetadataTableValidator validator = new HoodieMetadataTableValidator(jsc, cfg);
-
try {
+ HoodieMetadataTableValidator validator = new HoodieMetadataTableValidator(jsc, cfg);
validator.run();
+ } catch (TableNotFoundException e) {
+ LOG.warn(String.format("The Hudi data table is not found: [%s]. "
+ + "Skipping the validation of the metadata table.", cfg.basePath), e);
} catch (Throwable throwable) {
- LOG.error("Fail to do hoodie metadata table validation for " + validator.cfg, throwable);
+ LOG.error("Fail to do hoodie metadata table validation for " + cfg, throwable);
} finally {
jsc.stop();
}