fhan688 opened a new pull request, #18884:
URL: https://github.com/apache/hudi/pull/18884

   ### Describe the issue this Pull Request addresses
   
   Flink Hive Sync currently only sets `hoodie.datasource.meta.sync.base.path` 
when building the sync configuration from Flink options. However, shared sync 
components read the canonical base path through 
`HoodieSyncConfig#getBasePath()`, which resolves `HoodieCommonConfig.BASE_PATH` 
(`hoodie.base.path`).
   
   As a result, Flink Hive Sync can build a configuration where 
`hoodie.datasource.meta.sync.base.path` is present but `hoodie.base.path` is 
missing. Components that still rely on the canonical base path, such as Hive 
Sync metrics setup, can then fail with a null base path.
   
   No GitHub issue is filed for this change.
   
   ### Summary and Changelog
   
   Set the Flink table path on both the canonical base path config and the meta 
sync base path config when building Hive Sync properties.
   
   Changes:
   
   - Add `hoodie.base.path` to the properties built by 
`HiveSyncContext.buildSyncConfig`.
   - Keep the existing `hoodie.datasource.meta.sync.base.path` assignment 
unchanged.
   - Add a unit test to verify that Flink `path` is propagated to both base 
path config keys.
   
   No code was copied from external sources.
   
   ### Impact
   
   User-facing behavior:
   
   - Flink Hive Sync now provides a consistent base path configuration to 
shared sync components.
   - Hive Sync components that read the canonical `hoodie.base.path` can 
resolve the table base path correctly.
   - This prevents null base path failures in paths such as Hive Sync metrics 
initialization.
   
   Compatibility:
   
   - No new public API is introduced.
   - No storage format, table metadata, or persisted data layout changes.
   - No new configuration is added; this only populates an existing canonical 
config key from the existing Flink table path.
   
   Performance:
   
   - No performance impact.
   
   ### Risk Level
   
   low
   
   The change is limited to Flink Hive Sync configuration construction. It 
mirrors the same Flink table path into the existing canonical base path key 
while preserving the existing meta sync base path behavior.
   
   Verification performed:
   
   ```bash
   source ~/.bash_profile; mvn -pl hudi-flink-datasource/hudi-flink -am 
-Dtest=TestHiveSyncContext -Dsurefire.failIfNoSpecifiedTests=false -DskipITs 
-Dcheckstyle.skip=true -DfailIfNoTests=false test
   ```
   
   Result:
   
   - `TestHiveSyncContext`: 4 tests run, 0 failures, 0 errors, 0 skipped.
   - Maven build completed successfully.
   
   ### Documentation Update
   
   none
   
   No new user-facing option is introduced and no documented config default is 
changed. This only ensures the existing Flink table path is also available 
through the existing canonical `hoodie.base.path` key during Hive Sync.
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] Adequate tests were added if applicable


-- 
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]

Reply via email to