Uh oh!
There was an error while loading. Please reload this page.
Added description to python spark Pi example - #19632
Conversation
| .getOrCreate() | ||
| # If no arguments are passed(i.e. `len(sys.argv) < = 1` ) |
There was a problem hiding this comment.
This isn't visible to end users, so don't know if this matters. It's already documented in the usage. I am not sure this meaningfully helps.
There was a problem hiding this comment.
So I think we should expect folks to read the examples in addition to running them. That being said I don't think we need this comment specifically.
There was a problem hiding this comment.
This is actually the first example on the spark doc and I wanted to know how the pi calculation was done. There was no mention of what algorithm is used for it, so took me a while to figure out the Monte-Carlo estimator was used and the logic is randomly generating over 100000 points to finally estimate the Pi value.
holdenk
commented
Nov 2, 2017
Thanks for helping out with the Spark project, it's great to see folks looking to improve the examples :) I'm not sure the in-line comment adds much, but the docstring one looks like a good minor improvement :) |
SparkQA
commented
Nov 2, 2017
Test build #3975 has finished for PR 19632 at commit
|
Description added for SparkPi example
srowen
left a comment
There was a problem hiding this comment.
Sorry, this still has several problems and doesn't add much. Close it please
| """ | ||
| Usage: pi [partitions] | ||
| Monte Carlo method is used to estimate Pi in the below example. |
| .appName("PythonPi")\ | ||
| .getOrCreate() | ||
| # If no arguments are passed(i.e. `len(sys.argv) < = 1` ) |
There was a problem hiding this comment.
Missing space after passed, problem in "< ="
This comment just restates the code below.
Closesapache#11494Closesapache#14158Closesapache#16803Closesapache#16864Closesapache#17455Closesapache#17936Closesapache#19377 Added: Closesapache#19380Closesapache#18642Closesapache#18377Closesapache#19632 Added: Closesapache#14471Closesapache#17402Closesapache#17953Closesapache#18607 Also cc srowen vanzin HyukjinKwon gatorsmile cloud-fan to see if you have other PRs to close. Author: Xingbo Jiang <xingbo.jiang@databricks.com> Closesapache#19669 from jiangxb1987/stale-prs.
What changes were proposed in this pull request?
Description added to better understand example.
How was this patch tested?
Not required as only comments are required.
Please review http://spark.apache.org/contributing.html before opening a pull request.