We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e877415 commit f91e55eCopy full SHA for f91e55e
examples/src/main/scala/org/apache/spark/examples/SparkPi.scala
@@ -31,7 +31,7 @@ object SparkPi {
31
.getOrCreate()
32
val slices = if (args.length > 0) args(0).toInt else 2
33
val n = math.min(100000L * slices, Int.MaxValue).toInt // avoid overflow
34
- val count = spark.sparkContext.parallelize(1 until n, slices).map { i =>
+ val count = spark.sparkContext.parallelize(1 to n, slices).map { i =>
35
val x = random * 2 - 1
36
val y = random * 2 - 1
37
if (x*x + y*y < 1) 1 else 0
0 commit comments