-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[FLINK-24741]Deprecate FileRecordFormat #17656
Conversation
c0f269d
to
81def1e
Compare
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 377613c (Wed Nov 03 08:38:35 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
...tors/flink-connector-files/src/main/java/org/apache/flink/connector/file/src/FileSource.java
Outdated
Show resolved
Hide resolved
...or-files/src/main/java/org/apache/flink/connector/file/src/impl/FileRecordFormatAdapter.java
Outdated
Show resolved
Hide resolved
...nnector-files/src/main/java/org/apache/flink/connector/file/src/reader/FileRecordFormat.java
Outdated
Show resolved
Hide resolved
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.
Thanks for working on this effort. I will definitely, help future format developers to have an easier time when trying to choose the right interface.
I agree with @slinkydeveloper that the @deprecated
keyword should be used inside the docstrings.
...iles/src/test/java/org/apache/flink/connector/file/src/impl/FileRecordFormatAdapterTest.java
Outdated
Show resolved
Hide resolved
...or-files/src/main/java/org/apache/flink/connector/file/src/impl/FileRecordFormatAdapter.java
Outdated
Show resolved
Hide resolved
...nnector-files/src/main/java/org/apache/flink/connector/file/src/reader/FileRecordFormat.java
Outdated
Show resolved
Hide resolved
…pdate the javadoc appropriately.
dde8eab
to
82a491e
Compare
fixed all issues, @AHeise would you please help merging the PR, thanks. |
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.
Thanks for the changes the code looks good to me now, only one nitty suggestion.
/** | ||
* The FormatReaderAdapter turns a {@link FileRecordFormat} into a {@link BulkFormat}. | ||
* | ||
* @deprecated Please use {@link StreamFormatAdapter} 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.
Nit: I guess this hint is not entirely correct because users cannot use the StreamFormatAdapter
without migrating to StreamFormat
. In general, I am not sure whether it is strictly necessary to deprecate internal classes.
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.
I'd go for internal classes as well so that we will not forget to remove them when we remove the public class. Ofc, the link to StreamFormatAdapter
is debatable but I also don't see that it's hurting anyone.
@flinkbot run azure |
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.
LGTM. Thanks!
What is the purpose of the change
The FileRecordFormat and StreamFormat have too much commons. This makes user confused. The main motivation for removing it is the inherent design flaw in the batching of FileRecordFormat: StreamFormat can guarantee that only a certain amount of memory is being used (unless a single record exceeds that already), but FileRecordFormat can only batch by the number of records. By removing FileRecordFormat, we relay the responsibility of implementing the batching to the format developer; they need to use BulkFormat and find a better way than batch by number of records.
Brief change log
Verifying this change
This change only marked some classes as deprecated and update relevant comments without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation