Skip to content

MINOR: code cleanup#6056

Merged
mjsax merged 2 commits intoapache:trunkfrom
mjsax:minor-code-cleanup-kstream-test
Jan 8, 2019
Merged

MINOR: code cleanup#6056
mjsax merged 2 commits intoapache:trunkfrom
mjsax:minor-code-cleanup-kstream-test

Conversation

@mjsax
Copy link
Copy Markdown
Member

@mjsax mjsax commented Dec 20, 2018

Similar to #6053

@mjsax mjsax added the streams label Dec 20, 2018
@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Dec 20, 2018

Call for review @guozhangwang @bbejeck @vvcephei

Copy link
Copy Markdown
Member

@bbejeck bbejeck left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup @mjsax! LGMT

Copy link
Copy Markdown
Contributor

@vvcephei vvcephei left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks so much for this cleanup.

The only concern is that assignment operator.

assertThat(topology.processorConnectedStateStores("KSTREAM-JOIN-0000000005"), equalTo(Collections.singleton(topology.stateStores().get(0).name())));
assertThat(topology.processorConnectedStateStores("KTABLE-FILTER-0000000003").isEmpty(), is(true));
final ProcessorTopology topology
= builder.internalTopologyBuilder.rewriteTopology(new StreamsConfig(props)).build();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Repeating my comment from #6053 (comment) here... Not sure about the assignment operator at the start of the line.

I won't comment further on this in this PR.


@Test
public void shouldCreateSourceAndSinkNodesForRepartitioningTopic() throws NoSuchFieldException, IllegalAccessException {
public void shouldCreateSourceAndSinkNodesForRepartitioningTopic() throws Exception {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Relaxing the throws declaration tightens up the line, but does it make the test more mysterious?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No (compare my comment on the other PR). If any exception occurs, the test fails anyway.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I buy it. Thanks!

@guozhangwang
Copy link
Copy Markdown
Contributor

lgtm. @mjsax please feel free to merge after addressing the above comments.

@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Jan 3, 2019

Updates. John, please let me know if I can merge.

Copy link
Copy Markdown
Contributor

@vvcephei vvcephei left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks, @mjsax .

@mjsax mjsax merged commit 3991d81 into apache:trunk Jan 8, 2019
@mjsax mjsax deleted the minor-code-cleanup-kstream-test branch January 8, 2019 21:33
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
Reviewers: Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>, Guozhang Wang <guozhang@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants