You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by si...@apache.org on 2022/02/20 18:32:55 UTC

[hudi] branch asf-site updated: [MINOR] Adding faq to convert COW table to MOR (#4851)

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

sivabalan pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 7314d29  [MINOR] Adding faq to convert COW table to MOR (#4851)
7314d29 is described below

commit 7314d2978696a5823a0257093e8e3fa90663c178
Author: Sivabalan Narayanan <n....@gmail.com>
AuthorDate: Sun Feb 20 13:30:51 2022 -0500

    [MINOR] Adding faq to convert COW table to MOR (#4851)
---
 website/docs/faq.md               | 11 +++++++++++
 website/docs/quick-start-guide.md |  1 -
 website/learn/faq.md              | 11 +++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/website/docs/faq.md b/website/docs/faq.md
index da5b924..c675788 100644
--- a/website/docs/faq.md
+++ b/website/docs/faq.md
@@ -480,6 +480,17 @@ With this understanding, if you want your DAG stage to run faster, *bring T as c
 
 https://hudi.apache.org/docs/configurations#hoodiedatasourcehive_syncsupport_timestamp
 
+### How to convert an existing COW table to MOR? 
+
+All you need to do is to edit the table type property in hoodie.properties (located at hudi_table_path/.hoodie/hoodie.properties). 
+But manually changing it will result in checksum errors. So, we have to go via hudi-cli. 
+
+1. Copy existing hoodie.properties to a new location. 
+2. Edit table type to MERGE_ON_READ
+3. launch hudi-cli 
+   1. connect --path hudi_table_path
+   2. repair overwrite-hoodie-props --new-props-file new_hoodie.properties
+
 ## Contributing to FAQ
 
 A good and usable FAQ should be community-driven and crowd source questions/thoughts across everyone.
diff --git a/website/docs/quick-start-guide.md b/website/docs/quick-start-guide.md
index b85ee10..a31328d 100644
--- a/website/docs/quick-start-guide.md
+++ b/website/docs/quick-start-guide.md
@@ -518,7 +518,6 @@ val tripsSnapshotDF = spark.
   read.
   format("hudi").
   load(basePath)
-//load(basePath) use "/partitionKey=partitionValue" folder structure for Spark auto partition discovery
 tripsSnapshotDF.createOrReplaceTempView("hudi_trips_snapshot")
 
 spark.sql("select fare, begin_lon, begin_lat, ts from  hudi_trips_snapshot where fare > 20.0").show()
diff --git a/website/learn/faq.md b/website/learn/faq.md
index da5b924..ace41cc 100644
--- a/website/learn/faq.md
+++ b/website/learn/faq.md
@@ -480,6 +480,17 @@ With this understanding, if you want your DAG stage to run faster, *bring T as c
 
 https://hudi.apache.org/docs/configurations#hoodiedatasourcehive_syncsupport_timestamp
 
+### How to convert an existing COW table to MOR?
+
+All you need to do is to edit the table type property in hoodie.properties (located at hudi_table_path/.hoodie/hoodie.properties).
+But manually changing it will result in checksum errors. So, we have to go via hudi-cli.
+
+1. Copy existing hoodie.properties to a new location.
+2. Edit table type to MERGE_ON_READ
+3. launch hudi-cli
+    1. connect --path hudi_table_path
+    2. repair overwrite-hoodie-props --new-props-file new_hoodie.properties
+
 ## Contributing to FAQ
 
 A good and usable FAQ should be community-driven and crowd source questions/thoughts across everyone.