ad1happy2go commented on issue #9977:
URL: https://github.com/apache/hudi/issues/9977#issuecomment-1801883991
@mzheng-plaid I just tried to first generate data as per your configuration
```
hudi_configs = {
"hoodie.table.name": TABLE_NAME,
"hoodie.datasource.write.recordkey.field": "UUID",
"hoodie.datasource.write.precombine.field": "Name",
"hoodie.datasource.write.partitionpath.field": "Country",
"hoodie.datasource.write.operation": "upsert",
"hoodie.datasource.write.hive_style_partitioning": "true",
"hoodie.compact.inline": "true",
'hoodie.compact.inline.max.delta.commits': 6,
'hoodie.cleaner.commits.retained': 1,
'hoodie.bloom.index.prune.by.ranges': 'false',
'hoodie.datasource.write.payload.class':
'org.apache.hudi.common.model.DefaultHoodieRecordPayload',
'hoodie.compaction.payload.class':
'org.apache.hudi.common.model.DefaultHoodieRecordPayload',
'hoodie.commits.archival.batch': 5,
'hoodie.datasource.write.table.type': 'MERGE_ON_READ',
'hoodie.metadata.enable': 'false',
'hoodie.bootstrap.index.enable': 'false',
'hoodie.index.type': 'BLOOM',
'hoodie.parquet.max.file.size': -1,
}
insert_df = get_insert_df(spark, 1000)
insert_df.write.format("hudi").mode("overwrite").options(**hudi_configs).save(PATH)
for i in range(1, 50):
update_df = insert_df.withColumn("Age" , expr("Age + 1"))
insert_df = get_insert_df(spark, 1000)
insert_df.union(update_df).write.format("hudi").mode("append").options(**hudi_configs).save(PATH)
```
Then I just ran clustering but noticed there was no data loss.
```
'hoodie.compact.inline': True,
'hoodie.compact.inline.max.delta.commits': 6,
'hoodie.cleaner.commits.retained': 1,
'hoodie.compaction.target.io': 30000000,
'hoodie.parquet.max.file.size': 536870912,
'hoodie.parquet.block.size': 536870912,
'hoodie.parquet.small.file.limit': 268435456,
'hoodie.bloom.index.prune.by.ranges': 'false',
'hoodie.upsert.shuffle.parallelism': 9000,
'hoodie.datasource.write.payload.class':
'org.apache.hudi.common.model.DefaultHoodieRecordPayload',
'hoodie.compaction.payload.class':
'org.apache.hudi.common.model.DefaultHoodieRecordPayload',
'hoodie.rollback.parallelism': 500,
'hoodie.commits.archival.batch': 5,
"hoodie.datasource.write.table.name": xxx,
"hoodie.datasource.write.operation": "upsert",
"hoodie.datasource.write.keygenerator.class":
"org.apache.hudi.keygen.CustomKeyGenerator",
"hoodie.datasource.write.hive_style_partitioning": "true",
"hoodie.metadata.enable": "false",
"hoodie.bootstrap.index.enable": "false",
"hoodie.index.type": "BLOOM"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]