Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-4734

Add table config change validation in deltastreamer

    XMLWordPrintableJSON

Details

    • 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

        Activity

          People

            jonvex Jonathan Vexler
            shivnarayan sivabalan narayanan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: