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

Speedup stats processing in Spark cluster #2871

Merged
merged 4 commits into from
May 28, 2024
Merged

Speedup stats processing in Spark cluster #2871

merged 4 commits into from
May 28, 2024

Conversation

amCap1712
Copy link
Member

  1. Write a copy of the listens to HDFS on import of a full dump, this makes speeds up filtering of listens and increases the speed of processing in many cases.
  2. Remove Pydantic validation in places where it seemed redundant or of not much use.

Before this PR, an entire stats run took about 9 hours. With step 2, it went down to 6.25 hours and then with step 1 on top of it, it goes down to 5.75 hours.

Write a copy of the listens to HDFS on import of a full dump, this makes
speeds up filtering of listens and increases the speed of processing in many cases.
@amCap1712 amCap1712 requested a review from mayhem May 26, 2024 20:16
@amCap1712 amCap1712 marked this pull request as ready for review May 26, 2024 20:16
Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great speedup!

listenbrainz_spark/stats/user/entity.py Show resolved Hide resolved
@amCap1712 amCap1712 merged commit ec77f69 into master May 28, 2024
4 checks passed
@amCap1712 amCap1712 deleted the spark-speedup branch May 28, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants