Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-5549 : Explain that 'client.id' is just used as a prefix within Streams #3544

Closed
wants to merge 5 commits into from
Closed

Conversation

PranavManiar
Copy link
Contributor

  • Added new String CLIENT_ID_DOC in StreamsConfig for explanation

… Streams

- Added new String CLIENT_ID_DOC in StreamsConfig for explanation
@asfgit
Copy link

asfgit commented Jul 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/6145/
Test PASSed (JDK 7 and Scala 2.11).

@asfgit
Copy link

asfgit commented Jul 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/6129/
Test PASSed (JDK 8 and Scala 2.12).

@@ -138,6 +138,7 @@

/** {@code client.id} */
public static final String CLIENT_ID_CONFIG = CommonClientConfigs.CLIENT_ID_CONFIG;
private static final String CLIENT_ID_DOC = "An id string, which will be used as a prefix for internal consumer, producer and restore-consumer";
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the patch. I guess, we can be a little bit more precise here. It's a prefix for the client id of the internal clients. Might also be good to add the pattern that is used for the id used for the internal clients.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi mjsax, Thanks for the comment. Does following message sounds good?

"An id string used by internal clients to pass to server when making requests. It will be passed in kafka protocol request header. The format of that header is {api_key:api_version:correlation_id:client_id} "

Copy link
Member

Choose a reason for hiding this comment

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

What about:

An ID prefix string used for the client IDs of internal consumer, producer and restore-consumer, with pattern '<client.id>-StreamThread-< threadSequenceNumber >-<consumer|producer|restore-consumer>'.";

Cf. https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java#L454

and

https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java#L664

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed.. This description seems perfect.
I don't know how I missed StreamThread in first place :| .. I am just starting up with kafka code.. But this should have been caught in find usage.. Anyways..

I have updated PR with the updated description string. Please check if it looks good.

Copy link
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 patch! LGTM.

Call for second review and merging @guozhangwang @dguy

Copy link
Contributor

@dguy dguy left a comment

Choose a reason for hiding this comment

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

Thanks @PranavManiar, LGTM

@dguy
Copy link
Contributor

dguy commented Jul 26, 2017

retest this please

@@ -146,6 +146,7 @@

/** {@code client.id} */
public static final String CLIENT_ID_CONFIG = CommonClientConfigs.CLIENT_ID_CONFIG;
private static final String CLIENT_ID_DOC = "An ID prefix string used for the client IDs of internal consumer, producer and restore-consumer, with pattern '<client.id>-StreamThread-< threadSequenceNumber >-<consumer|producer|restore-consumer>'.";
Copy link
Member

Choose a reason for hiding this comment

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

Maybe one more nit (\cc @dguy ): remove the before and after threadSequenceNumber (I added those blanks in my Github comment only to get the right rendering. Otherwise, Github did some weird rendering of my comment. It's not supposed to be part if the message.

Also, can we break this line into multiple... we should try to limit line length to 120 chars. Thx.

Copy link
Contributor Author

@PranavManiar PranavManiar Jul 26, 2017

Choose a reason for hiding this comment

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

Updated PR. For line breaking character length is bit more than 120 chars, but it's logical one.. I hope that's ok..

Copy link
Member

Choose a reason for hiding this comment

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

Thx! It's ok. It's just "round about" to keep Github diffs readable.

- Removing additional spaces and breaking long line in mulitple lines
@asfgit
Copy link

asfgit commented Jul 26, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/6338/
Test FAILed (JDK 8 and Scala 2.12).

@asfgit
Copy link

asfgit commented Jul 26, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/6353/
Test FAILed (JDK 7 and Scala 2.11).

@dguy
Copy link
Contributor

dguy commented Jul 26, 2017

@PranavManiar

:streams:checkstyleMain[ant:checkstyle] [ERROR] /home/jenkins/jenkins-slave/workspace/kafka-pr-jdk7-scala2.11@2/streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java:150:5: File contains tab characters (this is the first instance). [FileTabCharacter]
FAILED

Fixing checkstle
@PranavManiar
Copy link
Contributor Author

My bad.. Fixed checkstyle issue now.. Updated PR with the same..

@asfgit
Copy link

asfgit commented Jul 26, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/6356/
Test PASSed (JDK 7 and Scala 2.11).

@asfgit
Copy link

asfgit commented Jul 26, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/6341/
Test PASSed (JDK 8 and Scala 2.12).

@dguy
Copy link
Contributor

dguy commented Jul 27, 2017

Thanks @PranavManiar, merged to trunk

@asfgit asfgit closed this in 9d6020e Jul 27, 2017
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.

4 participants