-
Notifications
You must be signed in to change notification settings - Fork 3k
Flink: Separate the 1.13 code from 1.12 #3476
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
|
there is a whitespace change
|
kbendick
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.
Overall, if we're heading in the direction of using two separate copies entirely, this makes sense to me.
As a follow up, let's remove the reflection based call that has a note that it's required for 1.13 from the 1.13 (and even 1.12) code base.
Thanks @openinx for taking care of this!
| * To use a custom catalog that is not a Hive or Hadoop catalog, extend this class and override | ||
| * {@link #createCatalogLoader(String, Map, Configuration)}. | ||
| */ | ||
| public class FlinkCatalogFactory implements CatalogFactory { |
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.
This is trying to separate flink 1.13 code from flink 1.12, about the background, pls see: #3434 (comment)
In addition to what's mentioned about the new sink interface, this also allows us to use the new CatalogFactory API.
When we were upgrading from 1.12 to 1.13, one of the concerns was that CatalogFactory in 1.13 allows users to implement both the older deprecated interface, TableFactory, and the newer interface, Factory.
If I remember correctly, the flink catalog loader in 1.13 will use the deprecated methods from TableFactory if they're implemented.
If we separate, will we choose to implement 1.13's CatalogFactory using the Factory methods instead of continuing to implement the TableFactory interface methods? Perhaps that's what is meant in the comment about issues with the new sink interface etc?
EDIT: It seems like the Factory methods are implemented in FlinkDynamicTableFactory. I seem to recall though that it was this class that needed to also implement the new methods so that internal Flink code would instantiate via the new pathway.
I can pull up the old PR with more details if we'd like.
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.
Yes, we could upgrade the implemented API to the newly introduced Factory in flink 1.13. I think we can address this in the next following PR.
| .withDescription("If is false, parallelism of source are set by config.\n" + | ||
| "If is true, source parallelism is inferred according to splits number.\n"); |
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.
Non-blocking Nit: Consider: When false, the parallelism of Iceberg sources comes from the config. Otherwise, source parallelism is inferred based on the number of splits.
For me, just changing If is false to When false would be more concise. But up to you whether you want to change (or change in a later PR).
| ConfigOptions.key("table.exec.iceberg.infer-source-parallelism.max") | ||
| .intType() | ||
| .defaultValue(100) | ||
| .withDescription("Sets max infer parallelism for source operator."); |
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.
Nit: Consider adding Ignored if $TABLE_EXEC_ICEBERG_INFER_SOURCE_PARALLELISM is true. Or if we throw when TABLE_EXEC_ICEBERG_INFER_SOURCE_PARALLELISM is set to true, I'd mention that.
But if this is pre-existing, there's no need to change in this PR to keep the changes minimal.
| private static final DynMethods.UnboundMethod GET_CATALOG_TABLE = DynMethods.builder("getCatalogTable") | ||
| .impl(Context.class, "getCatalogTable") | ||
| .orNoop() | ||
| .build(); |
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.
Will we remove this in a follow-up PR?
|
@kbendick, I think this PR should focus on just the build and file changes. We can update the code and remove dynamic calls later. That keeps this simple so we don't have to find where 1.13 changed in a huge commit. |
|
I'm going to merge this so that we can unblock follow-up projects, like FLIP-27 and Flink 1.14. Thanks @openinx! |
This is trying to separate flink 1.13 code from flink 1.12, about the background, pls see: #3434 (comment)
The current difference between flink1.12 and flink1.13: