diff options
author | Yuhao Yang <yuhao@yuhaodevbox.sh.intel.com> | 2015-01-14 11:53:43 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-01-14 11:53:43 -0800 |
commit | 76389c5b99183e456ff85fd92ea68d95c4c13e82 (patch) | |
tree | 428b5b4425e883d049be38039308c55bb578ff2f /examples/src | |
parent | 2fd7f72b6b0b24bec12331c7bbbcf6bfc265d2ec (diff) | |
download | spark-76389c5b99183e456ff85fd92ea68d95c4c13e82.tar.gz spark-76389c5b99183e456ff85fd92ea68d95c4c13e82.tar.bz2 spark-76389c5b99183e456ff85fd92ea68d95c4c13e82.zip |
[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 <yuhao@yuhaodevbox.sh.intel.com>
Closes #4044 from hhbyyh/addscStop and squashes the following commits:
c1f75ac [Yuhao Yang] add SparkContext.stop to 3 ml examples
Diffstat (limited to 'examples/src')
3 files changed, 6 insertions, 0 deletions
diff --git a/examples/src/main/scala/org/apache/spark/examples/ml/CrossValidatorExample.scala b/examples/src/main/scala/org/apache/spark/examples/ml/CrossValidatorExample.scala index ce6bc066bd..d8c7ef38ee 100644 --- a/examples/src/main/scala/org/apache/spark/examples/ml/CrossValidatorExample.scala +++ b/examples/src/main/scala/org/apache/spark/examples/ml/CrossValidatorExample.scala @@ -106,5 +106,7 @@ object CrossValidatorExample { .foreach { case Row(id: Long, text: String, score: Double, prediction: Double) => println("(" + id + ", " + text + ") --> score=" + score + ", prediction=" + prediction) } + + sc.stop() } } diff --git a/examples/src/main/scala/org/apache/spark/examples/ml/SimpleParamsExample.scala b/examples/src/main/scala/org/apache/spark/examples/ml/SimpleParamsExample.scala index 44d5b084c2..e8a2adff92 100644 --- a/examples/src/main/scala/org/apache/spark/examples/ml/SimpleParamsExample.scala +++ b/examples/src/main/scala/org/apache/spark/examples/ml/SimpleParamsExample.scala @@ -97,5 +97,7 @@ object SimpleParamsExample { .foreach { case Row(features: Vector, label: Double, prob: Double, prediction: Double) => println("(" + features + ", " + label + ") -> prob=" + prob + ", prediction=" + prediction) } + + sc.stop() } } diff --git a/examples/src/main/scala/org/apache/spark/examples/ml/SimpleTextClassificationPipeline.scala b/examples/src/main/scala/org/apache/spark/examples/ml/SimpleTextClassificationPipeline.scala index 92895a05e4..b9a6ef0229 100644 --- a/examples/src/main/scala/org/apache/spark/examples/ml/SimpleTextClassificationPipeline.scala +++ b/examples/src/main/scala/org/apache/spark/examples/ml/SimpleTextClassificationPipeline.scala @@ -85,5 +85,7 @@ object SimpleTextClassificationPipeline { .foreach { case Row(id: Long, text: String, score: Double, prediction: Double) => println("(" + id + ", " + text + ") --> score=" + score + ", prediction=" + prediction) } + + sc.stop() } } |