Github user BryanCutler commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14959#discussion_r80567211
  
    --- Diff: python/pyspark/conf.py ---
    @@ -118,28 +130,28 @@ def setIfMissing(self, key, value):
     
         def setMaster(self, value):
             """Set master URL to connect to."""
    -        self._jconf.setMaster(value)
    +        self.set("spark.master", value)
             return self
     
         def setAppName(self, value):
             """Set application name."""
    -        self._jconf.setAppName(value)
    +        self.set("spark.app.name", value)
             return self
     
         def setSparkHome(self, value):
             """Set path where Spark is installed on worker nodes."""
    -        self._jconf.setSparkHome(value)
    +        self.set("spark.home", value)
             return self
     
         def setExecutorEnv(self, key=None, value=None, pairs=None):
             """Set an environment variable to be passed to executors."""
             if (key is not None and pairs is not None) or (key is None and 
pairs is None):
                 raise Exception("Either pass one key-value pair or a list of 
pairs")
             elif key is not None:
    -            self._jconf.setExecutorEnv(key, value)
    +            self.set("spark.executorEnv." + key, value)
    --- End diff --
    
    since you duplicated the property prefix "spark.executorEnv." from the 
Scala file, it might be good to make a unit test that ensures calling 
`setExecutorEnv` in both Python and Scala/Java actually sets a property with 
the same prefix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to