context, TOPICS_CONFIG, TOPICS_REGEX_CONFIG
Constructor and Description |
---|
MockSinkTask() |
Modifier and Type | Method and Description |
---|---|
void |
put(Collection<SinkRecord> records)
Put the records in the sink.
|
void |
start(Map<String,String> config)
Start the Task.
|
void |
stop()
Perform any cleanup to stop this task.
|
String |
version()
Get the version of this task.
|
close, flush, initialize, onPartitionsAssigned, onPartitionsRevoked, open, preCommit
public String version()
Task
Connector
class's version.public void start(Map<String,String> config)
SinkTask
public void put(Collection<SinkRecord> records)
SinkTask
SinkTask.flush(Map)
or SinkTask.preCommit(Map)
to ensure that offsets are only committed for records
that have been written to the downstream system (hence avoiding data loss during failures).
If this operation fails, the SinkTask may throw a RetriableException
to
indicate that the framework should attempt to retry the same call again. Other exceptions will cause the task to
be stopped immediately. SinkTaskContext.timeout(long)
can be used to set the maximum time before the
batch will be retried.
public void stop()
SinkTask
SinkTask.put(Collection)
has returned) and a final SinkTask.flush(Map)
and offset
commit has completed. Implementations of this method should only need to perform final cleanup operations, such
as closing network connections to the sink system.