This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 2dff7e9aa [docs] add docs for sort compact with dynamic bucket and
unaware bucket (#2120)
2dff7e9aa is described below
commit 2dff7e9aa6900ff1d803527ea48186921b90f5e5
Author: YeJunHao <[email protected]>
AuthorDate: Tue Oct 17 14:27:37 2023 +0800
[docs] add docs for sort compact with dynamic bucket and unaware bucket
(#2120)
---
docs/content/concepts/append-only-table.md | 20 +----------------
docs/content/concepts/primary-key-table.md | 4 ++++
docs/content/maintenance/dedicated-compaction.md | 26 ++++++++++++++++++++++
.../layouts/shortcodes/generated/sort-compact.html | 2 +-
4 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/docs/content/concepts/append-only-table.md
b/docs/content/concepts/append-only-table.md
index 0a73e78ad..c549f1d84 100644
--- a/docs/content/concepts/append-only-table.md
+++ b/docs/content/concepts/append-only-table.md
@@ -231,25 +231,7 @@ and disable all the other compaction by set `write-only`.
### Sort Compact
The data in a per-partition out of order will lead a slow select, compaction
may slow down the inserting. It is a good choice for you to set
-write-only for inserting job, and after per-partition data done, trigger a
partition `Sort Compact` action.
-
-You can trigger action by shell script:
-```shell
-<FLINK_HOME>/bin/flink run \
- /path/to/paimon-flink-action-{{< version >}}.jar \
- compact \
- --warehouse hdfs:///path/to/warehouse \
- --database test_db \
- --table <tableName> \
- --table-conf <key>=<value> \
- --order-strategy <orderType> \
- --order-by <col1,col2,...>
-```
-
-{{< generated/sort-compact >}}
-
-The sort parallelism is the same as the sink parallelism, you can dynamically
specify it by add conf --table-conf sink.parallelism=<value>.
-Other config is the same as [Compact Table]({{< ref
"maintenance/dedicated-compaction" >}})
+`write-only` for inserting job, and after per-partition data done, trigger a
partition `Sort Compact` action. See [Sort Compact]({{< ref
"maintenance/dedicated-compaction#sort-compact" >}}).
### Streaming Source
diff --git a/docs/content/concepts/primary-key-table.md
b/docs/content/concepts/primary-key-table.md
index 403236b6e..36ef1ba5d 100644
--- a/docs/content/concepts/primary-key-table.md
+++ b/docs/content/concepts/primary-key-table.md
@@ -64,6 +64,10 @@ Performance:
entries in a partition takes up **1 GB** more memory, partitions that are
no longer active do not take up memory.
2. For tables with low update rates, this mode is recommended to significantly
improve performance.
+#### Sort Compact For Normal Dynamic Bucket Mode
+
+`Normal Dynamic Bucket Mode` supports sort-compact to speed up queries. See
[Sort Compact]({{< ref "maintenance/dedicated-compaction#sort-compact" >}}).
+
#### Cross Partitions Upsert Dynamic Bucket Mode
{{< hint info >}}
diff --git a/docs/content/maintenance/dedicated-compaction.md
b/docs/content/maintenance/dedicated-compaction.md
index 50cd9cbe6..0f0b7683c 100644
--- a/docs/content/maintenance/dedicated-compaction.md
+++ b/docs/content/maintenance/dedicated-compaction.md
@@ -218,3 +218,29 @@ For more usage of the compact-database action, see
{{< /tab >}}
{{< /tabs >}}
+
+## Sort Compact
+
+If your table is configured with [dynamic bucket]({{< ref
"concepts/primary-key-table#dynamic-bucket" >}})
+or [unaware bucket]({{< ref
"concepts/append-only-table#append-for-scalable-table" >}}) ,
+you can trigger a compact with specified column sort to speed up queries.
+
+```bash
+<FLINK_HOME>/bin/flink run \
+ -D execution.runtime-mode=batch \
+ /path/to/paimon-flink-action-{{< version >}}.jar \
+ compact \
+ --warehouse <warehouse-path> \
+ --database <database-name> \
+ --table <table-name> \
+ --order-strategy <orderType> \
+ --order-by <col1,col2,...>
+ [--partition <partition-name>] \
+ [--catalog-conf <paimon-catalog-conf> [--catalog-conf
<paimon-catalog-conf> ...]] \
+ [--table-conf <paimon-table-dynamic-conf> [--table-conf
<paimon-table-dynamic-conf>] ...]
+```
+There are two new configuration in `Sort Compact`
+{{< generated/sort-compact >}}
+
+The sort parallelism is the same as the sink parallelism, you can dynamically
specify it by add conf `--table-conf sink.parallelism=<value>`.
+
diff --git a/docs/layouts/shortcodes/generated/sort-compact.html
b/docs/layouts/shortcodes/generated/sort-compact.html
index 654904c3e..cfc553e33 100644
--- a/docs/layouts/shortcodes/generated/sort-compact.html
+++ b/docs/layouts/shortcodes/generated/sort-compact.html
@@ -45,7 +45,7 @@ under the License.
<tbody>
<tr>
<td><h5>--order-strategy</h5></td>
- <td>the order strategy now only support zorder. For example:
--order-strategy zorder</td>
+ <td>the order strategy now only support "zorder" and "order". For
example: --order-strategy zorder</td>
</tr>
<tr>
<td><h5>--order-by</h5></td>