diff options
author | Joseph K. Bradley <joseph@databricks.com> | 2016-04-12 03:24:26 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-04-12 03:24:26 +0100 |
commit | e9e1adc036643c6b126237903b8e79ab379b1d32 (patch) | |
tree | 1f39bf9c055f60e6cb385b95171b6a188ae2abbc /mllib | |
parent | 26d7af9119a73d851c86314b4a207c0bfe437082 (diff) | |
download | spark-e9e1adc036643c6b126237903b8e79ab379b1d32.tar.gz spark-e9e1adc036643c6b126237903b8e79ab379b1d32.tar.bz2 spark-e9e1adc036643c6b126237903b8e79ab379b1d32.zip |
[MINOR][ML] Fixed MLlib build warnings
## What changes were proposed in this pull request?
Fixes to eliminate warnings during package and doc builds.
## How was this patch tested?
Existing unit tests
Author: Joseph K. Bradley <joseph@databricks.com>
Closes #12263 from jkbradley/warning-cleanups.
Diffstat (limited to 'mllib')
-rw-r--r-- | mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala b/mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala index e64551f03c..cd402b1e1f 100644 --- a/mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala +++ b/mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala @@ -327,7 +327,9 @@ class RandomForestSuite extends SparkFunSuite with MLlibTestSparkContext { case n: InternalNode => n.split match { case s: CategoricalSplit => assert(s.leftCategories === Array(1.0)) + case _ => throw new AssertionError("model.rootNode.split was not a CategoricalSplit") } + case _ => throw new AssertionError("model.rootNode was not an InternalNode") } } @@ -352,6 +354,7 @@ class RandomForestSuite extends SparkFunSuite with MLlibTestSparkContext { assert(n.leftChild.isInstanceOf[InternalNode]) assert(n.rightChild.isInstanceOf[InternalNode]) Array(n.leftChild.asInstanceOf[InternalNode], n.rightChild.asInstanceOf[InternalNode]) + case _ => throw new AssertionError("rootNode was not an InternalNode") } // Single group second level tree construction. |