Registers all the scala (and java) serializers we have.
Registers all the scala (and java) serializers we have. The registrations are designed to cover most of scala.collecion.immutable, so they can be used in long term persistence scenarios that run with setRegistrationRequired(true).
When adding new serializers, add them to the end of the list, so compatibility is not broken needlessly for projects using chill for long term persistence - see com.twitter.chill.RegistrationIdsSpec.
Registrar for everything that was registered in chill 0.9.2 - included for backwards compatibility.
This class has a no-arg constructor, suitable for use with reflection instantiation It has no registered serializers, just the standard Kryo configured for Kryo.
This is a more fault-tolerant MeatLocker that tries first to do Java serialization, and then falls back to Kryo serialization if that does not work.
Find inner closures and avoid class initialization
Find inner closures and avoid class initialization
val closure1 = (i: Int) => { Option(i).map { x => x + someSerializableValue // inner closure } }
Use Kryo to provide a "box" which is efficiently Java serializable even if the underlying t is not, as long as it is serializable with Kryo.
Use Kryo to provide a "box" which is efficiently Java serializable even if the underlying t is not, as long as it is serializable with Kryo.
Externalizer has replaced this class. Prefer that.
Uses facts about how scala compiles object singletons to Java + reflection
Enrichment pattern to add methods to Kryo objects TODO: make this a value-class in scala 2.10 This also follows the builder pattern to allow easily chaining this calls
Note that additional scala collections registrations are provided by AllScalaRegistrar.
Note that additional scala collections registrations are provided by AllScalaRegistrar. They have not been included in this registrar for backwards compatibility reasons.
Makes an empty instantiator then registers everything
Copied from Spark, written by Matei Zaharia ([email protected]).
Copied from Spark, written by Matei Zaharia ([email protected]).
Ported to ASM 4.0 and refactored for scalding/summingbird by Oscar Boykin
Original code: https://github.com/mesos/spark/blob/master/core/src/main/scala/spark/ClosureCleaner.scala
Scala extensions to the Kryo serialization library.