horizonzy commented on code in PR #3637:
URL: https://github.com/apache/bookkeeper/pull/3637#discussion_r1098258278
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java:
##########
@@ -341,155 +153,48 @@ public Auditor(final String bookieIdentifier,
StatsLogger statsLogger)
throws UnavailableException {
this.conf = conf;
- this.underreplicatedLedgerRecoveryGracePeriod =
conf.getUnderreplicatedLedgerRecoveryGracePeriod();
- this.zkOpTimeoutMs = conf.getZkTimeout() * 2;
this.bookieIdentifier = bookieIdentifier;
- this.statsLogger = statsLogger;
- this.numOfLedgersFoundNotAdheringInPlacementPolicyCheck = new
AtomicInteger(0);
- this.ledgersNotAdheringToPlacementPolicyGuageValue = new
AtomicInteger(0);
- this.numOfLedgersFoundSoftlyAdheringInPlacementPolicyCheck = new
AtomicInteger(0);
- this.ledgersSoftlyAdheringToPlacementPolicyGuageValue = new
AtomicInteger(0);
- this.numOfClosedLedgersAuditedInPlacementPolicyCheck = new
AtomicInteger(0);
- this.numOfURLedgersElapsedRecoveryGracePeriod = new AtomicInteger(0);
- this.numOfURLedgersElapsedRecoveryGracePeriodGuageValue = new
AtomicInteger(0);
- this.numLedgersHavingNoReplicaOfAnEntryGuageValue = new
AtomicInteger(0);
- this.numLedgersFoundHavingNoReplicaOfAnEntry = new AtomicInteger(0);
- this.numLedgersHavingLessThanAQReplicasOfAnEntryGuageValue = new
AtomicInteger(0);
- this.numLedgersFoundHavingLessThanAQReplicasOfAnEntry = new
AtomicInteger(0);
- this.numLedgersHavingLessThanWQReplicasOfAnEntryGuageValue = new
AtomicInteger(0);
- this.numLedgersFoundHavingLessThanWQReplicasOfAnEntry = new
AtomicInteger(0);
+ this.auditorStats = new AuditorStats(statsLogger);
if (conf.getAuditorMaxNumberOfConcurrentOpenLedgerOperations() <= 0) {
Review Comment:
Suggest moving the check logic in the AuditorCheckAllLedgersTask
construction.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]