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

Break large PySpark unittests into smaller files

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Done
    • 2.4.0
    • None
    • PySpark
    • None

    Description

      We've got a ton of tests in one humongous tests.py file, rather than breaking it out into smaller files.

      Having one huge file doesn't seem great for code organization, and it also makes the test parallelization in run-tests.py not work as well. On my laptop, tests.py takes 150s, and the next longest test file takes only 20s. There are similarly large files in other pyspark modules, eg. sql/tests.py, ml/tests.py, mllib/tests.py, streaming/tests.py.

      It seems that at least for some of these files, its already broken into independent test classes, so it shouldn't be too hard to just move them into their own files.

      We could pick up one example and follow. The current style looks closer to NumPy structure and looks easier to follow.

      Attachments

        Issue Links

          Activity

            People

              gurwls223 Hyukjin Kwon
              irashid Imran Rashid
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: