Package org.apache.spark.serializer
Class Serializer
Object
org.apache.spark.serializer.Serializer
- Direct Known Subclasses:
- JavaSerializer,- KryoSerializer
:: DeveloperApi ::
 A serializer. Because some serialization libraries are not thread safe, this class is used to
 create 
SerializerInstance objects that do the actual
 serialization and are guaranteed to only be called from one thread at a time.
 Implementations of this trait should implement:
 1. a zero-arg constructor or a constructor that accepts a SparkConf
 as parameter. If both constructors are defined, the latter takes precedence.
 
2. Java serialization interface.
- Note:
- Serializers are not required to be wire-compatible across different versions of Spark. They are intended to be used to serialize/de-serialize data within a single Spark application.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract SerializerInstanceCreates a newSerializerInstance.setDefaultClassLoader(ClassLoader classLoader) Sets a class loader for the serializer to use in deserialization.
- 
Constructor Details- 
Serializerpublic Serializer()
 
- 
- 
Method Details- 
newInstanceCreates a newSerializerInstance.
- 
setDefaultClassLoaderSets a class loader for the serializer to use in deserialization.- Parameters:
- classLoader- (undocumented)
- Returns:
- this Serializer object
 
 
-