зеркало из https://github.com/microsoft/spark.git
Add System.exit(0) at the end of all the example programs.
This commit is contained in:
Родитель
1dd7d3dfff
Коммит
28fed4ce3b
|
@ -21,5 +21,7 @@ object BroadcastTest {
|
|||
spark.parallelize(1 to 10, slices).foreach {
|
||||
i => println(barr1.value.size)
|
||||
}
|
||||
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,5 +14,7 @@ object ExceptionHandlingTest {
|
|||
if (Math.random > 0.75)
|
||||
throw new Exception("Testing exception handling")
|
||||
}
|
||||
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,8 @@ object GroupByTest {
|
|||
pairs1.count
|
||||
|
||||
println(pairs1.groupByKey(numReducers).count)
|
||||
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,5 +14,6 @@ object HdfsTest {
|
|||
val end = System.currentTimeMillis()
|
||||
println("Iteration " + iter + " took " + (end-start) + " ms")
|
||||
}
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,5 +26,7 @@ object MultiBroadcastTest {
|
|||
spark.parallelize(1 to 10, slices).foreach {
|
||||
i => println(barr1.value.size + barr2.value.size)
|
||||
}
|
||||
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,8 @@ object SimpleSkewedGroupByTest {
|
|||
//println("RESULT: " + pairs1.groupByKey(numReducers)
|
||||
// .map{case (k,v) => (k, v.size)}
|
||||
// .collectAsMap)
|
||||
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ object SkewedGroupByTest {
|
|||
pairs1.count
|
||||
|
||||
println(pairs1.groupByKey(numReducers).count)
|
||||
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -137,5 +137,7 @@ object SparkALS {
|
|||
println("RMSE = " + rmse(R, ms, us))
|
||||
println()
|
||||
}
|
||||
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,5 +47,6 @@ object SparkHdfsLR {
|
|||
}
|
||||
|
||||
println("Final w: " + w)
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,5 +69,6 @@ object SparkKMeans {
|
|||
}
|
||||
|
||||
println("Final centers: " + kPoints)
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,5 +45,6 @@ object SparkLR {
|
|||
}
|
||||
|
||||
println("Final w: " + w)
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,5 +19,6 @@ object SparkPi {
|
|||
if (x*x + y*y < 1) 1 else 0
|
||||
}.reduce(_ + _)
|
||||
println("Pi is roughly " + 4.0 * count / n)
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче