Fixed warning for type erasure

This commit is contained in:
Prashant Sharma 2013-07-16 14:59:24 +05:30
parent 50f3cd8890
commit f89cc7ae3c

View file

@ -195,7 +195,7 @@ private[spark] object PythonRDD {
val arr = elem.asInstanceOf[Array[Byte]]
dOut.writeInt(arr.length)
dOut.write(arr)
} else if (elem.isInstanceOf[scala.Tuple2[Array[Byte], Array[Byte]]]) {
} else if (elem.isInstanceOf[scala.Tuple2[_, _]]) {
val t = elem.asInstanceOf[scala.Tuple2[Array[Byte], Array[Byte]]]
val length = t._1.length + t._2.length - 3 - 3 + 4 // stripPickle() removes 3 bytes
dOut.writeInt(length)