Skip to content
Snippets Groups Projects
Commit e9e1adc0 authored by Joseph K. Bradley's avatar Joseph K. Bradley Committed by Sean Owen
Browse files

[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.
parent 26d7af91
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ public class JavaStratifiedSamplingExample {
SparkConf conf = new SparkConf().setAppName("JavaStratifiedSamplingExample");
JavaSparkContext jsc = new JavaSparkContext(conf);
@SuppressWarnings("unchecked")
// $example on$
List<Tuple2<Integer, Character>> list = new ArrayList<>(
Arrays.<Tuple2<Integer, Character>>asList(
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment