Skip to content

Commit

Permalink
Revert changes in python
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewor14 committed Aug 2, 2014
1 parent 1c2532c commit f71f391
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/pyspark/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
u'local'
>>> sc.appName
u'My app'
>>> sc.sparkHome is not None
>>> sc.sparkHome is None
True
>>> conf = SparkConf(loadDefaults=False)
Expand Down
4 changes: 3 additions & 1 deletion python/pyspark/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def _do_init(self, master, appName, sparkHome, pyFiles, environment, batchSize,
self._conf.setMaster(master)
if appName:
self._conf.setAppName(appName)
if sparkHome:
self._conf.setSparkHome(sparkHome)
if environment:
for key, value in environment.iteritems():
self._conf.setExecutorEnv(key, value)
Expand All @@ -142,7 +144,7 @@ def _do_init(self, master, appName, sparkHome, pyFiles, environment, batchSize,
# the classpath or an external config file
self.master = self._conf.get("spark.master")
self.appName = self._conf.get("spark.app.name")
self.sparkHome = os.environ.get("SPARK_HOME")
self.sparkHome = self._conf.get("spark.home", None)
for (k, v) in self._conf.getAll():
if k.startswith("spark.executorEnv."):
varName = k[len("spark.executorEnv."):]
Expand Down

0 comments on commit f71f391

Please sign in to comment.