Skip to content

Commit ad8c42f

Browse files
committed
add a test for SPARK-6660
1 parent 2275acc commit ad8c42f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

python/pyspark/mllib/tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
else:
3737
import unittest
3838

39+
from pyspark.mllib.common import _to_java_object_rdd
3940
from pyspark.mllib.linalg import Vector, SparseVector, DenseVector, VectorUDT, _convert_to_vector,\
4041
DenseMatrix, Vectors, Matrices
4142
from pyspark.mllib.regression import LabeledPoint
@@ -634,6 +635,13 @@ def test_idf_model(self):
634635
idf = model.idf()
635636
self.assertEqual(len(idf), 11)
636637

638+
639+
class SerDeTest(PySparkTestCase):
640+
def test_to_java_object_rdd(self): # SPARK-6660
641+
data = RandomRDDs.uniformRDD(self.sc, 10, 5, seed=0L)
642+
self.assertEqual(_to_java_object_rdd(data).count(), 10)
643+
644+
637645
if __name__ == "__main__":
638646
if not _have_scipy:
639647
print "NOTE: Skipping SciPy tests as it does not seem to be installed"

0 commit comments

Comments
 (0)