Skip to content

[SPARK-33274][SS] Stop query in cp mode when total cores less than total kafka partition#35500

Closed
warrenzhu25 wants to merge 1 commit intoapache:masterfrom
warrenzhu25:33274
Closed

[SPARK-33274][SS] Stop query in cp mode when total cores less than total kafka partition#35500
warrenzhu25 wants to merge 1 commit intoapache:masterfrom
warrenzhu25:33274

Conversation

@warrenzhu25
Copy link
Contributor

What changes were proposed in this pull request?

Add check for total executor cores when SetReaderPartitions message received.

Why are the changes needed?

In continuous processing mode, EpochCoordinator won't add offsets to query until got ReportPartitionOffset from all partitions. Normally, each kafka topic partition will be handled by one core, if total cores is smaller than total kafka topic partition counts, the job will hang without any error message.

Does this PR introduce any user-facing change?

Yes, if total executor cores is smaller than total kafka partition count, the exception with below error will be thrown:
Total %s (kafka partitions) * %s (cpus per task) = %s needed, but only have %s (executors) * %s (cores per executor) = %s (total cores). Please increase total number of executor cores to at least %s.

How was this patch tested?

Added test in EpochCoordinatorSuite

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments