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

Spark preprocessor optimization #123

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

basavaraj29
Copy link
Collaborator

@basavaraj29 basavaraj29 commented Nov 7, 2022

  • removing id assignment for edges
  • using zipwithindex instead of repartition(1) and windowing
  • parititonBy([src_bucket, dst_bucket])

todo:

  • custom binary writer to eliminate intermediate csv

@basavaraj29 basavaraj29 requested a review from JasonMoho November 7, 2022 18:54
@shivaram
Copy link

shivaram commented Nov 7, 2022

This is great. Do we have any numbers on how much this improves pre-processing?

@basavaraj29
Copy link
Collaborator Author

on the freebase 86m dataset, the spark preprocessor earlier took ~70m. it now takes ~10m. i guess the id assignment for the edges (which we don't really need) was the major bottleneck. Also, earlier we were triggering a repartition(1) on both nodes and relations dataframes. Now, we have replaced that with spark's library fn zipWithIndex.

@thodrek
Copy link

thodrek commented Nov 7, 2022 via email

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

Successfully merging this pull request may close these issues.

3 participants