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

    https://github.com/apache/spark/pull/3255#discussion_r20368339
  
    --- Diff: python/pyspark/context.py ---
    @@ -191,7 +192,13 @@ def _do_init(self, master, appName, sparkHome, 
pyFiles, environment, batchSize,
             self._temp_dir = \
                 
self._jvm.org.apache.spark.util.Utils.createTempDir(local_dir).getAbsolutePath()
     
    +
             # profiling stats collected for each PythonRDD
    +        if self._conf.get("spark.python.profile", "false") == "true":
    +            self.profiler = profiler if profiler else BasicProfiler
    +        else:
    +            self.profiler = None
    +
             self._profile_stats = []
    --- End diff --
    
    @davies I refactored like you suggested and it makes the API a lot simpler. 
I didn't get rid of this since I think that the context makes sense as a place 
to hold all of the profiles for the computation.


---
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