Class

org.apache.spark.sql.execution

UnsafeRowSerializer

Related Doc: package execution

Permalink

class UnsafeRowSerializer extends Serializer with Serializable

Serializer for serializing UnsafeRows during shuffle. Since UnsafeRows are already stored as bytes, this serializer simply copies those bytes to the underlying output stream. When deserializing a stream of rows, instances of this serializer mutate and return a single UnsafeRow instance that is backed by an on-heap byte array.

Note that this serializer implements only the Serializer methods that are used during shuffle, so certain SerializerInstance methods will throw UnsupportedOperationException.

Linear Supertypes
Serializable, Serializer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnsafeRowSerializer
  2. Serializable
  3. Serializer
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new UnsafeRowSerializer(numFields: Int, dataSize: SQLMetric = null)

    Permalink

    numFields

    the number of fields in the row being serialized.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. var defaultClassLoader: Option[ClassLoader]

    Permalink

    Default ClassLoader to use in deserialization.

    Default ClassLoader to use in deserialization. Implementations of Serializer should make sure it is using this when set.

    Attributes
    protected
    Definition Classes
    Serializer
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def newInstance(): SerializerInstance

    Permalink

    Creates a new SerializerInstance.

    Creates a new SerializerInstance.

    Definition Classes
    UnsafeRowSerializerSerializer
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. def setDefaultClassLoader(classLoader: ClassLoader): Serializer

    Permalink

    Sets a class loader for the serializer to use in deserialization.

    Sets a class loader for the serializer to use in deserialization.

    returns

    this Serializer object

    Definition Classes
    Serializer
  18. def supportsRelocationOfSerializedObjects: Boolean

    Permalink

    :: Private :: Returns true if this serializer supports relocation of its serialized objects and false otherwise.

    :: Private :: Returns true if this serializer supports relocation of its serialized objects and false otherwise. This should return true if and only if reordering the bytes of serialized objects in serialization stream output is equivalent to having re-ordered those elements prior to serializing them. More specifically, the following should hold if a serializer supports relocation:

    serOut.open()
    position = 0
    serOut.write(obj1)
    serOut.flush()
    position = # of bytes writen to stream so far
    obj1Bytes = output[0:position-1]
    serOut.write(obj2)
    serOut.flush()
    position2 = # of bytes written to stream so far
    obj2Bytes = output[position:position2-1]
    serIn.open([obj2bytes] concatenate [obj1bytes]) should return (obj2, obj1)

    In general, this property should hold for serializers that are stateless and that do not write special metadata at the beginning or end of the serialization stream.

    This API is private to Spark; this method should not be overridden in third-party subclasses or called in user code and is subject to removal in future Spark releases.

    See SPARK-7311 for more details.

    Definition Classes
    UnsafeRowSerializerSerializer
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializer

Inherited from AnyRef

Inherited from Any

Ungrouped