Package org.apache.kafka.connect.tools
Class SchemaSourceTask
java.lang.Object
org.apache.kafka.connect.source.SourceTask
org.apache.kafka.connect.tools.SchemaSourceTask
- All Implemented Interfaces:
- Task
Task implementation for 
SchemaSourceConnector.- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.kafka.connect.source.SourceTaskSourceTask.TransactionBoundary
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.kafka.connect.source.SourceTaskTRANSACTION_BOUNDARY_CONFIG
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class org.apache.kafka.connect.source.SourceTaskcommit, commitRecord, commitRecord, initialize
- 
Field Details- 
NAME_CONFIG- See Also:
 
- 
ID_CONFIG- See Also:
 
- 
TOPIC_CONFIG- See Also:
 
- 
NUM_MSGS_CONFIG- See Also:
 
- 
THROUGHPUT_CONFIG- See Also:
 
- 
MULTIPLE_SCHEMA_CONFIG- See Also:
 
- 
PARTITION_COUNT_CONFIG- See Also:
 
 
- 
- 
Constructor Details- 
SchemaSourceTaskpublic SchemaSourceTask()
 
- 
- 
Method Details- 
versionDescription copied from interface:TaskGet the version of this task. Usually this should be the same as the correspondingConnectorclass's version.- Returns:
- the version, formatted as a String
 
- 
startDescription copied from class:SourceTaskStart the Task. This should handle any configuration parsing and one-time setup of the task.- Specified by:
- startin interface- Task
- Specified by:
- startin class- SourceTask
- Parameters:
- props- initial configuration
 
- 
pollDescription copied from class:SourceTaskPoll this source task for new records. If no data is currently available, this method should block but return control to the caller regularly (by returningnull) in order for the task to transition to thePAUSEDstate if requested to do so.The task will be stoppedon a separate thread, and when that happens this method is expected to unblock, quickly finish up any remaining processing, and return.- Specified by:
- pollin class- SourceTask
- Returns:
- a list of source records
 
- 
stoppublic void stop()Description copied from class:SourceTaskSignal this SourceTask to stop. In SourceTasks, this method only needs to signal to the task that it should stop trying to poll for new data and interrupt any outstanding poll() requests. It is not required that the task has fully stopped. Note that this method necessarily may be invoked from a different thread thanSourceTask.poll()andSourceTask.commit().For example, if a task uses a Selectorto receive data over the network, this method could set a flag that will forceSourceTask.poll()to exit immediately and invokewakeup()to interrupt any ongoing requests.- Specified by:
- stopin interface- Task
- Specified by:
- stopin class- SourceTask
 
 
-