-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Flink: Fail if both Catalog type and catalog-impl are configured and add TestFlinkCatalogFactory tests #3308
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
Conversation
| if (catalogImpl != null) { | ||
| String catalogType = properties.get(ICEBERG_CATALOG_TYPE); | ||
| Preconditions.checkArgument(catalogType == null, | ||
| "Cannot create catalog %s, both catalog-type and catalog-impl are set: catalog-type=%s, catalog-impl=%s", |
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.
catalog-type isn't a property right? Shouldn't this by type=%s instead?
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.
Nevermind, looks like Flink sets this differently.
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.
Do we have recommendations on which values to set that we can provide?
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.
Do we have recommendations on which values to set that we can provide?
You mean only hive or hadoop? 🤔
flink/src/test/java/org/apache/iceberg/flink/TestFlinkCatalogFactory.java
Show resolved
Hide resolved
flink/src/test/java/org/apache/iceberg/flink/TestFlinkCatalogFactory.java
Outdated
Show resolved
Hide resolved
| if (catalogImpl != null) { | ||
| String catalogType = properties.get(ICEBERG_CATALOG_TYPE); | ||
| Preconditions.checkArgument(catalogType == null, | ||
| "Cannot create catalog %s, both catalog-type and catalog-impl are set: catalog-type=%s, catalog-impl=%s", |
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.
Do we have recommendations on which values to set that we can provide?
5b913ea to
2e9cc9c
Compare
flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java
Outdated
Show resolved
Hide resolved
rdblue
left a comment
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.
Mostly looks good. I'll merge after a few updates to docs and error messages. Thanks @omarsmak!
flink/src/test/java/org/apache/iceberg/flink/TestFlinkCatalogFactory.java
Outdated
Show resolved
Hide resolved
flink/src/test/java/org/apache/iceberg/flink/TestFlinkCatalogFactory.java
Outdated
Show resolved
Hide resolved
flink/src/test/java/org/apache/iceberg/flink/TestFlinkCatalogFactory.java
Outdated
Show resolved
Hide resolved
…add TestFlinkCatalogFactory tests
2e9cc9c to
6024d55
Compare
|
Thanks, @omarsmak! |
This is related to #3162 where if the user tries to set both,
catalog-implandcatalog-type, it will fail with an exception.We have this behavior already in Spark and Hive integrations due to #3162. This PR brings the same behavior to Flink integration as well.
cc: @rdblue @nastra