Skip to content

KAFKA-9113: P5, StandbyTask Life Cycle#7

Merged
guozhangwang merged 13 commits into
k9113-basefrom
K9113-standby-task-p5
Jan 24, 2020
Merged

KAFKA-9113: P5, StandbyTask Life Cycle#7
guozhangwang merged 13 commits into
k9113-basefrom
K9113-standby-task-p5

Conversation

@guozhangwang

Copy link
Copy Markdown
Owner

Standby Task implementation based on John's work.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@guozhangwang guozhangwang merged commit 1c52f56 into k9113-base Jan 24, 2020
@guozhangwang guozhangwang changed the title K9113 standby task p5 KAFKA-9113: P5, StandbyTask Life Cycle Jan 24, 2020
try {
restoreConsumer.unsubscribe();
} catch (KafkaException e) {
} catch (final KafkaException e) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this not fail the build without the final qualifier? Do we have some exceptions for this style check that we should remove?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was not in any suppression files.. I did not know why it does not fail the build before.

for (final TopicPartition partition : partitions) {
final SourceNode source = topology.source(partition.topic());
final TimestampExtractor sourceTimestampExtractor = source.getTimestampExtractor() != null ? source.getTimestampExtractor() : defaultTimestampExtractor;
final TimestampExtractor timestampExtractor = source.getTimestampExtractor();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get the extractor from the source; should the var name not be sourceTimestampExtractor ?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I can do that.

final SourceNode source = topology.source(partition.topic());
final TimestampExtractor sourceTimestampExtractor = source.getTimestampExtractor() != null ? source.getTimestampExtractor() : defaultTimestampExtractor;
final TimestampExtractor timestampExtractor = source.getTimestampExtractor();
final TimestampExtractor sourceTimestampExtractor = timestampExtractor != null ? source.getTimestampExtractor() : defaultTimestampExtractor;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may or maynot be the source extractor -- it could also be the default extractor. Should we rename to timestampExtractor?

guozhangwang added a commit to apache/kafka that referenced this pull request Feb 5, 2020
This PR is collaborated by Guozhang Wang and John Roesler. It is a significant tech debt cleanup on task management and state management, and is broken down by several sub-tasks listed below:

Extract embedded clients (producer and consumer) into RecordCollector from StreamTask.
guozhangwang#2
guozhangwang#5

Consolidate the standby updating and active restoring logic into ChangelogReader and extract out of StreamThread.
guozhangwang#3
guozhangwang#4

Introduce Task state life cycle (created, restoring, running, suspended, closing), and refactor the task operations based on the current state.
guozhangwang#6
guozhangwang#7

Consolidate AssignedTasks into TaskManager and simplify the logic of changelog management and task management (since they are already moved in step 2) and 3)).
guozhangwang#8
guozhangwang#9

Also simplified the StreamThread logic a bit as the embedded clients / changelog restoration logic has been moved into step 1) and 2).
guozhangwang#10

Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Bruno Cadonna <bruno@confluent.io>, Boyang Chen <boyang@confluent.io>
@guozhangwang guozhangwang deleted the K9113-standby-task-p5 branch April 24, 2020 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants