Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
2
Description
looks like we are missing proper table config validation in deltastreamer.
if (fs.exists(new Path(cfg.targetBasePath))) { HoodieTableMetaClient meta = HoodieTableMetaClient.builder().setConf(new Configuration(fs.getConf())).setBasePath(cfg.targetBasePath).setLoadActiveTimelineOnLoad(false).build(); tableType = meta.getTableType(); // This will guarantee there is no surprise with table type ValidationUtils.checkArgument(tableType.equals(HoodieTableType.valueOf(cfg.tableType)), "Hoodie table is of type " + tableType + " but passed in CLI argument is " + cfg.tableType); // Load base file format // This will guarantee there is no surprise with base file type String baseFileFormat = meta.getTableConfig().getBaseFileFormat().toString(); ValidationUtils.checkArgument(baseFileFormat.equals(cfg.baseFileFormat) || cfg.baseFileFormat == null, "Hoodie table's base file format is of type " + baseFileFormat + " but passed in CLI argument is " + cfg.baseFileFormat); cfg.baseFileFormat = baseFileFormat; this.cfg.baseFileFormat = baseFileFormat; } else { tableType = HoodieTableType.valueOf(cfg.tableType); if (cfg.baseFileFormat == null) { cfg.baseFileFormat = "PARQUET"; // default for backward compatibility } }
Attachments
Issue Links
- links to