Skip to content


Serializer is an abstraction of <> that are intended to be used to serialize/de-serialize data in a single Spark application.

== [[implementations]] Available Serializers

[cols="30,70",options="header",width="100%"] |=== | Serializer | Description

| JavaSerializer | [[JavaSerializer]]

| KryoSerializer | [[KryoSerializer]]


== [[newInstance]] newInstance Method

[source, scala]

newInstance(): SerializerInstance


newInstance is used when...FIXME

== [[setDefaultClassLoader]] setDefaultClassLoader Method

[source, scala]

setDefaultClassLoader( classLoader: ClassLoader): Serializer


setDefaultClassLoader is used when...FIXME

== [[supportsRelocationOfSerializedObjects]] supportsRelocationOfSerializedObjects Property

[source, scala]

supportsRelocationOfSerializedObjects: Boolean

supportsRelocationOfSerializedObjects should be enabled (i.e. true) only when reordering the bytes of serialized objects in serialization stream output is equivalent to having re-ordered those elements prior to serializing them.

supportsRelocationOfSerializedObjects is disabled (false) by default.

NOTE: KryoSerializer uses autoReset for supportsRelocationOfSerializedObjects.

NOTE: supportsRelocationOfSerializedObjects is enabled in UnsafeRowSerializer.

Last update: 2020-10-06