ad1happy2go opened a new pull request, #19248: URL: https://github.com/apache/hudi/pull/19248
### Change Logs Meta sync sets the Hive/metastore table `LOCATION` directly from the raw `hoodie.datasource.meta.sync.base.path` value. If that path contains consecutive (`//`) or trailing slashes, it is passed through verbatim (`HMSDDLExecutor#createTable`, `HoodieHiveSyncClient`, and the JDBC/HiveQL `LOCATION` clause all read `META_SYNC_BASE_PATH` unchanged). Strict object-store filesystems reject such paths — e.g. on GCS the first-time sync fails `create_table` with: ``` MetaException: java.lang.IllegalArgumentException: GCS path must not have consecutive '/' characters: '.../<table>//' ``` The **data write path already canonicalizes** the base path through `org.apache.hadoop.fs.Path`, so the Hudi commit succeeds and only the *post-commit* meta sync (`HiveSyncTool#syncFirstTime` → `HMSDDLExecutor#createTable`) fails. **Fix:** normalize `META_SYNC_BASE_PATH` once in the `HoodieSyncConfig` constructor via `new Path(basePath).toString()`, so every downstream consumer (HMS / JDBC / HiveQL DDL executors, partition locations, `TABLE_SERDE_PATH`) receives a canonical location that matches the Hudi table base path. This is the same `Path`-based canonicalization the write path already relies on. ### Impact Meta sync registers a normalized table location. Fixes `create_table` failures on strict object stores (e.g. GCS) when the configured base path contains `//` or a trailing `/`. No behavior change for already well-formed paths. ### Risk level: low Single, central normalization reusing Hadoop `Path` canonicalization. Guarded to no-op when the base path is absent/empty. Covered by a new unit test. ### Documentation Update None. ### Contributor's checklist - [x] Change Logs and Impact described above - [x] Unit test added (`TestHoodieSyncConfig#testNormalizeBasePath`), full `TestHoodieSyncConfig` suite passes locally (8/8) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
