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.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCreates a newSerializerInstance.com.esotericsoftware.kryo.KryonewKryo()com.esotericsoftware.kryo.io.Outputcom.esotericsoftware.kryo.pool.KryoPoolpool()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, waitMethods inherited from interface org.apache.spark.internal.Logging
initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logBasedOnLevel, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logName, LogStringContext, logTrace, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, logWarning, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContext
-
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:SerializerSets a class loader for the serializer to use in deserialization.- Overrides:
setDefaultClassLoaderin classSerializer- Parameters:
classLoader- (undocumented)- Returns:
- this Serializer object
-
newInstance
Description copied from class:SerializerCreates a newSerializerInstance.- Specified by:
newInstancein classSerializer
-