DefaultSerializer (Apache Hadoop MapReduce NativeTask 3.5.0 API)
Description: declaration: package: org.apache.hadoop.mapred.nativetask.serde, class: DefaultSerializer

Package org.apache.hadoop.mapred.nativetask.serde

# Class DefaultSerializer

java.lang.Object
org.apache.hadoop.mapred.nativetask.serde.DefaultSerializer

All Implemented Interfaces:
  `INativeSerializer<org.apache.hadoop.io.Writable>`

Direct Known Subclasses:
  `BoolWritableSerializer`, `ByteWritableSerializer`, `DoubleWritableSerializer`, `FloatWritableSerializer`, `IntWritableSerializer`, `LongWritableSerializer`, `NullWritableSerializer`, `VIntWritableSerializer`, `VLongWritableSerializer`

@Public @Evolving public class DefaultSerializer extends Object implements INativeSerializer<org.apache.hadoop.io.Writable>

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultSerializer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `deserialize(DataInput in, int length, org.apache.hadoop.io.Writable w)`
  `int`
  `getLength(org.apache.hadoop.io.Writable w)`
  get length of data to be serialized.
  `void`
  `serialize(org.apache.hadoop.io.Writable w, DataOutput out)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DefaultSerializer

    public DefaultSerializer()

- ## Method Details

  - ### getLength

    public int getLength(org.apache.hadoop.io.Writable w) throws IOException
    Description copied from interface: `INativeSerializer`
    get length of data to be serialized. If the data length is already known (like IntWritable) and could immediately be returned from this method, it is good chance to implement customized NativeSerializer for efficiency
    Specified by:
      `getLength` in interface `INativeSerializer<org.apache.hadoop.io.Writable>`
    Throws:
      `IOException`

  - ### serialize

    public void serialize(org.apache.hadoop.io.Writable w, DataOutput out) throws IOException
    Specified by:
      `serialize` in interface `INativeSerializer<org.apache.hadoop.io.Writable>`
    Throws:
      `IOException`

  - ### deserialize

    public void deserialize(DataInput in, int length, org.apache.hadoop.io.Writable w) throws IOException
    Specified by:
      `deserialize` in interface `INativeSerializer<org.apache.hadoop.io.Writable>`
    Throws:
      `IOException`