Class GuaguaWritableSerializer<RESULT extends ml.shifu.guagua.io.Bytable>

  • All Implemented Interfaces:
    ml.shifu.guagua.io.Serializer<RESULT>

    @Deprecated
    public class GuaguaWritableSerializer<RESULT extends ml.shifu.guagua.io.Bytable>
    extends ml.shifu.guagua.io.BytableSerializer<RESULT>
    Deprecated.
    GuaguaWritableSerializer is to provide the functionality to support use hadoop writable interface.

    By using this, one should set result class name to Writable, not Bytable like this:

     
          conf.set(GuaguaConstants.GUAGUA_RESULT_CLASS, LongWritable.class.getName());
     
     
    • Constructor Detail

      • GuaguaWritableSerializer

        public GuaguaWritableSerializer()
        Deprecated.
    • Method Detail

      • bytesToObject

        public RESULT bytesToObject​(byte[] data,
                                    String className)
        Deprecated.
        De-serialize from bytes to object. One should provide the instance before de-serializing the object.
        Specified by:
        bytesToObject in interface ml.shifu.guagua.io.Serializer<RESULT extends ml.shifu.guagua.io.Bytable>
        Overrides:
        bytesToObject in class ml.shifu.guagua.io.BytableSerializer<RESULT extends ml.shifu.guagua.io.Bytable>
        Throws:
        NullPointerException - if className or data is null.
        ml.shifu.guagua.GuaguaRuntimeException - if any IO exception or other reflection exception.