APISonar


org.apache.cassandra.utils.NoSpamLogger.log

> org > apache > cassandra > utils > NoSpamLogger > log
org APIs apache APIs cassandra APIs utils APIs NoSpamLogger APIs log APIs

Example 1
private void throwIfForbidden(Mutation mutation, CommitLogSegment segment) throws CDCWriteException
    {
        if (mutation.trackedByCDC() && segment.getCDCState() == CDCState.FORBIDDEN)
        {
            cdcSizeTracker.submitOverflowSizeRecalculation();
            String logMsg = String.format("Rejecting mutation to keyspace %s. Free up space in %s by processing CDC logs.",
                mutation.getKeyspaceName(), DatabaseDescriptor.getCDCLogLocation());
            NoSpamLogger.log(logger,
                             NoSpamLogger.Level.WARN,
                             10,
                             TimeUnit.SECONDS,
                             logMsg);
            throw new CDCWriteException(logMsg);
        }
    }