Skip to content

Commit

Permalink
Set spark.executor.uri from environment variable (needed by Mesos)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwick committed Apr 3, 2014
1 parent 47ebea5 commit da0c3e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/pyspark/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
# this is the equivalent of ADD_JARS
add_files = os.environ.get("ADD_FILES").split(',') if os.environ.get("ADD_FILES") != None else None

if os.environ.get("SPARK_EXECUTOR_URI"):
SparkContext.setSystemProperty("spark.executor.uri", os.environ["SPARK_EXECUTOR_URI"])

sc = SparkContext(os.environ.get("MASTER", "local"), "PySparkShell", pyFiles=add_files)

print """Welcome to
Expand Down

0 comments on commit da0c3e4

Please sign in to comment.