Guosmilesmile commented on code in PR #15459:
URL: https://github.com/apache/iceberg/pull/15459#discussion_r2887683790
##########
docs/docs/flink-maintenance.md:
##########
@@ -167,6 +171,36 @@ TableMaintenance.forTable(env, tableLoader, lockFactory)
env.execute("Table Maintenance Job");
```
+Use Coordinator Lock
+
+```java
+StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment();
+
+TableLoader tableLoader = TableLoader.fromCatalog(
+ CatalogLoader.hive("my_catalog", configuration, properties),
+ TableIdentifier.of("database", "table")
+);
+
+TableMaintenance.forTable(env, tableLoader)
+ .uidSuffix("my-maintenance-job")
+ .rateLimit(Duration.ofMinutes(10))
+ .lockCheckDelay(Duration.ofSeconds(10))
+ .add(ExpireSnapshots.builder()
+ .scheduleOnCommitCount(10)
+ .maxSnapshotAge(Duration.ofMinutes(10))
+ .retainLast(5)
+ .deleteBatchSize(5)
+ .parallelism(8))
+ .add(RewriteDataFiles.builder()
+ .scheduleOnDataFileCount(10)
+ .targetFileSizeBytes(128 * 1024 * 1024)
+ .partialProgressEnabled(true)
+ .partialProgressMaxCommits(10))
+ .append();
+
+env.execute("Table Maintenance Job");
Review Comment:
Right, I combine two part code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]