-
Notifications
You must be signed in to change notification settings - Fork 113
Add a parameter that controls the number of StreamLoad tasks committed per partition #92 #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
3a1aed9
9b0efff
8e87ed2
4538a43
84dbb2c
9291a2e
53525c2
83fdd53
734ef75
6e1f6bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,6 +65,7 @@ private[sql] class DorisSourceProvider extends DataSourceRegister | |
| val maxRetryTimes = sparkSettings.getIntegerProperty(ConfigurationOptions.DORIS_SINK_MAX_RETRIES, ConfigurationOptions.SINK_MAX_RETRIES_DEFAULT) | ||
| val sinkTaskPartitionSize = sparkSettings.getIntegerProperty(ConfigurationOptions.DORIS_SINK_TASK_PARTITION_SIZE) | ||
| val sinkTaskUseRepartition = sparkSettings.getProperty(ConfigurationOptions.DORIS_SINK_TASK_USE_REPARTITION, ConfigurationOptions.DORIS_SINK_TASK_USE_REPARTITION_DEFAULT.toString).toBoolean | ||
| val partitionTaskAtomicity = settings.getProperty(ConfigurationOptions.DORIS_SINK_PER_PARTITION_TASK_ATOMICITY, ConfigurationOptions.DORIS_SINK_PER_PARTITION_TASK_ATOMICITY_DEFAULT.toString).toBoolean | ||
|
|
||
| logger.info(s"maxRowCount ${maxRowCount}") | ||
| logger.info(s"maxRetryTimes ${maxRetryTimes}") | ||
|
|
@@ -83,10 +84,11 @@ private[sql] class DorisSourceProvider extends DataSourceRegister | |
| line.add(field.asInstanceOf[AnyRef]) | ||
| } | ||
| rowsBuffer.add(line) | ||
| if (rowsBuffer.size > maxRowCount) { | ||
| if (!partitionTaskAtomicity && rowsBuffer.size > maxRowCount) { | ||
| flush | ||
| } | ||
| }) | ||
| flush | ||
|
||
| // flush buffer | ||
| if (!rowsBuffer.isEmpty) { | ||
| flush | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
english comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will change it to English.