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

docs: Update Spark shell command to include setting additional class path #435

Merged
merged 1 commit into from
May 15, 2024

Conversation

andygrove
Copy link
Member

Which issue does this PR close?

Closes #182

Rationale for this change

We need to specify additional options when launching Spark shell to avoid ClassNotFoundException

What changes are included in this PR?

How are these changes tested?

$SPARK_HOME/bin/spark-shell \
--jars spark/target/comet-spark-spark3.4_2.12-0.1.0-SNAPSHOT.jar \
--jars $COMET_JAR \
--conf spark.driver.extraClassPath=$COMET_JAR \
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need extraClassPath? --jars adds to both driver and executor

https://spark.apache.org/docs/latest/configuration.html
spark.jars Comma-separated list of jars to include on the driver and executor classpaths. Globs are allowed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we need to specify extraClassPath to resolve the ClassNotFoundException issues described in #182. This is specific to spark-shell and not needed for spark-submit.

Copy link
Member

Choose a reason for hiding this comment

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

It seems some difference on handling extra classpaths on the driver and the executors between spark-submit and spark-shell.

@andygrove andygrove merged commit 5e05626 into apache:main May 15, 2024
1 check passed
@andygrove andygrove deleted the spark-shell-command branch May 15, 2024 19:22
himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants