Hudi Table Streaming Reads
Configurations
Parameter |
Description |
Recommended Value |
Mandatory |
---|---|---|---|
Connector |
Type of the table to be read |
hudi |
Yes |
Path |
Path for storing the table |
Set this parameter as needed. |
Yes |
table.type |
Hudi table type. Available values are as follows:
|
COPY_ON_WRITE |
Yes |
hoodie.datasource.write.recordkey.field |
Primary key of the table |
Set this parameter as needed. |
Yes |
write.precombine.field |
Data combination field. |
Set this parameter as needed. |
Yes |
read.tasks |
Read task parallelism. The default value is 4. |
4 |
No |
read.streaming.enabled |
Whether to enable incremental streaming read. The options are as follows:
|
true |
Yes |
read.streaming.start-commit |
|
- |
No |
hoodie.datasource.write.keygenerator.type |
Primary key generator type of the upstream table. The options are as follows:
|
COMPLEX |
No |
read.streaming.check-interval |
Check interval (in minutes) for detecting new upstream commits. Use the default value 1 when the traffic is heavy. |
5 |
No |
read.end-commit |
End commit time. The start and end commit time form a close interval. By default, the latest commit time is used. |
- |
No |
read.rate.limit |
Traffic limit (records per second) for streaming read Default value 0 indicates that there is no limit. The value is the total limit. Limit for each operator = read.rate.limit/read.tasks (number of read operators). |
- |
No |
changelog.enabled |
Whether to write Changelog messages. The options are as follows:
|
false |
No |
hoodie.datasource.write.hive_style_partitioning |
Whether to use Hive style partitioning. The options are as follows:
|
- |
No |
Development Suggestions
- Set proper consumption parameters to avoid the "File Not Found" error.
When the downstream consumes Hudi files too slowly, the upstream archives the Hudi files. As a result, the "File Not Found" error occurs.
Optimization suggestions:
- Improve the downstream read speed, for example, increase the number of read.tasks.
- Improve the data consumption speed, for example, increase the traffic limit.
- Increase the compaction period to prolong the retention period of log files.
- Set the traffic limit for streaming read when a Hudi table is used as the source table.
If streaming read traffic exceeds the maximum traffic of the system, job exceptions may occur. Set a streaming read limit that equals the peak value verified by the service pressure test.
- Run compaction on Hudi tables to prevent the long checkpointing of the Hudi Source operator.
If the Hudi Source operator takes long time for checkpointing, check whether the compaction of the Hudi table is normal. If compaction is not performed for a long time, the list performance deteriorates.
- When streaming read is enabled for Hudi MOR tables, enable log indexing to improve the Flink streaming read performance.
The read and write performance of Hudi MOR tables can be improved through log indexing. Add 'hoodie.log.index.enabled'='true' for Sink tables and Source tables.
- Impact of DDL changes on stream reading of Hudi tables
Adding columns using DDL has no impact on Hudi table reads. Other DDL changes (such as changing a column type and name, and deleting a column) affect Hudi table reads. Therefore, you need to stop the read jobs before changes are performed.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot