Skip to content

Commit bcb5eaa

Browse files
linliu-codeyihua
authored andcommitted
fix: Update metadata table record level index config keys naming for standardization (#14244)
1 parent cab988c commit bcb5eaa

File tree

8 files changed

+61
-57
lines changed

8 files changed

+61
-57
lines changed

hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,20 +2676,20 @@ public boolean isLogCompactionEnabledOnMetadata() {
26762676
return getBoolean(HoodieMetadataConfig.ENABLE_LOG_COMPACTION_ON_METADATA_TABLE);
26772677
}
26782678

2679-
public int getRecordIndexMinFileGroupCount() {
2680-
return metadataConfig.getRecordIndexMinFileGroupCount();
2679+
public int getGlobalRecordLevelIndexMinFileGroupCount() {
2680+
return metadataConfig.getGlobalRecordLevelIndexMinFileGroupCount();
26812681
}
26822682

2683-
public int getRecordIndexMaxFileGroupCount() {
2684-
return metadataConfig.getRecordIndexMaxFileGroupCount();
2683+
public int getGlobalRecordLevelIndexMaxFileGroupCount() {
2684+
return metadataConfig.getGlobalRecordLevelIndexMaxFileGroupCount();
26852685
}
26862686

2687-
public int getPartitionedRecordIndexMinFileGroupCount() {
2688-
return metadataConfig.getPartitionedRecordIndexMinFileGroupCount();
2687+
public int getRecordLevelIndexMinFileGroupCount() {
2688+
return metadataConfig.getRecordLevelIndexMinFileGroupCount();
26892689
}
26902690

2691-
public int getPartitionedRecordIndexMaxFileGroupCount() {
2692-
return metadataConfig.getPartitionedRecordIndexMaxFileGroupCount();
2691+
public int getRecordLevelIndexMaxFileGroupCount() {
2692+
return metadataConfig.getRecordLevelIndexMaxFileGroupCount();
26932693
}
26942694

26952695
public float getRecordIndexGrowthFactor() {

hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,8 @@ private Pair<Integer, HoodieData<HoodieRecord>> initializeSecondaryIndexPartitio
673673

674674
// Initialize the file groups - using the same estimation logic as that of record index
675675
final int fileGroupCount = HoodieTableMetadataUtil.estimateFileGroupCount(RECORD_INDEX, records::count,
676-
RECORD_INDEX_AVERAGE_RECORD_SIZE, dataWriteConfig.getRecordIndexMinFileGroupCount(),
677-
dataWriteConfig.getRecordIndexMaxFileGroupCount(), dataWriteConfig.getRecordIndexGrowthFactor(),
676+
RECORD_INDEX_AVERAGE_RECORD_SIZE, dataWriteConfig.getGlobalRecordLevelIndexMinFileGroupCount(),
677+
dataWriteConfig.getGlobalRecordLevelIndexMaxFileGroupCount(), dataWriteConfig.getRecordIndexGrowthFactor(),
678678
dataWriteConfig.getRecordIndexMaxFileGroupSizeBytes());
679679

680680
return Pair.of(fileGroupCount, records);
@@ -811,11 +811,11 @@ private int estimateFileGroupCount(HoodieData<HoodieRecord> records) {
811811
int minFileGroupCount;
812812
int maxFileGroupCount;
813813
if (dataWriteConfig.isRecordLevelIndexEnabled()) {
814-
minFileGroupCount = dataWriteConfig.getPartitionedRecordIndexMinFileGroupCount();
815-
maxFileGroupCount = dataWriteConfig.getPartitionedRecordIndexMaxFileGroupCount();
814+
minFileGroupCount = dataWriteConfig.getRecordLevelIndexMinFileGroupCount();
815+
maxFileGroupCount = dataWriteConfig.getRecordLevelIndexMaxFileGroupCount();
816816
} else {
817-
minFileGroupCount = dataWriteConfig.getRecordIndexMinFileGroupCount();
818-
maxFileGroupCount = dataWriteConfig.getRecordIndexMaxFileGroupCount();
817+
minFileGroupCount = dataWriteConfig.getGlobalRecordLevelIndexMinFileGroupCount();
818+
maxFileGroupCount = dataWriteConfig.getGlobalRecordLevelIndexMaxFileGroupCount();
819819
}
820820
Supplier<Long> recordCountSupplier = () -> {
821821
records.persist("MEMORY_AND_DISK_SER");
@@ -1429,7 +1429,7 @@ private void initializeNewFileGroupsForPartitionedRLIHelper(Set<String> partitio
14291429
for (String partitionToWrite : partitionsTouchedByInflightCommit) {
14301430
// Always use the min file group count!
14311431
initializeFileGroups(dataMetaClient, RECORD_INDEX, instantTime,
1432-
dataWriteConfig.getPartitionedRecordIndexMinFileGroupCount(),
1432+
dataWriteConfig.getRecordLevelIndexMinFileGroupCount(),
14331433
RECORD_INDEX.getPartitionPath(), Option.of(partitionToWrite));
14341434
}
14351435
initMetadataReader();

hudi-common/src/main/java/org/apache/hudi/common/config/HoodieMetadataConfig.java

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -290,30 +290,34 @@ public final class HoodieMetadataConfig extends HoodieConfig {
290290
.withDocumentation("Create the HUDI Record Index within the Metadata Table for a partitioned dataset where a "
291291
+ "pair of partition path and record key is unique across the entire table");
292292

293-
public static final ConfigProperty<Integer> RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP = ConfigProperty
294-
.key(METADATA_PREFIX + ".record.index.min.filegroup.count")
293+
public static final ConfigProperty<Integer> GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP = ConfigProperty
294+
.key(METADATA_PREFIX + ".global.record.level.index.min.filegroup.count")
295295
.defaultValue(10)
296+
.withAlternatives(METADATA_PREFIX + ".record.index.min.filegroup.count")
296297
.markAdvanced()
297298
.sinceVersion("0.14.0")
298299
.withDocumentation("Minimum number of file groups to use for Record Index.");
299300

300-
public static final ConfigProperty<Integer> RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP = ConfigProperty
301-
.key(METADATA_PREFIX + ".record.index.max.filegroup.count")
301+
public static final ConfigProperty<Integer> GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP = ConfigProperty
302+
.key(METADATA_PREFIX + ".global.record.level.index.max.filegroup.count")
302303
.defaultValue(10000)
304+
.withAlternatives(METADATA_PREFIX + ".record.index.max.filegroup.count")
303305
.markAdvanced()
304306
.sinceVersion("0.14.0")
305307
.withDocumentation("Maximum number of file groups to use for Record Index.");
306308

307-
public static final ConfigProperty<Integer> PARTITIONED_RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP = ConfigProperty
308-
.key(METADATA_PREFIX + ".partitioned.record.index.min.filegroup.count")
309+
public static final ConfigProperty<Integer> RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP = ConfigProperty
310+
.key(METADATA_PREFIX + ".record.level.index.min.filegroup.count")
309311
.defaultValue(1)
312+
.withAlternatives(METADATA_PREFIX + ".partitioned.record.index.min.filegroup.count")
310313
.markAdvanced()
311314
.sinceVersion("1.1.0")
312315
.withDocumentation("Minimum number of file groups to use for Partitioned Record Index.");
313316

314-
public static final ConfigProperty<Integer> PARTITIONED_RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP = ConfigProperty
315-
.key(METADATA_PREFIX + ".partitioned.record.index.max.filegroup.count")
317+
public static final ConfigProperty<Integer> RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP = ConfigProperty
318+
.key(METADATA_PREFIX + ".record.level.index.max.filegroup.count")
316319
.defaultValue(10)
320+
.withAlternatives(METADATA_PREFIX + ".partitioned.record.index.max.filegroup.count")
317321
.markAdvanced()
318322
.sinceVersion("1.1.0")
319323
.withDocumentation("Maximum number of file groups to use for Partitioned Record Index.");
@@ -684,20 +688,20 @@ public int getMaxNumDeltacommitsWhenPending() {
684688
return getIntOrDefault(METADATA_MAX_NUM_DELTACOMMITS_WHEN_PENDING);
685689
}
686690

687-
public int getRecordIndexMinFileGroupCount() {
688-
return getInt(RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP);
691+
public int getGlobalRecordLevelIndexMinFileGroupCount() {
692+
return getInt(GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP);
689693
}
690694

691-
public int getPartitionedRecordIndexMinFileGroupCount() {
692-
return getInt(PARTITIONED_RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP);
695+
public int getRecordLevelIndexMinFileGroupCount() {
696+
return getInt(RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP);
693697
}
694698

695-
public int getRecordIndexMaxFileGroupCount() {
696-
return getInt(RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP);
699+
public int getGlobalRecordLevelIndexMaxFileGroupCount() {
700+
return getInt(GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP);
697701
}
698702

699-
public int getPartitionedRecordIndexMaxFileGroupCount() {
700-
return getInt(PARTITIONED_RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP);
703+
public int getRecordLevelIndexMaxFileGroupCount() {
704+
return getInt(RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP);
701705
}
702706

703707
public float getRecordIndexGrowthFactor() {
@@ -1033,8 +1037,8 @@ public Builder withEnableGlobalRecordLevelIndex(boolean enabled) {
10331037
}
10341038

10351039
public Builder withRecordIndexFileGroupCount(int minCount, int maxCount) {
1036-
metadataConfig.setValue(RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP, String.valueOf(minCount));
1037-
metadataConfig.setValue(RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP, String.valueOf(maxCount));
1040+
metadataConfig.setValue(GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP, String.valueOf(minCount));
1041+
metadataConfig.setValue(GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP, String.valueOf(maxCount));
10381042
return this;
10391043
}
10401044

hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/RecordLevelIndexTestBase.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class RecordLevelIndexTestBase extends HoodieStatsIndexTestBase {
152152

153153
assertEquals(rowArr.length, recordIndexMap.keySet.size)
154154
val estimatedFileGroupCount = HoodieTableMetadataUtil.estimateFileGroupCount(MetadataPartitionType.RECORD_INDEX, () => rowArr.length, 48,
155-
writeConfig.getRecordIndexMinFileGroupCount, writeConfig.getRecordIndexMaxFileGroupCount,
155+
writeConfig.getGlobalRecordLevelIndexMinFileGroupCount, writeConfig.getGlobalRecordLevelIndexMaxFileGroupCount,
156156
writeConfig.getRecordIndexGrowthFactor, writeConfig.getRecordIndexMaxFileGroupSizeBytes)
157157
assertEquals(estimatedFileGroupCount, getFileGroupCountForRecordIndex(writeConfig))
158158
val prevDf = mergedDfList.last.drop("tip_history", "_hoodie_is_deleted")

hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestGlobalRecordLevelIndex.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ class TestGlobalRecordLevelIndex extends RecordLevelIndexTestBase {
7474
def testRLIInitializationForMorGlobalIndex(): Unit = {
7575
val tableType = HoodieTableType.MERGE_ON_READ
7676
val hudiOpts = commonOpts + (DataSourceWriteOptions.TABLE_TYPE.key -> tableType.name()) +
77-
(HoodieMetadataConfig.RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP.key -> "1") +
78-
(HoodieMetadataConfig.RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP.key -> "1") +
77+
(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP.key -> "1") +
78+
(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP.key -> "1") +
7979
(HoodieIndexConfig.INDEX_TYPE.key -> HoodieIndex.IndexType.GLOBAL_RECORD_LEVEL_INDEX.name()) +
8080
(HoodieIndexConfig.RECORD_INDEX_UPDATE_PARTITION_PATH_ENABLE.key -> "true") -
8181
HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_ENABLE_PROP.key
@@ -116,8 +116,8 @@ class TestGlobalRecordLevelIndex extends RecordLevelIndexTestBase {
116116
deletedDf2.cache()
117117

118118
val hudiOpts2 = commonOpts + (DataSourceWriteOptions.TABLE_TYPE.key -> tableType.name()) +
119-
(HoodieMetadataConfig.RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP.key -> "1") +
120-
(HoodieMetadataConfig.RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP.key -> "1") +
119+
(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP.key -> "1") +
120+
(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP.key -> "1") +
121121
(HoodieIndexConfig.INDEX_TYPE.key -> HoodieIndex.IndexType.GLOBAL_RECORD_LEVEL_INDEX.name()) +
122122
(HoodieIndexConfig.RECORD_INDEX_UPDATE_PARTITION_PATH_ENABLE.key -> "true") +
123123
(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_ENABLE_PROP.key -> "true")

hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestMetadataRecordIndex.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class TestMetadataRecordIndex extends HoodieSparkClientTestBase {
207207
assertEquals(rowArr.length, recordIndexMap.keySet.size)
208208
val estimatedFileGroupCount = HoodieTableMetadataUtil.estimateFileGroupCount(
209209
MetadataPartitionType.RECORD_INDEX, () => rowArr.length, 48,
210-
writeConfig.getRecordIndexMinFileGroupCount, writeConfig.getRecordIndexMaxFileGroupCount,
210+
writeConfig.getGlobalRecordLevelIndexMinFileGroupCount, writeConfig.getGlobalRecordLevelIndexMaxFileGroupCount,
211211
writeConfig.getRecordIndexGrowthFactor, writeConfig.getRecordIndexMaxFileGroupSizeBytes)
212212
assertEquals(estimatedFileGroupCount, getFileGroupCountForRecordIndex(writeConfig))
213213
val prevDf = mergedDfList.last.drop("tip_history")

hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/feature/index/TestHoodieBackedTableMetadataIndexLookup.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ abstract class HoodieBackedTableMetadataIndexLookupTestBase extends HoodieSparkS
7070
| hoodie.metadata.record.index.enable = 'true',
7171
| hoodie.metadata.index.column.stats.enable = 'true',
7272
| hoodie.metadata.index.secondary.enable = 'true',
73-
| hoodie.metadata.record.index.min.filegroup.count = '${getNumFileIndexGroup}',
74-
| hoodie.metadata.record.index.max.filegroup.count = '${getNumFileIndexGroup}',
73+
| hoodie.metadata.global.record.level.index.min.filegroup.count = '${getNumFileIndexGroup}',
74+
| hoodie.metadata.global.record.level.index.max.filegroup.count = '${getNumFileIndexGroup}',
7575
| hoodie.write.table.version = '${getTableVersion}',
7676
| hoodie.datasource.write.payload.class = 'org.apache.hudi.common.model.OverwriteWithLatestAvroPayload'
7777
| )
@@ -207,8 +207,8 @@ abstract class HoodieBackedTableMetadataIndexLookupTestBase extends HoodieSparkS
207207

208208
// Create secondary indexes on name and price columns
209209
spark.sql(s"set hoodie.write.table.version = ${getTableVersion}")
210-
spark.sql(s"set hoodie.metadata.record.index.min.filegroup.count = ${getNumFileIndexGroup}")
211-
spark.sql(s"set hoodie.metadata.record.index.max.filegroup.count = ${getNumFileIndexGroup}")
210+
spark.sql(s"set hoodie.metadata.global.record.level.index.min.filegroup.count = ${getNumFileIndexGroup}")
211+
spark.sql(s"set hoodie.metadata.global.record.level.index.max.filegroup.count = ${getNumFileIndexGroup}")
212212
spark.sql(s"create index idx_name on $tableName (name)")
213213
spark.sql(s"create index idx_price on $tableName (price)")
214214

hudi-utilities/src/test/java/org/apache/hudi/utilities/TestHoodieMetadataTableValidator.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,17 @@ public void testMetadataTableValidation(String viewStorageTypeForFSListing, Stri
211211
inserts.write().format("hudi").options(writeOptions)
212212
.option(DataSourceWriteOptions.OPERATION().key(), WriteOperationType.BULK_INSERT.value())
213213
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_ENABLE_PROP.key(), "true")
214-
.option(HoodieMetadataConfig.RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
215-
.option(HoodieMetadataConfig.RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
214+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
215+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
216216
.mode(SaveMode.Overwrite)
217217
.save(basePath);
218218
inserts.unpersist(true);
219219
Dataset<Row> updates = makeUpdateDf("001", 5).cache();
220220
updates.write().format("hudi").options(writeOptions)
221221
.option(DataSourceWriteOptions.OPERATION().key(), WriteOperationType.UPSERT.value())
222222
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_ENABLE_PROP.key(), "true")
223-
.option(HoodieMetadataConfig.RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
224-
.option(HoodieMetadataConfig.RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
223+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
224+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
225225
.mode(SaveMode.Append)
226226
.save(basePath);
227227
updates.unpersist(true);
@@ -270,8 +270,8 @@ void missingLogFileFailsValidation() throws Exception {
270270
inserts.write().format("hudi").options(writeOptions)
271271
.option(DataSourceWriteOptions.OPERATION().key(), WriteOperationType.BULK_INSERT.value())
272272
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_ENABLE_PROP.key(), "true")
273-
.option(HoodieMetadataConfig.RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
274-
.option(HoodieMetadataConfig.RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
273+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
274+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
275275
.mode(SaveMode.Overwrite)
276276
.save(basePath);
277277
inserts.unpersist(true);
@@ -285,8 +285,8 @@ void missingLogFileFailsValidation() throws Exception {
285285
updates.write().format("hudi").options(writeOptions)
286286
.option(DataSourceWriteOptions.OPERATION().key(), WriteOperationType.UPSERT.value())
287287
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_ENABLE_PROP.key(), "true")
288-
.option(HoodieMetadataConfig.RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
289-
.option(HoodieMetadataConfig.RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
288+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
289+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
290290
.mode(SaveMode.Append)
291291
.save(basePath);
292292
updates.unpersist(true);
@@ -1398,17 +1398,17 @@ public void testRliValidationFalsePositiveCase() throws Exception {
13981398
inserts.write().format("hudi").options(writeOptions)
13991399
.option(DataSourceWriteOptions.OPERATION().key(), WriteOperationType.BULK_INSERT.value())
14001400
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_ENABLE_PROP.key(), "true")
1401-
.option(HoodieMetadataConfig.RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
1402-
.option(HoodieMetadataConfig.RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
1401+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
1402+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
14031403
.mode(SaveMode.Overwrite)
14041404
.save(basePath);
14051405
inserts.unpersist(true);
14061406
Dataset<Row> updates = makeUpdateDf("001", 5).cache();
14071407
updates.write().format("hudi").options(writeOptions)
14081408
.option(DataSourceWriteOptions.OPERATION().key(), WriteOperationType.UPSERT.value())
14091409
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_ENABLE_PROP.key(), "true")
1410-
.option(HoodieMetadataConfig.RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
1411-
.option(HoodieMetadataConfig.RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
1410+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
1411+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
14121412
.mode(SaveMode.Append)
14131413
.save(basePath);
14141414
updates.unpersist(true);
@@ -1417,8 +1417,8 @@ public void testRliValidationFalsePositiveCase() throws Exception {
14171417
inserts2.write().format("hudi").options(writeOptions)
14181418
.option(DataSourceWriteOptions.OPERATION().key(), WriteOperationType.BULK_INSERT.value())
14191419
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_ENABLE_PROP.key(), "true")
1420-
.option(HoodieMetadataConfig.RECORD_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
1421-
.option(HoodieMetadataConfig.RECORD_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
1420+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MIN_FILE_GROUP_COUNT_PROP.key(), "1")
1421+
.option(HoodieMetadataConfig.GLOBAL_RECORD_LEVEL_INDEX_MAX_FILE_GROUP_COUNT_PROP.key(), "1")
14221422
.mode(SaveMode.Append)
14231423
.save(basePath);
14241424
inserts2.unpersist(true);

0 commit comments

Comments
 (0)