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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    Creates a new SerializerInstance.
    com.esotericsoftware.kryo.Kryo
     
    com.esotericsoftware.kryo.io.Output
     
    com.esotericsoftware.kryo.pool.KryoPool
     
    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, 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

      public KryoSerializer(SparkConf conf)
  • 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

      public Serializer setDefaultClassLoader(ClassLoader classLoader)
      Description copied from class: Serializer
      Sets a class loader for the serializer to use in deserialization.

      Overrides:
      setDefaultClassLoader in class Serializer
      Parameters:
      classLoader - (undocumented)
      Returns:
      this Serializer object
    • newInstance

      public SerializerInstance newInstance()
      Description copied from class: Serializer
      Creates a new SerializerInstance.
      Specified by:
      newInstance in class Serializer