Package org.apache.spark.serializer
Class KryoSerializer
Object
org.apache.spark.serializer.Serializer
org.apache.spark.serializer.KryoSerializer
- All Implemented Interfaces:
Serializable
,org.apache.spark.internal.Logging
public class KryoSerializer
extends Serializer
implements org.apache.spark.internal.Logging, Serializable
A Spark serializer that uses the
Kryo serialization library.
- See Also:
- Note:
- This serializer is not guaranteed to be wire-compatible across different versions of Spark. It is intended to be used to serialize/de-serialize data within a single Spark application.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging
org.apache.spark.internal.Logging.SparkShellLoggingFilter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Creates a newSerializerInstance
.com.esotericsoftware.kryo.Kryo
newKryo()
com.esotericsoftware.kryo.io.Output
com.esotericsoftware.kryo.pool.KryoPool
pool()
setDefaultClassLoader
(ClassLoader classLoader) Sets a class loader for the serializer to use in deserialization.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.spark.internal.Logging
initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq
-
Constructor Details
-
KryoSerializer
-
-
Method Details
-
maxBufferSizeMb
public int maxBufferSizeMb() -
newKryoOutput
public com.esotericsoftware.kryo.io.Output newKryoOutput() -
pool
public com.esotericsoftware.kryo.pool.KryoPool pool() -
newKryo
public com.esotericsoftware.kryo.Kryo newKryo() -
setDefaultClassLoader
Description copied from class:Serializer
Sets a class loader for the serializer to use in deserialization.- Overrides:
setDefaultClassLoader
in classSerializer
- Parameters:
classLoader
- (undocumented)- Returns:
- this Serializer object
-
newInstance
Description copied from class:Serializer
Creates a newSerializerInstance
.- Specified by:
newInstance
in classSerializer
-