You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2014/01/21 19:50:02 UTC
[3/3] git commit: Merge pull request #469 from
ajtulloch/use-local-spark-context-in-tests-for-mllib
Merge pull request #469 from ajtulloch/use-local-spark-context-in-tests-for-mllib
[MLlib] Use a LocalSparkContext trait in test suites
Replaces the 9 instances of
```scala
class XXXSuite extends FunSuite with BeforeAndAfterAll {
@transient private var sc: SparkContext = _
override def beforeAll() {
sc = new SparkContext("local", "test")
}
override def afterAll() {
sc.stop()
System.clearProperty("spark.driver.port")
}
```
with
```scala
class XXXSuite extends FunSuite with LocalSparkContext {
```
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/f8544981
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/f8544981
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/f8544981
Branch: refs/heads/master
Commit: f8544981a6d05687fa950639cb1eb3c31e9b6bf5
Parents: 77b986f 3a067b4
Author: Reynold Xin <rx...@apache.org>
Authored: Tue Jan 21 10:49:54 2014 -0800
Committer: Reynold Xin <rx...@apache.org>
Committed: Tue Jan 21 10:49:54 2014 -0800
----------------------------------------------------------------------
.../LogisticRegressionSuite.scala | 15 ++-----------
.../mllib/classification/NaiveBayesSuite.scala | 14 ++----------
.../spark/mllib/classification/SVMSuite.scala | 15 +++----------
.../spark/mllib/clustering/KMeansSuite.scala | 15 ++-----------
.../optimization/GradientDescentSuite.scala | 13 ++---------
.../spark/mllib/recommendation/ALSSuite.scala | 16 +++-----------
.../spark/mllib/regression/LassoSuite.scala | 16 ++------------
.../regression/LinearRegressionSuite.scala | 15 ++-----------
.../mllib/regression/RidgeRegressionSuite.scala | 14 ++----------
.../spark/mllib/util/LocalSparkContext.scala | 23 ++++++++++++++++++++
10 files changed, 43 insertions(+), 113 deletions(-)
----------------------------------------------------------------------