diff options
author | Sean Owen <sowen@cloudera.com> | 2016-05-29 16:48:14 -0500 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-05-29 16:48:14 -0500 |
commit | ce1572d16f03d383071bcc1f30ede551e8ded49f (patch) | |
tree | 3d04d27d440489891add463f17ca37175ba2334a /mllib/src/test | |
parent | 472f16181d199684996a156b0e429bc525d65a57 (diff) | |
download | spark-ce1572d16f03d383071bcc1f30ede551e8ded49f.tar.gz spark-ce1572d16f03d383071bcc1f30ede551e8ded49f.tar.bz2 spark-ce1572d16f03d383071bcc1f30ede551e8ded49f.zip |
[MINOR] Resolve a number of miscellaneous build warnings
## What changes were proposed in this pull request?
This change resolves a number of build warnings that have accumulated, before 2.x. It does not address a large number of deprecation warnings, especially related to the Accumulator API. That will happen separately.
## How was this patch tested?
Jenkins
Author: Sean Owen <sowen@cloudera.com>
Closes #13377 from srowen/BuildWarnings.
Diffstat (limited to 'mllib/src/test')
-rw-r--r-- | mllib/src/test/java/org/apache/spark/mllib/fpm/JavaPrefixSpanSuite.java | 4 | ||||
-rw-r--r-- | mllib/src/test/scala/org/apache/spark/mllib/fpm/PrefixSpanSuite.scala | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/mllib/src/test/java/org/apache/spark/mllib/fpm/JavaPrefixSpanSuite.java b/mllib/src/test/java/org/apache/spark/mllib/fpm/JavaPrefixSpanSuite.java index 75b0ec6480..32d3141149 100644 --- a/mllib/src/test/java/org/apache/spark/mllib/fpm/JavaPrefixSpanSuite.java +++ b/mllib/src/test/java/org/apache/spark/mllib/fpm/JavaPrefixSpanSuite.java @@ -72,7 +72,9 @@ public class JavaPrefixSpanSuite extends SharedSparkSession { try { model.save(spark.sparkContext(), outputPath); - PrefixSpanModel newModel = PrefixSpanModel.load(spark.sparkContext(), outputPath); + @SuppressWarnings("unchecked") + PrefixSpanModel<Integer> newModel = + (PrefixSpanModel<Integer>) PrefixSpanModel.load(spark.sparkContext(), outputPath); JavaRDD<FreqSequence<Integer>> freqSeqs = newModel.freqSequences().toJavaRDD(); List<FreqSequence<Integer>> localFreqSeqs = freqSeqs.collect(); Assert.assertEquals(5, localFreqSeqs.size()); diff --git a/mllib/src/test/scala/org/apache/spark/mllib/fpm/PrefixSpanSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/fpm/PrefixSpanSuite.scala index 6d8c7b47d8..4c2376376d 100644 --- a/mllib/src/test/scala/org/apache/spark/mllib/fpm/PrefixSpanSuite.scala +++ b/mllib/src/test/scala/org/apache/spark/mllib/fpm/PrefixSpanSuite.scala @@ -16,6 +16,8 @@ */ package org.apache.spark.mllib.fpm +import scala.language.existentials + import org.apache.spark.SparkFunSuite import org.apache.spark.mllib.util.MLlibTestSparkContext import org.apache.spark.util.Utils |