1
0

[HUDI-2151] Flipping defaults (#3452)

This commit is contained in:
Sivabalan Narayanan
2021-08-13 19:29:22 -04:00
committed by GitHub
parent 9689278014
commit 642b1b671d
6 changed files with 11 additions and 8 deletions

View File

@@ -141,8 +141,8 @@ public class HoodieIndexConfig extends HoodieConfig {
public static final ConfigProperty<String> BLOOM_INDEX_FILTER_TYPE = ConfigProperty
.key("hoodie.bloom.index.filter.type")
.defaultValue(BloomFilterTypeCode.SIMPLE.name())
.withDocumentation("Filter type used. Default is BloomFilterTypeCode.SIMPLE. "
.defaultValue(BloomFilterTypeCode.DYNAMIC_V0.name())
.withDocumentation("Filter type used. Default is BloomFilterTypeCode.DYNAMIC_V0. "
+ "Available values are [BloomFilterTypeCode.SIMPLE , BloomFilterTypeCode.DYNAMIC_V0]. "
+ "Dynamic bloom filters auto size themselves based on number of keys.");
@@ -211,7 +211,7 @@ public class HoodieIndexConfig extends HoodieConfig {
*/
public static final ConfigProperty<String> BLOOM_INDEX_UPDATE_PARTITION_PATH = ConfigProperty
.key("hoodie.bloom.index.update.partition.path")
.defaultValue("false")
.defaultValue("true")
.withDocumentation("Only applies if index type is GLOBAL_BLOOM. "
+ "When set to true, an update including the partition path of a record that already exists will result in "
+ "inserting the incoming record into the new partition and deleting the original record in the old partition. "
@@ -219,7 +219,7 @@ public class HoodieIndexConfig extends HoodieConfig {
public static final ConfigProperty<String> SIMPLE_INDEX_UPDATE_PARTITION_PATH = ConfigProperty
.key("hoodie.simple.index.update.partition.path")
.defaultValue("false")
.defaultValue("true")
.withDocumentation("Similar to " + BLOOM_INDEX_UPDATE_PARTITION_PATH + ", but for simple index.");
/**

View File

@@ -119,7 +119,7 @@ public class HoodieWriteConfig extends HoodieConfig {
public static final ConfigProperty<String> TIMELINE_LAYOUT_VERSION = ConfigProperty
.key("hoodie.timeline.layout.version")
.noDefaultValue()
.defaultValue(Integer.toString(TimelineLayoutVersion.VERSION_1))
.sinceVersion("0.5.1")
.withDocumentation("Controls the layout of the timeline. Version 0 relied on renames, Version 1 (default) models "
+ "the timeline as an immutable log relying only on atomic writes for object storage.");

View File

@@ -1973,6 +1973,7 @@ public class TestHoodieClientOnCopyOnWriteStorage extends HoodieClientTestBase {
getConfigBuilder().withRollbackUsingMarkers(rollbackUsingMarkers).withAutoCommit(false)
.withConsistencyGuardConfig(ConsistencyGuardConfig.newBuilder()
.withConsistencyCheckEnabled(true)
.withEnableOptimisticConsistencyGuard(enableOptimisticConsistencyGuard)
.withOptimisticConsistencyGuardSleepTimeMs(1).build())
.withProperties(properties).build();
SparkRDDWriteClient client = getHoodieWriteClient(cfg);
@@ -2204,6 +2205,7 @@ public class TestHoodieClientOnCopyOnWriteStorage extends HoodieClientTestBase {
.withMaxConsistencyCheckIntervalMs(1).withInitialConsistencyCheckIntervalMs(1).withEnableOptimisticConsistencyGuard(enableOptimisticConsistencyGuard).build())
.build()) : (getConfigBuilder().withAutoCommit(false)
.withConsistencyGuardConfig(ConsistencyGuardConfig.newBuilder().withConsistencyCheckEnabled(true)
.withEnableOptimisticConsistencyGuard(enableOptimisticConsistencyGuard)
.withOptimisticConsistencyGuardSleepTimeMs(1).build())
.build());
SparkRDDWriteClient client = getHoodieWriteClient(cfg);

View File

@@ -177,7 +177,8 @@ public class TestHoodieGlobalBloomIndex extends HoodieClientTestHarness {
@Test
public void testTagLocation() throws Exception {
HoodieWriteConfig config = HoodieWriteConfig.newBuilder().withPath(basePath).build();
HoodieWriteConfig config = HoodieWriteConfig.newBuilder().withPath(basePath)
.withIndexConfig(HoodieIndexConfig.newBuilder().withBloomIndexUpdatePartitionPath(false).build()).build();
SparkHoodieGlobalBloomIndex index = new SparkHoodieGlobalBloomIndex(config);
HoodieTable hoodieTable = HoodieSparkTable.create(config, context, metaClient);
HoodieSparkWriteableTestTable testTable = HoodieSparkWriteableTestTable.of(hoodieTable, SCHEMA);

View File

@@ -77,7 +77,7 @@ public class ConsistencyGuardConfig extends HoodieConfig {
// config to enable OptimisticConsistencyGuard in finalizeWrite instead of FailSafeConsistencyGuard
public static final ConfigProperty<Boolean> ENABLE_OPTIMISTIC_CONSISTENCY_GUARD_PROP = ConfigProperty
.key("_hoodie.optimistic.consistency.guard.enable")
.defaultValue(true)
.defaultValue(false)
.sinceVersion("0.6.0")
.withDocumentation("Enable consistency guard, which optimistically assumes consistency is achieved after a certain time period.");

View File

@@ -288,7 +288,7 @@ object DataSourceWriteOptions {
*/
val ENABLE_ROW_WRITER: ConfigProperty[String] = ConfigProperty
.key("hoodie.datasource.write.row.writer.enable")
.defaultValue("false")
.defaultValue("true")
.withDocumentation("When set to true, will perform write operations directly using the spark native " +
"`Row` representation, avoiding any additional conversion costs.")
@Deprecated