-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Offloaders: fix metrics #16405
Offloaders: fix metrics #16405
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/LedgerOffloaderStatsImpl.java
Show resolved
Hide resolved
ping @tjiuming @zymap @horizonzy, Please help take a look at this pr, thanks. |
import org.apache.bookkeeper.mledger.LedgerOffloaderStats; | ||
import org.apache.commons.lang3.StringUtils; | ||
import org.apache.commons.lang3.tuple.ImmutablePair; | ||
import org.apache.commons.lang3.tuple.Pair; | ||
import org.apache.pulsar.common.naming.TopicName; | ||
|
||
@Slf4j |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. removed
- pass the Scheduler for periodic calculations - add raw brk_ledgeroffloader_read_bytes counter - fix read latency from JClouds calculation
caf6868
to
430ec7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
OffloadPoliciesImpl.create(this.getConfiguration().getProperties())); | ||
OffloadPoliciesImpl defaultOffloadPolicies = | ||
OffloadPoliciesImpl.create(this.getConfiguration().getProperties()); | ||
this.defaultOffloader = createManagedLedgerOffloader(defaultOffloadPolicies); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make
this.defaultOffloader = createManagedLedgerOffloader(defaultOffloadPolicies);
after
offloaderStats = LedgerOffloaderStats.create(config.isExposeManagedLedgerMetricsInPrometheus(),
exposeTopicMetrics, offloaderScheduler, interval);
In createManagedLedgerOffloader
, it will use offloaderStats
. We shuold make this method after offloaderStats
override.
@codelipenghui @nicoloboschi @Technoboy- the error in the test (broker group 1) is unrelated to this patch
|
/pulsarbot rerun-failure-checks |
Motivation
There are a few problems with Offloader metrics:
Modifications
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.