Skip to content
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

Error: java.lang.IllegalArgumentException: requirement failed: partitions(13).partition == 14, but it should equal 13 #569

Closed
tilumi opened this issue Nov 24, 2020 · 1 comment
Assignees

Comments

@tilumi
Copy link
Contributor

tilumi commented Nov 24, 2020

Bug: If some partition doesn't have the data requested, will throw
``
Caused by: java.lang.IllegalArgumentException: requirement failed: partitions(13).partition == 14, but it should equal 13
at scala.Predef$.require(Predef.scala:224)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2$$anonfun$apply$3.apply(RDD.scala:255)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2$$anonfun$apply$3.apply(RDD.scala:254)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:254)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)

Root Cause:
The lib filter out no-data partitions, so the number of partitions doesn't match the one in checkpoint
https://github.com/Azure/azure-event-hubs-spark/blob/f0098d8c925efbd8b8fc6e33d0bf8e88b5cd5fbb/core/src/main/scala/org/apache/spark/sql/eventhubs/EventHubsSource.scala#L402

Solution:
Should return offset range(0,0) instead of filtering out
@nyaghma
Copy link
Contributor

nyaghma commented Jun 23, 2021

This issue has been fixed in PR #584.

@nyaghma nyaghma closed this as completed Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants