1
0

[HUDI-4071] Match ROLLBACK_USING_MARKERS_ENABLE in sql as datasource (#6206)

Co-authored-by: superche <superche@tencent.com>
This commit is contained in:
superche
2022-07-25 18:40:23 +08:00
committed by GitHub
parent b513232449
commit 1fda9ee9bb
2 changed files with 2 additions and 1 deletions

View File

@@ -50,7 +50,6 @@ abstract class BaseProcedure extends Procedure {
HoodieWriteConfig.newBuilder HoodieWriteConfig.newBuilder
.withPath(basePath) .withPath(basePath)
.withIndexConfig(HoodieIndexConfig.newBuilder.withIndexType(IndexType.BLOOM).build) .withIndexConfig(HoodieIndexConfig.newBuilder.withIndexType(IndexType.BLOOM).build)
.withRollbackUsingMarkers(false)
.build .build
} }

View File

@@ -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.HoodieTimeline
import org.apache.hudi.common.table.timeline.versioning.TimelineLayoutVersion import org.apache.hudi.common.table.timeline.versioning.TimelineLayoutVersion
import org.apache.hudi.common.util.Option 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.hudi.exception.HoodieException
import org.apache.spark.sql.Row import org.apache.spark.sql.Row
import org.apache.spark.sql.catalyst.TableIdentifier 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 hoodieCatalogTable = HoodieCatalogTable(sparkSession, new TableIdentifier(table))
val basePath = hoodieCatalogTable.tableLocation val basePath = hoodieCatalogTable.tableLocation
val client = createHoodieClient(jsc, basePath) val client = createHoodieClient(jsc, basePath)
client.getConfig.setValue(ROLLBACK_USING_MARKERS_ENABLE, "false")
val config = getWriteConfig(basePath) val config = getWriteConfig(basePath)
val metaClient = HoodieTableMetaClient.builder val metaClient = HoodieTableMetaClient.builder
.setConf(jsc.hadoopConfiguration) .setConf(jsc.hadoopConfiguration)