Class TopicPartitionKeyRecordGrouper

  • All Implemented Interfaces:
    RecordGrouper

    public class TopicPartitionKeyRecordGrouper
    extends java.lang.Object
    implements RecordGrouper
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clear all records.
      protected java.lang.String generateNewRecordKey​(org.apache.kafka.connect.sink.SinkRecord record)  
      java.lang.String generateObjectKey​(TopicPartitionKeyRecordGrouper.TopicPartitionKey tpk, org.apache.kafka.connect.sink.SinkRecord headRecord, org.apache.kafka.connect.sink.SinkRecord currentRecord)  
      void put​(org.apache.kafka.connect.sink.SinkRecord record)
      Associate the record with the appropriate file.
      java.util.Map<java.lang.String,​java.util.List<org.apache.kafka.connect.sink.SinkRecord>> records()
      Get all records associated with files, grouped by the file name.
      protected java.lang.String resolveRecordKeyFor​(org.apache.kafka.connect.sink.SinkRecord record)  
      • Methods inherited from class java.lang.Object

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

      • put

        public void put​(org.apache.kafka.connect.sink.SinkRecord record)
        Description copied from interface: RecordGrouper
        Associate the record with the appropriate file.
        Specified by:
        put in interface RecordGrouper
        Parameters:
        record - - record to group
      • resolveRecordKeyFor

        protected java.lang.String resolveRecordKeyFor​(org.apache.kafka.connect.sink.SinkRecord record)
      • generateNewRecordKey

        protected java.lang.String generateNewRecordKey​(org.apache.kafka.connect.sink.SinkRecord record)
      • records

        public java.util.Map<java.lang.String,​java.util.List<org.apache.kafka.connect.sink.SinkRecord>> records()
        Description copied from interface: RecordGrouper
        Get all records associated with files, grouped by the file name.
        Specified by:
        records in interface RecordGrouper
        Returns:
        map of records assotiated with files