Skip to content

KAFKA-9487: Follow-up PR of Kafka-9445#8033

Merged
vvcephei merged 6 commits intoapache:trunkfrom
brary:navinderbrar-Followup-KAFKA-9445
Feb 10, 2020
Merged

KAFKA-9487: Follow-up PR of Kafka-9445#8033
vvcephei merged 6 commits intoapache:trunkfrom
brary:navinderbrar-Followup-KAFKA-9445

Conversation

@brary
Copy link
Copy Markdown
Contributor

@brary brary commented Feb 2, 2020

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.

Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.

Committer Checklist (excluded from commit message)

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

@brary brary requested a review from mjsax February 2, 2020 06:57
@mjsax mjsax changed the title [KAFKA-9487] : Follow-up PR of Kafka-9445 KAFKA-9487: Follow-up PR of Kafka-9445 Feb 2, 2020
@mjsax mjsax added the streams label Feb 2, 2020
@mjsax mjsax requested a review from vvcephei February 2, 2020 18:21
Copy link
Copy Markdown
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

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

The non unit-testing part LGTM. @mjsax could you take a look at the unit tests and see if they have addressed all your comments?

Copy link
Copy Markdown
Member

@vinothchandar vinothchandar left a comment

Choose a reason for hiding this comment

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

Left few comments..

Comment thread streams/src/main/java/org/apache/kafka/streams/StoreQueryParams.java Outdated
Comment thread streams/src/main/java/org/apache/kafka/streams/StoreQueryParams.java Outdated
public static <T> StoreQueryParams<T> fromNameAndType(final String storeName,
final QueryableStoreType<T> queryableStoreType) {
return new StoreQueryParams<T>(storeName, queryableStoreType);
return new StoreQueryParams<T>(storeName, queryableStoreType, null, false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we use a different sentinel than null for the partition field?. Does an Optional make sense?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually we had a long discussion on keeping this null and adding it in Java doc that null means all partitions. Do you think this is important to start a discussion on the thread again? :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dont worry about it :) .. Happy to budge on stylistic things and leave it to the committers' call

Comment thread streams/src/main/java/org/apache/kafka/streams/StoreQueryParams.java Outdated
return results;
}

public List<String> sourceTopicsForStore(final String storeName) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

a side note: Should we also consider the map stateStoreNameToSourceRegex here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not sure, do you think it will identify more topic groups? At the end of the day we are identifying a topic groupId to which a store belongs to.

On a side note, if we do want to add stateStoreNameToSourceRegex along with stateStoreNameToSourceTopics, then we can probably return a set instead of list in this function and iterate over both of above one by one.

@brary
Copy link
Copy Markdown
Contributor Author

brary commented Feb 4, 2020

Left few comments..

Thanks @guozhangwang and @vinothchandar . Addressed a few comments and have replied to some left.

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.

Hey, thanks for the update @brary .

IIUC, the main motivation for this PR was some follow-up comments from @mjsax . It would be good to get a +1 from him before merging. Maybe after the other comments are addressed.

Comment thread streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java Outdated
Comment thread streams/src/main/java/org/apache/kafka/streams/StoreQueryParams.java Outdated
@brary
Copy link
Copy Markdown
Contributor Author

brary commented Feb 5, 2020

Hey, thanks for the update @brary .

IIUC, the main motivation for this PR was some follow-up comments from @mjsax . It would be good to get a +1 from him before merging. Maybe after the other comments are addressed.

Thanks @vvcephei for the comments. I have made the changes suggested by you as well.

@mjsax I guess everyone else has reviewed and their comments have been incorporated. It would be great if you can give one last look and if it's okay merge it.

Copy link
Copy Markdown
Member

@mjsax mjsax 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 PR. Couple of minor comments. Also added one more reply on the original PR that should be addressed in this PR (https://github.com/apache/kafka/pull/7984/files#r375517935).

Comment thread streams/src/main/java/org/apache/kafka/streams/StoreQueryParams.java Outdated
Comment thread streams/src/main/java/org/apache/kafka/streams/StoreQueryParams.java Outdated
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.

Thanks for addressing my comments!

@mjsax
Copy link
Copy Markdown
Member

mjsax commented Feb 5, 2020

@vinothchandar @vvcephei I would still propose to rename the new class to StoreQueryParameters -- it's not a big deal to rename even after feature freeze IHMO.

Thoughts?

@vinothchandar
Copy link
Copy Markdown
Member

StoreQueryParameters does sound better to me. but leave it you all. :)

@brary
Copy link
Copy Markdown
Contributor Author

brary commented Feb 6, 2020

@mjsax I have changed the class to StoreQueryParameters and addressed the comment you gave in earlier PR. There were few checkstyles which were failing in ValueAndTimestampSerializerTest unrelated to this PR. I have fixed those as well.

Copy link
Copy Markdown
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

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

Thanks @brary! LGTM. I leave it to @vvcephei to merge this PR to trunk and cherry-pick to 2.5 branch.

@vvcephei
Copy link
Copy Markdown
Contributor

Thanks @mjsax . I'll take care of it tomorrow.

I don't see any test results, so I'll ask Jenkins to re-run it:

Retest this, please.

@vvcephei
Copy link
Copy Markdown
Contributor

Unrelated test failures:
kafka.admin.DeleteConsumerGroupsTest.testDeleteCmdAllGroups
kafka.admin.DeleteConsumerGroupsTest.testDeleteCmdWithMixOfSuccessAndError

Proceeding to merge.

@vvcephei vvcephei merged commit d76fa1b into apache:trunk Feb 10, 2020
vvcephei pushed a commit that referenced this pull request Feb 10, 2020
Follows up on the original PR for KAFKA-9445 to address a final round of feedback

Cherry-pick of d76fa1b from trunk

Reviewers: John Roesler <vvcephei@apache.org>, Matthias J. Sax <matthias@confluent.io>
@vvcephei
Copy link
Copy Markdown
Contributor

Cherry-picked onto 2.5 as 3e77458

stanislavkozlovski pushed a commit to stanislavkozlovski/kafka that referenced this pull request Feb 18, 2020
Follows up on the original PR for KAFKA-9445 to address a final round of feedback

Cherry-pick of d76fa1b from trunk

Reviewers: John Roesler <vvcephei@apache.org>, Matthias J. Sax <matthias@confluent.io>
@mjsax mjsax added the kip Requires or implements a KIP label Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kip Requires or implements a KIP streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants