Skip to content

Commit

Permalink
reducing noise of spark client
Browse files Browse the repository at this point in the history
  • Loading branch information
wresch committed May 19, 2022
1 parent c044c3c commit 87fb68f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pi.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def in_circle(_):
"""

sc = SparkContext(appName="PythonPi")
sc.setLogLevel('WARN')
n = 1000000000
count = sc.parallelize(xrange(1, n + 1)).filter(in_circle).count()
print("PI=%.12f" % (4.0 * count / n))
Expand Down

0 comments on commit 87fb68f

Please sign in to comment.