You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "vishal-genea (via GitHub)" <gi...@apache.org> on 2025/03/10 17:32:34 UTC
[I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
vishal-genea opened a new issue, #12951:
URL: https://github.com/apache/hudi/issues/12951
**Describe the problem you faced**
Flink + Hudi COW + upsert mode + S3 path -> too slow. Nearly taking half an hour for 13k records only.
**To Reproduce**
Steps to reproduce the behavior:
Use these configuration to reproduce
" 'connector' = 'hudi'," +
" 'path' = '" + S3_PATH + "'," +
" 'table.type' = 'COPY_ON_WRITE'," +
" 'hoodie.table.name' = '" + HUDI_TABLE_NAME + "'," +
" 'hoodie.datasource.write.recordkey.field' = 'event_id'," +
" 'hoodie.datasource.write.partitionpath.field' = 'customer_uuid,year,month'," +
" 'hoodie.datasource.write.precombine.field' = 'time'," +
" 'hoodie.schema.on.read.enable' = 'true'," +
" 'hoodie.parquet.compression.codec' = 'snappy'," +
" 'hoodie.datasource.write.operation' = 'upsert',"+
" 'hoodie.parquet.max.file.size' = '10485760',"+
" 'write.tasks' = '8',"+
" 'hoodie.populate.meta.fields' = 'true',"+
" 'hoodie.table.keygenerator.class' = 'org.apache.hudi.keygen.NonpartitionedKeyGenerator',"+
" 'hoodie.metadata.enable' = 'false'"+
**Expected behavior**
It should process the data within a minutes, evne for 1 million records.
**Environment Description**
* Hudi version : 0.15.0
* Flink version : 1.18
* Hadoop version : 3.1.4
* Storage (HDFS/S3/GCS..) : S3
* Running on Docker? (yes/no) : no
**Additional context**
- use these configs
```
" 'connector' = 'hudi'," +
" 'path' = '" + S3_PATH + "'," +
" 'table.type' = 'COPY_ON_WRITE'," +
" 'hoodie.table.name' = '" + HUDI_TABLE_NAME + "'," +
" 'hoodie.datasource.write.recordkey.field' = 'event_id'," +
" 'hoodie.datasource.write.partitionpath.field' = 'customer_uuid,year,month'," +
" 'hoodie.datasource.write.precombine.field' = 'time'," +
" 'hoodie.schema.on.read.enable' = 'true'," +
" 'hoodie.parquet.compression.codec' = 'snappy'," +
" 'hoodie.datasource.write.operation' = 'upsert',"+
" 'hoodie.parquet.max.file.size' = '10485760',"+
" 'write.tasks' = '8',"+
" 'hoodie.populate.meta.fields' = 'true',"+
" 'hoodie.table.keygenerator.class' = 'org.apache.hudi.keygen.NonpartitionedKeyGenerator',"+
" 'hoodie.metadata.enable' = 'false'"+
```
- Sinking time is very random but it is taking ~half an hour for 13k and for 28K it tool 2 hours, which is very wierd

--
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: commits-unsubscribe@hudi.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2713393000
> In my case upserts are 10% and inserts are 90%
Can you check the TM process hotspot calls on the Flink web-UI, it looks like an issue for record SE/DE.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "vishal-genea (via GitHub)" <gi...@apache.org>.
vishal-genea commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2713925649
I have taken only 10 fields and removed all 330 fields, it is taking even more

Not sure what is the problem.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "vishal-genea (via GitHub)" <gi...@apache.org>.
vishal-genea commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2713285419
Previously **NonpartitionedKeyGenerator** was not there, I added to to resolve some errors, but I will remove it.
And for bulk_insert, I was just checking if insert is quicker than upserts or not, I need upserts only. But I though inserts must be quicker but this was not the case, inserts are also taking huge time.
In my case upserts are 10% and inserts are 90%, so I have used COW. But nothing helped. And it just keep on getting slower and slower if more data is there in S3.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2713223549
I'm confused why the key generator is `NonpartitionedKeyGenerator` and why the write operation is bulk_insert, are there any parquets generated for the first commit?
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "vishal-genea (via GitHub)" <gi...@apache.org>.
vishal-genea commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2713125556
Yes, it has total 340 columns
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "vishal-genea (via GitHub)" <gi...@apache.org>.
vishal-genea commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2713776780
You mean since I have 340 fields that's why it is happening?
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "vishal-genea (via GitHub)" <gi...@apache.org>.
vishal-genea commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2713046141
After bucket index, this is the result

It tool 11 min to sink 15k records, and before this, I had deleted everything from S3, it was a fresh insert, still took huge amount of time. I have to sink 250k records every hour, so i this case it won't be feasible.
this is the updated config
```
" 'connector' = 'hudi'," +
" 'path' = '" + S3_PATH + "'," +
" 'table.type' = 'COPY_ON_WRITE'," +
" 'hoodie.table.name' = '" + HUDI_TABLE_NAME + "'," +
" 'hoodie.datasource.write.recordkey.field' = 'event_id'," +
" 'hoodie.datasource.write.partitionpath.field' = 'customer_uuid,year,month'," +
" 'hoodie.datasource.write.precombine.field' = 'time'," +
" 'hoodie.schema.on.read.enable' = 'true'," +
" 'hoodie.parquet.compression.codec' = 'snappy'," +
" 'hoodie.index.type' = 'BUCKET'," +
" 'hoodie.datasource.write.operation' = 'bulk_insert',"+
" 'write.tasks' = '8',"+
" 'hoodie.populate.meta.fields' = 'true',"+
" 'hoodie.table.keygenerator.class' = 'org.apache.hudi.keygen.NonpartitionedKeyGenerator',"+
" 'hoodie.metadata.enable' = 'false'"+
```
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2712964602
> compaction is very very slow, it is taking 4-5 hours to compact the data.
As expected because the table is not partitioned, each compaction is like a rewrite to the whole table.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "vishal-genea (via GitHub)" <gi...@apache.org>.
vishal-genea commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2712920754
Let me test it with bucket index. Meanwhile can you also suggest me, if I can use MOR here, because I first tried with MOR, but compaction is very very slow, it is taking 4-5 hours to compact the data.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2713121887
Does the table have large amount of columns then?
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "Marwen94 (via GitHub)" <gi...@apache.org>.
Marwen94 commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2714634720
this looks like a checkpointing issue also: https://github.com/apache/hudi/issues/12950
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "vishal-genea (via GitHub)" <gi...@apache.org>.
vishal-genea commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2714832303
Hi, I have seen that it is running for longer period of time and everytime checkpoints failure issue is happening. Tha's why it is keep on running. I checked the logs also, checkpoint is failing everytime.
I tried without checkpoint also, it did the sink within a minute. So yes, this is checkpoint failure issue
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2712141031
Can you stwitch to the bucket index and give it a try, the COW is slow partly because of the rewrite of files for each round of checkpoint.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "vishal-genea (via GitHub)" <gi...@apache.org>.
vishal-genea commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2712979645
Table is already partitioned by these fields
PARTITIONED BY (`customer_uuid`, `year`, `month`)
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "vishal-genea (via GitHub)" <gi...@apache.org>.
vishal-genea commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2716542681
I am running the process in streaming mode as you can see the Job Type in the image I have shared. I am fetching last one hour data from kafka, but to keep this checkpoint without any problem I am using streaming mode.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Flink COW upsert is too slow to sink the data to Hudi-S3 [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on issue #12951:
URL: https://github.com/apache/hudi/issues/12951#issuecomment-2716148425
Did you execute the job with streaming execution mode? I see the job was executed with batch mode. For batch mode, there is one-shot checkpoint when the job finishes, and you should config enough task slot so that all the tasks can be scheduled.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org