DBZ-2975: Prototype multiple offset contexts per task #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #12. The corresponding section of the design doc.
Change summary:
OffsetContext.Loader
is parametrized with<O extends OffsetContext>
(see DBZ-2975: Extract offset context from object states to method signatures #13 for the reasoning).New APIs:
TaskPartition
interface. Describes the partition of the source to be processed by the task in terms of a given connector and provides its representation as a Kafka Connect source partition. For instance, anSqlServerTaskPartition
describes a source database. Any other connector can implement this interface in its specific terms.TaskPartition.Provider
interface. Provides a collection of task-specific partitions for a given task based on its configuration. E.g. a listSqlServerTaskPartition
s each representing a database for a SQL Server connector task.TaskOffsetContext
class. It's effectively a map ofTaskPartition
toOffsetContext
describing the scope of work for a given task and its state. This map will be iterated over by different task components to process multiple databases.TaskOffsetContext.Loader
class. Similarly toOffsetContext.Loader
, loads the task offset context.