src/java/org/apache/cassandra/db/ColumnFamilyStore.java
/**
     * Insert/Update the column family for this key.
     * Caller is responsible for acquiring Table.flusherLock!
     * param @ lock - lock that needs to be used.
     * param @ key - key for update/insert
     * param @ columnFamily - columnFamily changes
     */
Insert/Update the column family for this key.
Caller is responsible for acquiring Table.flusherLock.
param @ lock - lock that needs to be used.
param @ key - key for update/insert
param @ columnFamily - columnFamily changes
Insert / Update the column family for this key . Caller is responsible for acquiring Table . flusherLock . param @ lock - lock that needs to be used . param @ key - key for update / insert param @ columnFamily - columnFamily changes
public void apply(DecoratedKey key, ColumnFamily columnFamily)
    {
        long start = System.nanoTime();
        Memtable mt = getMemtableThreadSafe();
        mt.put(key, columnFamily);
        updateRowCache(key, columnFamily);
        writeStats.addNano(System.nanoTime() - start);
        while (true)
        {
            long last = liveRatioComputedAt.get();
            long operations = writeStats.getOpCount();
            if (operations < 2 * last)
                break;
            if (liveRatioComputedAt.compareAndSet(last, operations))
            {
                logger.debug("computing liveRatio of {} at {} ops", this, operations);
                mt.updateLiveRatio();
            }
        }
    }
public void apply ( DecoratedKey key , ColumnFamily columnFamily ) { long start = System . nanoTime ( ) ; Memtable mt = getMemtableThreadSafe ( ) ; mt . put ( key , columnFamily ) ; updateRowCache ( key , columnFamily ) ; writeStats . addNano ( System . nanoTime ( ) - start ) ; while ( true ) { long last = liveRatioComputedAt . get ( ) ; long operations = writeStats . getOpCount ( ) ; if ( operations < 2 * last ) break ; if ( liveRatioComputedAt . compareAndSet ( last , operations ) ) { logger . debug ( "computing liveRatio of {} at {} ops" , this , operations ) ; mt . updateLiveRatio ( ) ; } } }
Insert/Update the column family for this key.
Insert / Update the column family for this key .
// recompute liveRatio, if we have doubled the number of ops since last calculated