You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by fo...@apache.org on 2022/07/25 10:40:32 UTC

[hudi] branch master updated: [HUDI-4071] Match ROLLBACK_USING_MARKERS_ENABLE in sql as datasource (#6206)

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

forwardxu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 1fda9ee9bb [HUDI-4071] Match ROLLBACK_USING_MARKERS_ENABLE in sql as datasource (#6206)
1fda9ee9bb is described below

commit 1fda9ee9bb100d78638467965d2d6dc09f3f07dc
Author: superche <73...@users.noreply.github.com>
AuthorDate: Mon Jul 25 18:40:23 2022 +0800

    [HUDI-4071] Match ROLLBACK_USING_MARKERS_ENABLE in sql as datasource (#6206)
    
    Co-authored-by: superche <su...@tencent.com>
---
 .../org/apache/spark/sql/hudi/command/procedures/BaseProcedure.scala    | 1 -
 .../sql/hudi/command/procedures/RollbackToInstantTimeProcedure.scala    | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/BaseProcedure.scala b/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/BaseProcedure.scala
index 876bb503ee..99e488784c 100644
--- a/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/BaseProcedure.scala
+++ b/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/BaseProcedure.scala
@@ -50,7 +50,6 @@ abstract class BaseProcedure extends Procedure {
     HoodieWriteConfig.newBuilder
       .withPath(basePath)
       .withIndexConfig(HoodieIndexConfig.newBuilder.withIndexType(IndexType.BLOOM).build)
-      .withRollbackUsingMarkers(false)
       .build
   }
 
diff --git a/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/RollbackToInstantTimeProcedure.scala b/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/RollbackToInstantTimeProcedure.scala
index f17efe2449..f802e1e78b 100644
--- a/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/RollbackToInstantTimeProcedure.scala
+++ b/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/RollbackToInstantTimeProcedure.scala
@@ -21,6 +21,7 @@ import org.apache.hudi.common.table.HoodieTableMetaClient
 import org.apache.hudi.common.table.timeline.HoodieTimeline
 import org.apache.hudi.common.table.timeline.versioning.TimelineLayoutVersion
 import org.apache.hudi.common.util.Option
+import org.apache.hudi.config.HoodieWriteConfig.ROLLBACK_USING_MARKERS_ENABLE
 import org.apache.hudi.exception.HoodieException
 import org.apache.spark.sql.Row
 import org.apache.spark.sql.catalyst.TableIdentifier
@@ -51,6 +52,7 @@ class RollbackToInstantTimeProcedure extends BaseProcedure with ProcedureBuilder
     val hoodieCatalogTable = HoodieCatalogTable(sparkSession, new TableIdentifier(table))
     val basePath = hoodieCatalogTable.tableLocation
     val client = createHoodieClient(jsc, basePath)
+    client.getConfig.setValue(ROLLBACK_USING_MARKERS_ENABLE, "false")
     val config = getWriteConfig(basePath)
     val metaClient = HoodieTableMetaClient.builder
       .setConf(jsc.hadoopConfiguration)