yuzelin commented on code in PR #6201:
URL: https://github.com/apache/paimon/pull/6201#discussion_r2371506439
##########
docs/content/flink/action-jars.md:
##########
@@ -305,3 +305,21 @@ For more information of 'rewrite_file_index', see
/path/to/paimon-flink-action-{{< version >}}.jar \
rewrite_file_index --help
```
+
+## Force Start Flink Job
+
+Some actions, like `create_tag`, are lightweight and by default will not be
submitted as a job to Flink cluster. If you
+have the need to unify the experience regardless of actions, you can use the
`--force_start_flink_job` flag to make sure
+submitting them as jobs. For example,
+
+```bash
+<FLINK_HOME>/bin/flink run \
+ /path/to/paimon-flink-action-{{< version >}}.jar \
+ drop_partition \
+ --warehouse <warehouse-path> \
+ --database <database-name> \
+ --table <table-name> \
+ [--partition <partition_spec> [--partition <partition_spec> ...]] \
+ [--catalog_conf <paimon-catalog-conf> [--catalog_conf
<paimon-catalog-conf> ...]]
+ --force_start_flink_job
Review Comment:
How about `--force_start_flink_job true/false (default false)`? It's more
similar to the style of other arguments.
And it's better to use method `forceStartFlinkJob(boolean);` so you can
create test codes like `action.forceStartFlinkJob(forceStartFlinkJob);` instead
of an `if` statement.
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactAction.java:
##########
@@ -282,7 +283,12 @@ private boolean buildForPostponeBucketCompaction(
.withBucket(BucketMode.POSTPONE_BUCKET)
.partitions();
if (partitions.isEmpty()) {
- return false;
+ if (this.forceStartFlinkJob) {
+ env.fromSequence(0, 0).name("Placeholder Source").sinkTo(new
DiscardingSink<>());
Review Comment:
I think 'Nothing to Compact Source' is better.
--
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]