Interface INativeSerializer<T>

All Known Implementing Classes:
DefaultSerializer

@Public @Evolving public interface INativeSerializer<T>
an INativeSerializer serializes and deserializes data transferred between Java and native. DefaultSerializer provides default implementations. Note: if you implemented your customized NativeSerializer instead of DefaultSerializer, you have to make sure the native side can serialize it correctly.
  • Method Details

    • getLength

      int getLength(T w) throws IOException
      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
      Throws:
      IOException
    • serialize

      void serialize(T w, DataOutput out) throws IOException
      Throws:
      IOException
    • deserialize

      void deserialize(DataInput in, int length, T w) throws IOException
      Throws:
      IOException