apache/spark — pull request #2874 by SaintBacchus (2014-10-21 09:27:30+00:00)
Title: [SPARK-4033][Examples]Input of the SparkPi  too big causes the emption exception

If input of the SparkPi args is larger than the 25000, the integer 'n' inside the code will be overflow, and may be a negative number.
And it causes the (0 until n) Seq as an empty seq, then doing the action 'reduce' will throw the UnsupportedOperationException("empty collection").

The max size of the input of sc.parallelize is Int.MaxValue - 1, not the Int.MaxValue.