QuestionQ233

VerifiedTroubleshooting and Tuning Apache Spark DataFrame API Applications.

A Spark application contains a 128 GB DataFrame A and a 1 GB DataFrame B. If a broadcast join is performed between these two DataFrames, which option correctly identifies the DataFrame that should be broadcast and explains why?

Explanation

A broadcast join distributes the small build-side DataFrame to executors, so the large DataFrame can be joined without shuffling it across the cluster. Broadcasting the 1 GB DataFrame B therefore avoids shuffling the 128 GB DataFrame A. Spark documentation also describes the broadcast-hinted relation as the join build side and selects the smaller side when both sides are broadcast-hinted.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!