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

Provide exception handler construction for MetricSensors #1569

Merged

Conversation

harryteng9527
Copy link
Collaborator

related #1509 (comment)

此 PR 想解決 SmoothWeightRoundRobinPartitioner 撈不到 localBean 的問題,這是因為在撈的過程發生 exception,導致同個節點的其他 cost 也跟著 exception 噴掉

原因

SmoothWeightRoundRobinPartitioner 目前預設使用的 cost function 有四種,分別是

  1. BrokerInputCost
  2. BrokerOutputCost
  3. CpuCost
  4. MemoryCost

而如果 local 端沒有 BrokerInput、BrokerOutput 的 metrics,mBean client 在撈回來的時候就會噴 exception,導致 CpuCost 與 MemoryCost 也跟著噴掉

目前版本

修改前

目前測試使用六台節點,因為都有開啟 Kafka server 所以都能正常拉取上述 metrics,而 Local 因為沒有 Broker 相關 metrics 所以跟著 exception 一起噴了

修改後

修改後

@harryteng9527 harryteng9527 requested a review from chia7712 March 15, 2023 09:40
Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

LGTM

@harryteng9527 harryteng9527 merged commit 94c1fdd into opensource4you:main Mar 19, 2023
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