@ThreadSafe public final class MongoDbConnectorTask extends BaseSourceTask
Generally, the MongoDbConnector assigns each replica set to a separate task, although multiple
replica sets will be assigned to each task when the maximum number of tasks is limited. Regardless, every task will use a
separate thread to replicate the contents of each replica set, and each replication thread may use multiple threads
to perform an initial sync of the replica set.
MongoDbConnector,
MongoDbConnectorConfigBaseSourceTask.State| Modifier and Type | Field and Description |
|---|---|
private static String |
CONTEXT_NAME |
private ErrorHandler |
errorHandler |
private org.slf4j.Logger |
logger |
private ChangeEventQueue<DataChangeEvent> |
queue |
private MongoDbSchema |
schema |
private MongoDbTaskContext |
taskContext |
private String |
taskName |
| Constructor and Description |
|---|
MongoDbConnectorTask() |
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.kafka.connect.source.SourceRecord> |
doPoll() |
void |
doStop() |
protected Iterable<Field> |
getAllConfigurationFields() |
private MongoDbOffsetContext |
getPreviousOffsets(MongoDbConnectorConfig connectorConfig,
ReplicaSets replicaSets) |
private ReplicaSets |
getReplicaSets(Configuration config) |
ChangeEventSourceCoordinator |
start(Configuration config) |
String |
version() |
commit, commitRecord, getPreviousOffset, poll, start, stopprivate static final String CONTEXT_NAME
private final org.slf4j.Logger logger
private volatile ChangeEventQueue<DataChangeEvent> queue
private volatile String taskName
private volatile MongoDbTaskContext taskContext
private volatile ErrorHandler errorHandler
private volatile MongoDbSchema schema
public String version()
public ChangeEventSourceCoordinator start(Configuration config)
start in class BaseSourceTaskpublic List<org.apache.kafka.connect.source.SourceRecord> doPoll() throws InterruptedException
doPoll in class BaseSourceTaskInterruptedExceptionpublic void doStop()
doStop in class BaseSourceTaskprotected Iterable<Field> getAllConfigurationFields()
getAllConfigurationFields in class BaseSourceTaskprivate MongoDbOffsetContext getPreviousOffsets(MongoDbConnectorConfig connectorConfig, ReplicaSets replicaSets)
private ReplicaSets getReplicaSets(Configuration config)
Copyright © 2021 JBoss by Red Hat. All rights reserved.