com.twitter.chill.StreamSerializer.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spark-core Show documentation
Show all versions of spark-core Show documentation
Shaded version of Apache Spark 2.x.x for Presto
The newest version!
package com.twitter.chill
class StreamSerializer[T]() extends KSerializer[Stream[T]] {
def write(kser: Kryo, out: Output, stream: Stream[T]) {
kser.writeClassAndObject(out, stream.toList)
}
def read(kser: Kryo, in: Input, cls: Class[Stream[T]]): Stream[T] = {
kser.readClassAndObject(in).asInstanceOf[List[T]].toStream
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy