Skip to content

Commit

Permalink
fix driver classpath issue in init_spark_on_local (intel-analytics#2530)
Browse files Browse the repository at this point in the history
* fix driver path

* move set submit opt to init_spark_conf

* update

* fix style
  • Loading branch information
jenniew committed Jul 3, 2020
1 parent 8627a97 commit 65e8a26
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/dllib/src/bigdl/dllib/utils/nncontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,11 @@ def init_spark_conf(conf=None):
# Set bigDL and TF conf

spark_conf.setAll(zoo_conf.items())

if os.environ.get("BIGDL_JARS", None) and not is_spark_below_2_2():
for jar in os.environ["BIGDL_JARS"].split(":"):
extend_spark_driver_cp(spark_conf, jar)
submit_args = " --driver-class-path " + os.environ["BIGDL_JARS"] + " pyspark-shell "
print("pyspark_submit_args is: {}".format(submit_args))
os.environ['PYSPARK_SUBMIT_ARGS'] = submit_args

# add content in PYSPARK_FILES in spark.submit.pyFiles
# This is a workaround for current Spark on k8s
Expand Down

0 comments on commit 65e8a26

Please sign in to comment.