GitHub user ankuriitg opened a pull request: https://github.com/apache/spark/pull/22604
[SPARK-25586][MLlib][Core] Replace toString method with a summarize m⦠â¦ethod in GeneralizedLinearRegressionTrainingSummary ## What changes were proposed in this pull request? After the change in SPARK-25118, which enables spark-shell to run with default log level, test_glr_summary started failing with StackOverflow error. Cause: ClosureCleaner calls logDebug on various objects and when it is called for GeneralizedLinearRegressionTrainingSummary, it starts a spark job which runs into infinite loop and fails with the below exception. Fix: Remove toString method and move the existing logic to a new method "summarize". This follows the general guideline as other summary objects do not have a toString method as well. ## How was this patch tested? Ran the python "mllib" and scala/junit tests for this module You can merge this pull request into a Git repository by running: $ git pull https://github.com/ankuriitg/spark ankurgupta/SPARK-25586 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/22604.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #22604 ---- commit 8c162a74a06d74a8a60aade4bf6e8af5906a8fb7 Author: ankurgupta <ankur.gupta@...> Date: 2018-10-01T21:05:39Z [SPARK-25586][MLlib][Core] Replace toString method with a summarize method in GeneralizedLinearRegressionTrainingSummary After the change in SPARK-25118, which enables spark-shell to run with default log level, test_glr_summary started failing with StackOverflow error. Cause: ClosureCleaner calls logDebug on various objects and when it is called for GeneralizedLinearRegressionTrainingSummary, it starts a spark job which runs into infinite loop and fails with the below exception. Fix: Remove toString method and move the existing logic to a new method "summarize". This follows the general guideline as other summary objects do not have a toString method as well. Testing Done: Ran the python "mllib" and scala/junit tests for this module ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org