Class KeyAndTopicPartitionRecordGrouper
java.lang.Object
io.aiven.kafka.connect.common.grouper.KeyAndTopicPartitionRecordGrouper
- All Implemented Interfaces:
RecordGrouper
A
RecordGrouper that groups records by topic, parition and key.
The class requires a filename template with key variable declared and supports
optional topic and partition variables declared.
The class supports one record per file.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.aiven.kafka.connect.common.grouper.RecordGrouper
RecordGrouper.Rotator<T> -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
KeyAndTopicPartitionRecordGrouper
A constructor.- Parameters:
filenameTemplate- the filename template.
-
-
Method Details
-
put
public void put(org.apache.kafka.connect.sink.SinkRecord record) Description copied from interface:RecordGrouperAssociate the record with the appropriate file.- Specified by:
putin interfaceRecordGrouper- Parameters:
record- - record to group
-
clear
public void clear()Description copied from interface:RecordGrouperClear all records.- Specified by:
clearin interfaceRecordGrouper
-
records
Description copied from interface:RecordGrouperGet all records associated with files, grouped by the file name.- Specified by:
recordsin interfaceRecordGrouper- Returns:
- map of records assotiated with files
-