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

MINOR: Move processor response queue into Processor #4542

Merged
merged 2 commits into from Feb 8, 2018

Conversation

hachikuji
Copy link
Contributor

Small refactor which moves the processor response queue into the Processor object itself. This simplifies the logic for dequeuing a response for sending and also eliminates the response listeners collection which was only used to wakeup the Processor after a new response had been enqueued.

Committer Checklist (excluded from commit message)

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

@hachikuji
Copy link
Contributor Author

cc @rajinisivaram

Copy link
Contributor

@rajinisivaram rajinisivaram left a comment

Choose a reason for hiding this comment

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

@hachikuji Thanks for the PR. LGTM, left one minor comment.

wakeup()
}

private def receiveResponse(): RequestChannel.Response = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this method name could be changed to use dequeue or poll instead of receive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I chose dequeueResponse since we also now have enqueueResponse.

@rajinisivaram
Copy link
Contributor

@hachikuji Thanks for the update, LGTM.

@hachikuji
Copy link
Contributor Author

@rajinisivaram Thanks for the review. I'll cherry-pick for 1.1 as well since it's harmless and then you'll only need to fix conflicts once for your dynamic broker patch.

@hachikuji hachikuji merged commit dd51d19 into apache:trunk Feb 8, 2018
hachikuji added a commit that referenced this pull request Feb 8, 2018
Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
private[kafka] val metricTags = mutable.LinkedHashMap(
"listener" -> listenerName.value,
"networkProcessor" -> id.toString
).asJava

newGauge("ResponseQueueSize",
Copy link
Contributor

@ijuma ijuma Feb 8, 2018

Choose a reason for hiding this comment

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

Doesn't this change the full metric name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you are right. I forgot about the type attribute. @rajinisivaram Maybe you can fix it in #4539?

Copy link
Contributor

Choose a reason for hiding this comment

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

@hachikuji I had forgotten too. Yes, I will update in #4539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants