New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HUDI-2491 hoodie.datasource.hive_sync.mode=hms mode is supported in s… #3722
Conversation
…park writer option
@codope : Can you take up this review please. |
@nsivabalan Thank you for your comments, but I don't know where the mistake is. I'm a novice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fuyun2024 Thanks for the contribution. It will be a useful addition to the hive sync. Could you please address some of the comments?
@@ -381,6 +381,11 @@ object DataSourceWriteOptions { | |||
val HIVE_URL: ConfigProperty[String] = ConfigProperty | |||
.key("hoodie.datasource.hive_sync.jdbcurl") | |||
.defaultValue("jdbc:hive2://localhost:10000") | |||
.withDocumentation("Hive jdbc url") | |||
|
|||
val METASTOR_URIS: ConfigProperty[String] = ConfigProperty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: rename to METASTORE_URI
.withDocumentation("Hive jdbc url") | ||
|
||
val METASTOR_URIS: ConfigProperty[String] = ConfigProperty | ||
.key("hoodie.datasource.hive_sync.metastore.uris") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have consistency with DeltaStreamer. There should be a way to set this config with deltastreamer as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we need to set this config in DataSourceUtils#buildHiveSyncConfig
. Please check.
@@ -517,6 +517,9 @@ object HoodieSparkSqlWriter { | |||
val hiveSyncConfig: HiveSyncConfig = buildSyncConfig(basePath, hoodieConfig, sqlConf) | |||
val hiveConf: HiveConf = new HiveConf() | |||
hiveConf.addResource(fs.getConf) | |||
if(!DataSourceWriteOptions.METASTOR_URIS.defaultValue.equals(hiveSyncConfig.metastoreUris)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a test case in the writer test suite or elsewhere to cover this scenario?
…park writer option
Tips
What is the purpose of the pull request
(For example: This pull request adds quick-start document.)
Brief change log
(for example:)
Verify this pull request
(Please pick either of the following options)
This pull request is a trivial rework / code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Committer checklist
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green
Necessary doc changes done or have another open PR
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.