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

maxEventsPerTrigger is not working #677

Open
thetruelam opened this issue Jun 14, 2023 · 0 comments
Open

maxEventsPerTrigger is not working #677

thetruelam opened this issue Jun 14, 2023 · 0 comments

Comments

@thetruelam
Copy link

thetruelam commented Jun 14, 2023

Bug Report:

  • Actual behavior

I'm trying to use maxEventsPerTrigger config in pyspark but it doesn't work
this is how I set the config

`connection_string = dbutils.secrets.get(scope="edpprodseakv-dbwscope", key=config['connection_string'])
ehConf = {'eventhubs.connectionString' : sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt(connection_string)}

startTime = None # current_date - 7 days
endTime = None # current_date

startingEventPosition = {
"offset": 0,
"seqNo": -1,
"enqueuedTime": startTime,
"isInclusive": True
}

endingEventPosition = {
"offset": None,
"seqNo": -1,
"enqueuedTime": endTime,
"isInclusive": True
}

ehConf["eventhubs.startingPosition"] = json.dumps(startingEventPosition)
ehConf["eventhubs.endingPosition"] = json.dumps(endingEventPosition)
ehConf["maxEventsPerTrigger"] = 200000`

This is how I call the read stream function
df = spark.readStream.format("eventhubs").options(**ehConf).load()

But the streaming jobs seem to ignore the config
image

  • Expected behavior
    I expect the maximum of events in each microbatch to be 200000.

  • Spark version
    Databricks Runtime Version: 10.4 LTS (includes Apache Spark 3.2.1, Scala 2.12)
    Spark 2.12

  • spark-eventhubs artifactId and version
    com.microsoft.azure:azure-eventhubs-spark_2.12:2.3.21

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

1 participant