Class KeyPlainWriter

    • Constructor Summary

      Constructors 
      Constructor Description
      KeyPlainWriter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(org.apache.kafka.connect.sink.SinkRecord record, java.io.OutputStream outputStream)
      Takes the SinkRecord's key as a byte array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeyPlainWriter

        public KeyPlainWriter()
    • Method Detail

      • write

        public void write​(org.apache.kafka.connect.sink.SinkRecord record,
                          java.io.OutputStream outputStream)
                   throws java.io.IOException
        Takes the SinkRecord's key as a byte array.

        If the key is null, it outputs nothing.

        If the key is not null, it assumes the key is a byte array.

        Specified by:
        write in interface OutputFieldPlainWriter
        Parameters:
        record - the record to get the key from
        outputStream - the stream to write to
        Throws:
        org.apache.kafka.connect.errors.DataException - when the key is not actually a byte array
        java.io.IOException