You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2023/12/05 09:05:31 UTC

(incubator-paimon) 04/12: [doc] Introduce learn paimon doc

This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch release-0.6
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git

commit 7e3fcd2dd21f778e20e54fd697c1af356939e735
Author: Jingsong <ji...@gmail.com>
AuthorDate: Mon Dec 4 14:02:16 2023 +0800

    [doc] Introduce learn paimon doc
---
 docs/content/learn-paimon/_index.md                | 25 +++++++++++
 .../understand-files.md                            | 48 +---------------------
 docs/content/maintenance/manage-snapshots.md       | 43 +++++++++++++++++++
 3 files changed, 70 insertions(+), 46 deletions(-)

diff --git a/docs/content/learn-paimon/_index.md b/docs/content/learn-paimon/_index.md
new file mode 100644
index 000000000..9fa906127
--- /dev/null
+++ b/docs/content/learn-paimon/_index.md
@@ -0,0 +1,25 @@
+---
+title: Learn Paimon
+icon: <i class="fa fa-sitemap title maindish" aria-hidden="true"></i>
+bold: true
+bookCollapseSection: true
+weight: 10
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
diff --git a/docs/content/maintenance/understand-files.md b/docs/content/learn-paimon/understand-files.md
similarity index 93%
rename from docs/content/maintenance/understand-files.md
rename to docs/content/learn-paimon/understand-files.md
index 5e92c35fe..b3d913e9a 100644
--- a/docs/content/maintenance/understand-files.md
+++ b/docs/content/learn-paimon/understand-files.md
@@ -1,9 +1,9 @@
 ---
 title: "Understand Files"
-weight: 99
+weight: 1
 type: docs
 aliases:
-- /maintenance/understand-files.html
+- /learn-paimon/understand-files.html
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
@@ -337,50 +337,6 @@ expiration looks like:
 
 As a result, partition `20230503` to `20230510` are physically deleted.
 
-### Remove Orphan Files
-
-Paimon files are deleted physically only when expiring snapshots. However, it is possible that some unexpected errors occurred
-when deleting files, so that there may exist files that are not used by Paimon table (so-called "orphan files"). You can 
-submit a `remove-orphan-files` job to clean them:
-
-{{< tabs "remove-orphan-files" >}}
-
-{{< tab "Flink" >}}
-
-```bash
-<FLINK_HOME>/bin/flink run \
-    /path/to/paimon-flink-action-{{< version >}}.jar \
-    remove-orphan-files \
-    --warehouse <warehouse-path> \
-    --database <database-name> \ 
-    --table <table-name> \
-    [--older_than <timestamp>] 
-```
-
-To avoid deleting files that are newly added by other writing jobs, this action only deletes orphan files older than 
-1 day by default. The interval can be modified by `--older_than`. For example:
-
-```bash
-<FLINK_HOME>/bin/flink run \
-    /path/to/paimon-flink-action-{{< version >}}.jar \
-    remove-orphan-files \
-    --warehouse <warehouse-path> \
-    --database <database-name> \ 
-    --table T \
-    --older_than '2023-10-31 12:00:00'
-```
-
-{{< /tab >}}
-
-{{< tab "Spark" >}}
-```sql
-CALL sys.remove_orphan_files(table => "tableId", [older_then => "2023-10-31 12:00:00"])
-```
-{{< /tab >}}
-
-{{< /tabs >}}
-
-
 ### Flink Stream Write
 
 Finally, we will examine Flink Stream Write by utilizing the example
diff --git a/docs/content/maintenance/manage-snapshots.md b/docs/content/maintenance/manage-snapshots.md
index 53d09d7a2..a72c89f99 100644
--- a/docs/content/maintenance/manage-snapshots.md
+++ b/docs/content/maintenance/manage-snapshots.md
@@ -286,4 +286,47 @@ CALL rollback(table => 'test.T', version => '2');
 
 {{< /tab >}}
 
+{{< /tabs >}}
+
+## Remove Orphan Files
+
+Paimon files are deleted physically only when expiring snapshots. However, it is possible that some unexpected errors occurred
+when deleting files, so that there may exist files that are not used by Paimon snapshots (so-called "orphan files"). You can
+submit a `remove_orphan_files` job to clean them:
+
+{{< tabs "remove_orphan_files" >}}
+
+{{< tab "Flink" >}}
+
+```bash
+<FLINK_HOME>/bin/flink run \
+    /path/to/paimon-flink-action-{{< version >}}.jar \
+    remove_orphan_files \
+    --warehouse <warehouse-path> \
+    --database <database-name> \ 
+    --table <table-name> \
+    [--older_than <timestamp>] 
+```
+
+To avoid deleting files that are newly added by other writing jobs, this action only deletes orphan files older than
+1 day by default. The interval can be modified by `--older_than`. For example:
+
+```bash
+<FLINK_HOME>/bin/flink run \
+    /path/to/paimon-flink-action-{{< version >}}.jar \
+    remove_orphan_files \
+    --warehouse <warehouse-path> \
+    --database <database-name> \ 
+    --table T \
+    --older_than '2023-10-31 12:00:00'
+```
+
+{{< /tab >}}
+
+{{< tab "Spark" >}}
+```sql
+CALL sys.remove_orphan_files(table => "tableId", [older_then => "2023-10-31 12:00:00"])
+```
+{{< /tab >}}
+
 {{< /tabs >}}
\ No newline at end of file