public abstract class BaseSourceTask
extends org.apache.kafka.connect.source.SourceTask
SourceTask implementations. Provides functionality common to all connectors,
such as validation of the configuration.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
BaseSourceTask() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Iterable<Field> |
getAllConfigurationFields()
Returns all configuration
Field supported by this source task. |
protected OffsetContext |
getPreviousOffset(OffsetContext.Loader loader)
Loads the connector's persistent offset (if present) via the given loader.
|
protected abstract void |
start(Configuration config)
Called once when starting this source task.
|
void |
start(Map<String,String> props) |
commit, commitRecord, initialize, poll, stoppublic final void start(Map<String,String> props)
start in interface org.apache.kafka.connect.connector.Taskstart in class org.apache.kafka.connect.source.SourceTaskprotected abstract void start(Configuration config)
config - the task configuration; implementations should wrap it in a dedicated implementation of
CommonConnectorConfig and work with typed access to configuration properties that wayprotected abstract Iterable<Field> getAllConfigurationFields()
Field supported by this source task.protected OffsetContext getPreviousOffset(OffsetContext.Loader loader)
Copyright © 2018 JBoss by Red Hat. All rights reserved.