Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22043

Python profile, show_profiles() and dump_profiles(), should throw an error with a better message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.3.0
    • 2.1.2, 2.2.1, 2.3.0
    • PySpark
    • None

    Description

      I mistakenly missed spark.python.profile enabled today while profiling and met this unfriendly messages:

      >>> sc.show_profiles()
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File ".../spark/python/pyspark/context.py", line 1000, in show_profiles
          self.profiler_collector.show_profiles()
      AttributeError: 'NoneType' object has no attribute 'show_profiles'
      >>> sc.dump_profiles("/tmp/abc")
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File ".../spark/python/pyspark/context.py", line 1005, in dump_profiles
          self.profiler_collector.dump_profiles(path)
      AttributeError: 'NoneType' object has no attribute 'dump_profiles'
      

      It looks we should give better information that says spark.python.profile should be enabled.

      Attachments

        Activity

          People

            gurwls223 Hyukjin Kwon
            gurwls223 Hyukjin Kwon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: