src/java/org/apache/cassandra/service/StorageService.java
/**
     * Flushes the two largest memtables by ops and by throughput
     */
Flushes the two largest memtables by ops and by throughput
Flushes the two largest memtables by ops and by throughput
public void flushLargestMemtables()
    {
        ColumnFamilyStore largest = null;
        for (ColumnFamilyStore cfs : ColumnFamilyStore.all())
        {
            long total = cfs.getTotalMemtableLiveSize();
            if (total > 0 && (largest == null || total > largest.getTotalMemtableLiveSize()))
            {
                logger_.debug(total + " estimated memtable size for " + cfs);
                largest = cfs;
            }
        }
        if (largest == null)
        {
            logger_.info("Unable to reduce heap usage since there are no dirty column families");
            return;
        }
        logger_.warn("Flushing " + largest + " to relieve memory pressure");
        largest.forceFlush();
    }
public void flushLargestMemtables ( ) { ColumnFamilyStore largest = null ; for ( ColumnFamilyStore cfs : ColumnFamilyStore . all ( ) ) { long total = cfs . getTotalMemtableLiveSize ( ) ; if ( total > 0 && ( largest == null || total > largest . getTotalMemtableLiveSize ( ) ) ) { logger_ . debug ( total + " estimated memtable size for " + cfs ) ; largest = cfs ; } } if ( largest == null ) { logger_ . info ( "Unable to reduce heap usage since there are no dirty column families" ) ; return ; } logger_ . warn ( "Flushing " + largest + " to relieve memory pressure" ) ; largest . forceFlush ( ) ; }
Flushes the two largest memtables by ops and by throughput
Flushes the two largest memtables by ops and by throughput