public void raiseAlert(String msg, Object... args) { alertStatsLogger.raise(msg, args); }
private BKLogSegmentWriter createLogSegmentWriter(DistributedLogConfiguration conf, long logSegmentSequenceNumber, long startTxId, ZKDistributedLock lock) throws Exception { LedgerHandle lh = bkc.get().createLedger(3, 2, 2, BookKeeper.DigestType.CRC32, conf.getBKDigestPW().getBytes(UTF_8)); return new BKLogSegmentWriter( runtime.getMethodName(), runtime.getMethodName(), conf, LogSegmentMetadata.LEDGER_METADATA_CURRENT_LAYOUT_VERSION, new BKLogSegmentEntryWriter(lh), lock, startTxId, logSegmentSequenceNumber, scheduler, NullStatsLogger.INSTANCE, NullStatsLogger.INSTANCE, new AlertStatsLogger(NullStatsLogger.INSTANCE, "test"), PermitLimiter.NULL_PERMIT_LIMITER, new SettableFeatureProvider("", 0), ConfUtils.getConstDynConf(conf)); }
/** * Report an alertable condition". Prefixes "ALERT!: " if not already prefixed. */ public void raise(String msg, Object... args) { initializeCountersIfNeeded(); globalCounter.inc(); if (null != scopedCounter) { scopedCounter.inc(); } logger.error(format(msg), args); logger.error("fake exception to generate stack trace", new Exception()); } }
this.alertStatsLogger = new AlertStatsLogger(this.perLogStatsLogger, "dl_alert"); this.readAheadExceptionsLogger = readAheadExceptionsLogger;
} catch (IOException e) { if (e instanceof InvalidEnvelopedEntryException) { alertStatsLogger.raise("Invalid enveloped entry for segment {} : ", fullyQualifiedLogSegment, e); alertStatsLogger.raise("Invalid enveloped entry for segment {} : ", fullyQualifiedLogSegment, e); throw (InvalidEnvelopedEntryException) e; } else {
this.alertStatsLogger = new AlertStatsLogger(this.perLogStatsLogger, "dl_alert"); this.resourcesCloseable = resourcesCloseable;
alertStatsLogger.raise("Unexpected last entry id during read ahead; {} , {}", currentMetadata, lastAddConfirmed); gapDetected = true; alertStatsLogger.raise("Unexpected condition during read ahead; {} , {}", currentMetadata, oldMetadata); setReadAheadError(tracker); if (currentMetadata.isTruncated()) { if (conf.getAlertWhenPositioningOnTruncated()) { alertStatsLogger.raise("Trying to position reader on the log segment that is marked truncated : {}", currentMetadata);
(l.getMinActiveDLSN().compareTo(nextReadDLSN) > 0)) { if (conf.getAlertWhenPositioningOnTruncated()) { alertStatsLogger.raise("Trying to position reader on {} when {} is marked partially truncated", nextReadAheadPosition, l); alertStatsLogger.raise("Trying to position reader on {} when {} is marked truncated", nextReadAheadPosition, l);
alertStatsLogger.raise("Found invalid enveloped entry on stream {} : ", streamName, ieee); setLastException(ieee); } catch (IOException exc) {
public void raiseAlert(String msg, Object... args) { alertStatsLogger.raise(msg, args); }
} catch (IOException e) { if (e instanceof InvalidEnvelopedEntryException) { alertStatsLogger.raise("Invalid enveloped entry for segment {} : ", fullyQualifiedLogSegment, e); alertStatsLogger.raise("Invalid enveloped entry for segment {} : ", fullyQualifiedLogSegment, e); throw (InvalidEnvelopedEntryException) e; } else {
&& segment.getMinActiveDLSN().compareTo(fromDLSN) > 0) { if (conf.getAlertWhenPositioningOnTruncated()) { alertStatsLogger.raise("Trying to position reader on {} when {} is marked partially truncated", fromDLSN, segment);