Class PreComputedRecordsSourceConnector
java.lang.Object
org.apache.kafka.connect.connector.Connector
org.apache.kafka.connect.source.SourceConnector
io.debezium.performance.engine.connector.PreComputedRecordsSourceConnector
- All Implemented Interfaces:
org.apache.kafka.connect.components.Versioned
public class PreComputedRecordsSourceConnector
extends org.apache.kafka.connect.source.SourceConnector
Simple source connector which produces limited number of pre-computed records.
It's similar to
SimpleSourceConnector, but adjusted for benchmarks so fixed amount of records is generated beforehand and only these pre-generated records
are sent to the consumer.- Author:
- vjuranek
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final intstatic final Stringstatic final Stringprotected static final StringFields inherited from class org.apache.kafka.connect.connector.Connector
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kafka.common.config.ConfigDefconfig()private static List<org.apache.kafka.connect.source.SourceRecord>precomputeRecords(int numberOfRecords) private static StringrandomString(Random random, int length) voidvoidstop()Class<? extends org.apache.kafka.connect.connector.Task>taskConfigs(int maxTasks) version()Methods inherited from class org.apache.kafka.connect.source.SourceConnector
alterOffsets, canDefineTransactionBoundaries, context, exactlyOnceSupportMethods inherited from class org.apache.kafka.connect.connector.Connector
initialize, initialize, reconfigure, validate
-
Field Details
-
VERSION
- See Also:
-
TOPIC_NAME
- See Also:
-
RECORD_COUNT_PER_BATCH
- See Also:
-
BATCH_COUNT
- See Also:
-
DEFAULT_RECORD_COUNT_PER_BATCH
public static final int DEFAULT_RECORD_COUNT_PER_BATCH- See Also:
-
DEFAULT_BATCH_COUNT
public static final int DEFAULT_BATCH_COUNT- See Also:
-
config
-
-
Constructor Details
-
PreComputedRecordsSourceConnector
public PreComputedRecordsSourceConnector()
-
-
Method Details
-
version
-
start
- Specified by:
startin classorg.apache.kafka.connect.connector.Connector
-
taskClass
- Specified by:
taskClassin classorg.apache.kafka.connect.connector.Connector
-
taskConfigs
- Specified by:
taskConfigsin classorg.apache.kafka.connect.connector.Connector
-
stop
public void stop()- Specified by:
stopin classorg.apache.kafka.connect.connector.Connector
-
config
public org.apache.kafka.common.config.ConfigDef config()- Specified by:
configin classorg.apache.kafka.connect.connector.Connector
-
precomputeRecords
private static List<org.apache.kafka.connect.source.SourceRecord> precomputeRecords(int numberOfRecords) -
randomString
-