Skip to content

MINOR: Avoid compiler warnings when registering metrics in KafkaServer#1280

Closed
Ishiihara wants to merge 4 commits into
apache:trunkfrom
Ishiihara:minor-warning-fix
Closed

MINOR: Avoid compiler warnings when registering metrics in KafkaServer#1280
Ishiihara wants to merge 4 commits into
apache:trunkfrom
Ishiihara:minor-warning-fix

Conversation

@Ishiihara
Copy link
Copy Markdown
Contributor

@Ishiihara Ishiihara commented Apr 28, 2016

No description provided.

val uncleanLeaderElectionRate = newMeter("UncleanLeaderElectionsPerSec", "elections", TimeUnit.SECONDS)
val leaderElectionTimer = new KafkaTimer(newTimer("LeaderElectionRateAndTimeMs", TimeUnit.MILLISECONDS, TimeUnit.SECONDS))
def uncleanLeaderElectionRate() = newMeter("UncleanLeaderElectionsPerSec", "elections", TimeUnit.SECONDS)
def leaderElectionTimer() = new KafkaTimer(newTimer("LeaderElectionRateAndTimeMs", TimeUnit.MILLISECONDS, TimeUnit.SECONDS))
Copy link
Copy Markdown
Member

@ijuma ijuma Apr 28, 2016

Choose a reason for hiding this comment

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

This is changing the semantics, we are creating a new instance each time we call these methods.

@Ishiihara
Copy link
Copy Markdown
Contributor Author

@ijuma Thanks for the review and offline discussion. I modified the PR according to offline discussion. and it seems the warning is gone. However, the implementation is quite Java like.

@Ishiihara Ishiihara changed the title MINOR: Remove some warning MINOR: Eliminate compiler warnings when registering metrics in KafkaServer Apr 28, 2016
@Ishiihara Ishiihara changed the title MINOR: Eliminate compiler warnings when registering metrics in KafkaServer MINOR: Avoid compiler warnings when registering metrics in KafkaServer Apr 28, 2016
@asfgit asfgit closed this in 346df72 Apr 28, 2016
@Ishiihara Ishiihara deleted the minor-warning-fix branch May 9, 2016 23:08
gfodor pushed a commit to AltspaceVR/kafka that referenced this pull request Jun 3, 2016
Author: Liquan Pei <liquanpei@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes apache#1280 from Ishiihara/minor-warning-fix
mumrah pushed a commit to mumrah/kafka that referenced this pull request Aug 14, 2024
* Refactor share group code

* Addressing review comments
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