Repository navigation
Add docs for Table Maintenance in Flink - #13360
JeonDaehong wants to merge 15 commits into
Conversation
…( remove @deprecated annotations no longer needed after JUnit5 migration )
…estIcebergSink.java
…cy to 1.19 and 1.20
|
Previous commits are coming along with my changes... |
|
This is my first time working on documentation, so I would appreciate plenty of feedback. Thank you! |
| ```java | ||
| StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); | ||
| TableLoader tableLoader = TableLoader.fromHadoopTable("path/to/table"); | ||
| TriggerLockFactory lockFactory = TriggerLockFactory.defaultLockFactory(); |
There was a problem hiding this comment.
It seems I misunderstood that part and wrote it incorrectly.
I'll remove it.
| .partialProgressEnabled(true) | ||
| .partialProgressMaxCommits(10)) |
There was a problem hiding this comment.
I would turn this off in the main example. This becomes interesting if the table is big, and otherwise it add too many small commits
| |--------|-------------|---------| | ||
| | `uidSuffix(String)` | Unique identifier suffix for the job | Random UUID | | ||
| | `rateLimit(Duration)` | Minimum interval between task executions | 60 seconds | | ||
| | `lockCheckDelay(Duration)` | Delay for checking lock availability | 30 seconds | |
There was a problem hiding this comment.
I'm not sure that based on this doc, the average user will know what is this lock, and why it is needed
| | `scheduleOnDataFileCount(int)` | Trigger after N data files | No automatic scheduling | int | | ||
| | `scheduleOnDataFileSize(long)` | Trigger after total data file size (bytes) | No automatic scheduling | long | | ||
| | `scheduleOnIntervalSecond(long)` | Trigger after time interval (seconds) | No automatic scheduling | long | | ||
| | `parallelism(int)` | Parallelism for this specific task | Inherits from TableMaintenance | int | |
There was a problem hiding this comment.
I think it is important to highlight that this parallelism is only for deletion
| | `scheduleOnDataFileCount(int)` | Trigger after N data files | 1000 | int | | ||
| | `scheduleOnDataFileSize(long)` | Trigger after total data file size (bytes) | 100GB | long | | ||
| | `scheduleOnIntervalSecond(long)` | Trigger after time interval (seconds) | 600 (10 minutes) | long | | ||
| | `maxRewriteBytes(long)` | Maximum bytes to rewrite per execution | Long.MAX_VALUE | long | |
There was a problem hiding this comment.
Describe what it is used for - namely to reduce the work done in a single run if there are too many data to rewrite
|
|
||
| | Configuration Key | Description | Default Value | Type | | ||
| |-------------------|-------------|---------------|------| | ||
| | `iceberg.maintenance.rate-limit-seconds` | Rate limit in seconds | 60 | long | |
There was a problem hiding this comment.
Could this be just another column like in https://iceberg.apache.org/docs/nightly/flink-configuration/#read-options?
|
@JeonDaehong: Thanks for working on this. As a more general one:
|
Guosmilesmile
left a comment
There was a problem hiding this comment.
@JeonDaehong Thank you very much for your contribution.
Besides the points below, I have also left some comments regarding details.
- I think there might be some missing explanations about the role of locks here.
- For some of the more complex configuration options, I think we need to add what they are used for.
- It seems that the configuration options in the RewriteDataFiles Configuration section are not fully listed.
- As Peter mentioned, could we start with some high-level description of the feature?
| | `rateLimit(Duration)` | Minimum interval between task executions | 60 seconds | | ||
| | `lockCheckDelay(Duration)` | Delay for checking lock availability | 30 seconds | | ||
| | `parallelism(int)` | Default parallelism for maintenance tasks | System default | | ||
| | `maxReadBack(int)` | Max snapshots to check during initialization | 100 | |
There was a problem hiding this comment.
May be Maximum number of snapshots checked when started at the first time. Only available when the change stream is not provided ?
|
|
||
| | Configuration Key | Description | Default Value | Type | | ||
| |-------------------|-------------|---------------|------| | ||
| | `iceberg.maintenance.rate-limit-seconds` | Rate limit in seconds | 60 | long | |
There was a problem hiding this comment.
Regarding the configuration items for this part, I'm a bit unfamiliar. Are these all the configuration items? And where are they used?
| .table(table) | ||
| .tableLoader(tableLoader) | ||
| .setAll(properties) | ||
| .addPostCommitTopology( |
There was a problem hiding this comment.
Users neither need to nor can call the addPostCommitTopology method. Compression in the sink is enabled through configuration.
|
|
||
| | Method | Description | Default Value | Type | | ||
| |--------|-------------|---------------|------| | ||
| | `targetFileSizeBytes(long)` | Target size for rewritten files | Table property or 512MB | long | |
There was a problem hiding this comment.
Are there some configurations that we haven't listed, like minInputFiles, rewriteAll, maxFileGroupSizeBytes, and so on?
|
Thank you both so much for the feedback :D I've carefully reviewed and read through all of your comments. By the way, I noticed that commit history from a previous unrelated issue is still showing up in this PR. |
You can try to Sync fork first and update branch, then rebase the code.If you are not familiar with the process, make sure to back up your code first. |
Thank you for the guidance! I’m not very familiar with the rebase process, so I’ll review some docs and try it carefully with a backup first. |
|
Sorry for the delay. I was away for a while due to a business trip and a service launch, so I wasn't able to work on the PR. Now that I have more time, I’ll slowly get back to working on the documentation and submit the PR again. Thank you for your patience. |
|
I will submit it again as a new PR. |
I have completed writing the documentation for Table Maintenance in Flink.
Please review it and kindly merge if everything looks good.
This is my first time contributing to open source documentation, so if any revisions are needed, I would appreciate your feedback. I will make the necessary changes and submit another PR accordingly.
Thank you very much.
( Docs update for Flink Table Maintenance API - Fixes #13307 )