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

EMR Cluster using Pyspark #1

Closed
bharaniabhishek123 opened this issue Jul 19, 2021 · 1 comment
Closed

EMR Cluster using Pyspark #1

bharaniabhishek123 opened this issue Jul 19, 2021 · 1 comment

Comments

@bharaniabhishek123
Copy link

Can we use the external jar on EMR Cluster and call write method using pyspark ?

@simranjeet97
Copy link

Can we use the external jar on EMR Cluster and call write method using pyspark ?

2 ways ----

  1. Add path in spark-submit of jar files
    ./bin/spark-submit --jars jarfile.jar spark_script.py
    or set the enviroment variable SPARK_CLASSPATH

  2. add path in the classpath
    SPARK_CLASSPATH='/path/jarfile.jar:/path/jarfile.jar' spark_script.py

or else
after spark session
spark.sparkContext.addPyFile("/path/to/jar/jarfile.jar")

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

No branches or pull requests

3 participants