spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giuseppe Ricci <>
Subject Calculate average from Spark stream
Date Mon, 10 May 2021 14:47:23 GMT
Hi, I'm new on Apache Spark.
I'm trying to read data from an Apache Kafka topic (I have a simulated
temperature sensor producer which sends data every 2 second) and I need
every 5 minutes to calculate the average temperature. Reading documentation
I understand I need to use windows but I'm not able to finalize my code.
Can some help me?
How can I launch batches every 5 minutes? My code works one time and
finishes. Why in the console I can't find any helpful information for
correct execution? See attached picture.

This is my code:

Thanks for your precious help.

PhD. Giuseppe Ricci

View raw message