- Done:
- Copied the repo to the cluster (
~/Calendar-Effects), created a test topiccalendar-effects-master-mahad-test, and replayed all 27,654clean/master.parquetmessages into the course Kafka withreplay_master.py(8 s). - Ran
src/streaming/job.py --source kafkaon YARN (Spark 3.5.8, Scala 2.13, Java 17), 110 messages per micro-batch, output to HDFScalendar-effects-test/. It finished in 252 micro-batches; the watermark dropped 0 rows. - The run used its own topic because
calendar-effects-masteris the team’s topic: the late-data test (#7) reads it from the start, and 27,654 extra messages would have doubled its input. - Fixed the cluster command in
src/streaming/job.py’s docstring. The earlier one (also indocs/handoffs/2026-11-17-mahad-kafka-test.md) failed with “Failed to find data source: kafka”.
- Copied the repo to the cluster (
- Results (HDFS output copied back with
hdfs dfs -get):scripts/check_streaming.py: 25,050 daily rows and 600 event CARs match the direct computation (largest difference 1.7e-16).scripts/compare_stream_batch.py: 600 of 600 windows match Areej’s answer key, and no window is missing.- pyarrow 25 on the cluster did not break
applyInPandasWithStateon Spark 3.5; the<21pin is only needed for PySpark 4.0 on a laptop.
- Decisions: none.
- Contracts: no change.
- How to run it on the cluster (log in with
ssh cluster.cs.sfu.ca, port 24 in~/.ssh/config; the cluster’spython3has kafka-python but no pyspark, so the job must go throughspark-submit):spark-submitstarts Spark before the script runs, so the Kafka connector must be on its command line.--outand--checkpointare HDFS paths. Clear them withhdfs dfs -rm -rbefore a rerun;--freshonly clears local folders.- Run long jobs inside
tmux(or withnohup), so a dropped VPN or SSH connection doesn’t stop them.
- Next:
- Pick the alerts for the demo video.
- Demo video (Nov 23 onward).
- Blocked on / needs from others:
- Sanchi (#7): run the late-data test on the cluster with the commands above, using
calendar-effects-master, and add--late-fraction 0.02to the replay. Then check withcheck_streaming.pyandcompare_stream_batch.py --stream <copied folder>. - Anushiya:
run_everything.sh --kafkastarts the job withpython3, which works on a laptop but not on the cluster (no pyspark there). Usespark-submit --packages ...when it runs on the cluster. - Clean-up: the test topic
calendar-effects-master-mahad-testand HDFScalendar-effects-test/can be deleted. Kafka’s retention will also expire the topic.
- Sanchi (#7): run the late-data test on the cluster with the commands above, using
Handoffs, newest first