Skip to content

KAFKA-3076: BrokerChangeListener should log the brokers in order - #749

Closed
konradkalita wants to merge 7 commits into
apache:trunkfrom
konradkalita:kafka-3076
Closed

KAFKA-3076: BrokerChangeListener should log the brokers in order#749
konradkalita wants to merge 7 commits into
apache:trunkfrom
konradkalita:kafka-3076

Conversation

@konradkalita

Copy link
Copy Markdown
Contributor

No description provided.

@ijuma

ijuma commented Jan 9, 2016

Copy link
Copy Markdown
Member

Thanks for the PR. Instead of sorting on every log statement, another approach is to sort it once and pass the sorted seq around. Have you considered this approach?

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.

Sorting once seems cleaner I probably overcomplicated it, but it seems that we pass a Seq here only to convert it to a Set again, so maybe we just pass a Set?

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.

That is true, it's a bit unclear why we convert to a Seq and then immediately convert back to a Set. Another option is to introduce a method like brokerSetToString and have that method do the sorting.

@junrao

junrao commented Jan 11, 2016

Copy link
Copy Markdown
Contributor

Thanks for the patch. Yes, I agree with @ijuma . It seems it's simpler to just sort the broker ids once in BrokerChangeListener and pass them as Seq as they are now.

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.

We should use curBrokers instead of controllerContext.liveBrokerIds here.

@ijuma

ijuma commented Jan 25, 2016

Copy link
Copy Markdown
Member

LGTM

@junrao

junrao commented Jan 25, 2016

Copy link
Copy Markdown
Contributor

Thanks for the patch. LGTM

@asfgit asfgit closed this in 9f21837 Jan 25, 2016
@konradkalita
konradkalita deleted the kafka-3076 branch January 26, 2016 15:49
AnGg98 pushed a commit to AnGg98/kafka that referenced this pull request Jul 25, 2022
With 6f81bb1 merged, we can now use c4.xlarge instances with our system tests, which are much more reliable for spot than m3.xlarge.
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.

3 participants