From d7e2290e107de36aabba5f6cbdc2b5ecb1782bc3 Mon Sep 17 00:00:00 2001 From: "john.wick" Date: Tue, 26 Nov 2024 10:19:41 +0800 Subject: [PATCH] [flink] fix --- docs/content/maintenance/dedicated-compaction.md | 2 +- .../java/org/apache/paimon/flink/action/CompactAction.java | 2 +- .../org/apache/paimon/flink/action/CompactActionFactory.java | 4 ++++ .../apache/paimon/flink/action/CompactDatabaseAction.java | 2 +- .../paimon/flink/action/CompactDatabaseActionFactory.java | 5 +++++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/content/maintenance/dedicated-compaction.md b/docs/content/maintenance/dedicated-compaction.md index b2ef182856af0..63e0aa5e66e4b 100644 --- a/docs/content/maintenance/dedicated-compaction.md +++ b/docs/content/maintenance/dedicated-compaction.md @@ -130,7 +130,7 @@ Example: compact table --catalog_conf s3.secret-key=***** ``` * `--compact_strategy` Determines how to pick files to be merged, the default is determined by the runtime execution mode, streaming-mode use `minor` strategy and batch-mode use `full` strategy. - * `full` : Only support in batch mode. All files will be picked up for merging. + * `full` : Only supports batch mode. All files will be selected for merging. * `minor` : Pick the set of files that need to be merged based on specified conditions. You can use `-D execution.runtime-mode=batch` or `-yD execution.runtime-mode=batch` (for the ON-YARN scenario) to control batch or streaming mode. If you submit a batch job, all diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactAction.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactAction.java index b96b223122e98..84e37a5b10f9c 100644 --- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactAction.java +++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactAction.java @@ -136,7 +136,7 @@ private void buildForTraditionalCompaction( } else { Preconditions.checkArgument( !(fullCompaction && isStreaming), - "full compact strategy is only supported in batch mode. Please add -Dexecution.runtime-mode=BATCH."); + "The full compact strategy is only supported in batch mode. Please add -Dexecution.runtime-mode=BATCH."); } if (isStreaming) { // for completely asynchronous compaction diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactActionFactory.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactActionFactory.java index ee2825dde5ba0..d7f6a2bf5aa24 100644 --- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactActionFactory.java +++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactActionFactory.java @@ -137,6 +137,10 @@ public void printHelp() { System.out.println( " compact --warehouse hdfs:///path/to/warehouse --database test_db --table test_table " + "--partition_idle_time 10s"); + System.out.println( + "--compact_strategy determines how to pick files to be merged, the default is determined by the runtime execution mode. " + + "`full` : Only supports batch mode. All files will be selected for merging." + + "`minor`: Pick the set of files that need to be merged based on specified conditions."); System.out.println( " compact --warehouse s3:///path/to/warehouse " + "--database test_db " diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java index 0c8d459c95a33..124d3ca687761 100644 --- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java +++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java @@ -250,7 +250,7 @@ private void buildForTraditionalCompaction( Preconditions.checkArgument( !(fullCompaction && isStreaming), - "full compact strategy is only supported in batch mode. Please add -Dexecution.runtime-mode=BATCH."); + "The full compact strategy is only supported in batch mode. Please add -Dexecution.runtime-mode=BATCH."); if (isStreaming) { // for completely asynchronous compaction diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseActionFactory.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseActionFactory.java index f67504a029628..0b44cd54e995d 100644 --- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseActionFactory.java +++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseActionFactory.java @@ -99,6 +99,11 @@ public void printHelp() { System.out.println( "--partition_idle_time is used to do a full compaction for partition which had not receive any new data for 'partition_idle_time' time. And only these partitions will be compacted."); System.out.println("--partition_idle_time is only supported in batch mode. "); + System.out.println( + "--compact_strategy determines how to pick files to be merged, the default is determined by the runtime execution mode. " + + "`full` : Only supports batch mode. All files will be selected for merging." + + "`minor`: Pick the set of files that need to be merged based on specified conditions."); + System.out.println(); System.out.println("Examples:");