org.apache.hadoop.mapred.nativetask.serde

## Class BytesWritableSerializer

- java.lang.Object
- - org.apache.hadoop.mapred.nativetask.serde.BytesWritableSerializer

- All Implemented Interfaces:
    INativeComparable, INativeSerializer<org.apache.hadoop.io.BytesWritable>

      @InterfaceAudience.Private
      public class BytesWritableSerializer
      extends Object
      implements INativeComparable, INativeSerializer<org.apache.hadoop.io.BytesWritable>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BytesWritableSerializer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deserialize(DataInput in, int length, org.apache.hadoop.io.BytesWritable w)`
    `int` | `getLength(org.apache.hadoop.io.BytesWritable w)` get length of data to be serialized.
    `void` | `serialize(org.apache.hadoop.io.BytesWritable w, DataOutput out)`

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

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

- - ### Constructor Detail

    - #### BytesWritableSerializer

          public BytesWritableSerializer()

  - ### Method Detail

    - #### getLength

          public int getLength(org.apache.hadoop.io.BytesWritable 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.BytesWritable>`
      Throws:
        `IOException`

    - #### serialize

          public void serialize(org.apache.hadoop.io.BytesWritable w,
                                DataOutput out)
                         throws IOException

      Specified by:
        `serialize` in interface `INativeSerializer<org.apache.hadoop.io.BytesWritable>`
      Throws:
        `IOException`

    - #### deserialize

          public void deserialize(DataInput in,
                                  int length,
                                  org.apache.hadoop.io.BytesWritable w)
                           throws IOException

      Specified by:
        `deserialize` in interface `INativeSerializer<org.apache.hadoop.io.BytesWritable>`
      Throws:
        `IOException`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.