Class BytesWritableSerializer

java.lang.Object
org.apache.hadoop.mapred.nativetask.serde.BytesWritableSerializer
All Implemented Interfaces:
INativeComparable, INativeSerializer<org.apache.hadoop.io.BytesWritable>

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

    • BytesWritableSerializer

      public BytesWritableSerializer()
  • Method Details

    • 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