Skip to content

Commit 76389c5

Browse files
Yuhao Yangmengxr
authored andcommitted
[SPARK-5234][ml]examples for ml don't have sparkContext.stop
JIRA issue: https://issues.apache.org/jira/browse/SPARK-5234 simply add the call. Author: Yuhao Yang <[email protected]> Closes #4044 from hhbyyh/addscStop and squashes the following commits: c1f75ac [Yuhao Yang] add SparkContext.stop to 3 ml examples
1 parent 2fd7f72 commit 76389c5

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

examples/src/main/scala/org/apache/spark/examples/ml/CrossValidatorExample.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,7 @@ object CrossValidatorExample {
106106
.foreach { case Row(id: Long, text: String, score: Double, prediction: Double) =>
107107
println("(" + id + ", " + text + ") --> score=" + score + ", prediction=" + prediction)
108108
}
109+
110+
sc.stop()
109111
}
110112
}

examples/src/main/scala/org/apache/spark/examples/ml/SimpleParamsExample.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,7 @@ object SimpleParamsExample {
9797
.foreach { case Row(features: Vector, label: Double, prob: Double, prediction: Double) =>
9898
println("(" + features + ", " + label + ") -> prob=" + prob + ", prediction=" + prediction)
9999
}
100+
101+
sc.stop()
100102
}
101103
}

examples/src/main/scala/org/apache/spark/examples/ml/SimpleTextClassificationPipeline.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,7 @@ object SimpleTextClassificationPipeline {
8585
.foreach { case Row(id: Long, text: String, score: Double, prediction: Double) =>
8686
println("(" + id + ", " + text + ") --> score=" + score + ", prediction=" + prediction)
8787
}
88+
89+
sc.stop()
8890
}
8991
}

0 commit comments

Comments
 (0)