Examples of forceBlockingFlush()


Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        cfs.forceBlockingFlush();
        Collection<SSTableReader> sstablesIncomplete = cfs.getSSTables();
        rm = new RowMutation(TABLE2, key1.key);
        rm.add(new QueryPath(cfName, null, ByteBufferUtil.bytes(String.valueOf(5))), ByteBufferUtil.EMPTY_BYTE_BUFFER, 2);
        rm.apply();
        cfs.forceBlockingFlush();
        cfs.getCompactionStrategy().getUserDefinedTask(sstablesIncomplete, Integer.MAX_VALUE).execute(null);

        // verify that minor compaction does GC when key is provably not
        // present in a non-compacted sstable
        ColumnFamily cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key2, new QueryPath(cfName)));
View Full Code Here

Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        // inserts
        rm = new RowMutation(TABLE2, key3.key);
        rm.add(new QueryPath(cfName, null, ByteBufferUtil.bytes("c1")), ByteBufferUtil.EMPTY_BYTE_BUFFER, 8);
        rm.add(new QueryPath(cfName, null, ByteBufferUtil.bytes("c2")), ByteBufferUtil.EMPTY_BYTE_BUFFER, 8);
        rm.apply();
        cfs.forceBlockingFlush();
        // deletes
        rm = new RowMutation(TABLE2, key3.key);
        rm.delete(new QueryPath(cfName, null, ByteBufferUtil.bytes("c1")), 10);
        rm.apply();
        cfs.forceBlockingFlush();
View Full Code Here

Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        cfs.forceBlockingFlush();
        // deletes
        rm = new RowMutation(TABLE2, key3.key);
        rm.delete(new QueryPath(cfName, null, ByteBufferUtil.bytes("c1")), 10);
        rm.apply();
        cfs.forceBlockingFlush();
        Collection<SSTableReader> sstablesIncomplete = cfs.getSSTables();

        // delete so we have new delete in a diffrent SST.
        rm = new RowMutation(TABLE2, key3.key);
        rm.delete(new QueryPath(cfName, null, ByteBufferUtil.bytes("c2")), 9);
View Full Code Here

Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        // delete so we have new delete in a diffrent SST.
        rm = new RowMutation(TABLE2, key3.key);
        rm.delete(new QueryPath(cfName, null, ByteBufferUtil.bytes("c2")), 9);
        rm.apply();
        cfs.forceBlockingFlush();
        cfs.getCompactionStrategy().getUserDefinedTask(sstablesIncomplete, Integer.MAX_VALUE).execute(null);

        ColumnFamily cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key3, new QueryPath(cfName)));
        Assert.assertTrue(!cf.getColumn(ByteBufferUtil.bytes("c2")).isLive());
        Assert.assertEquals(2, cf.getColumnCount());
View Full Code Here

Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        {
            rm = new RowMutation(TABLE1, key.key);
            rm.delete(new QueryPath(cfName, null, ByteBufferUtil.bytes(String.valueOf(i))), 1);
            rm.apply();
        }
        cfs.forceBlockingFlush();
        assert cfs.getSSTables().size() == 1 : cfs.getSSTables(); // inserts & deletes were in the same memtable -> only deletes in sstable

        // compact and test that the row is completely gone
        Util.compactAll(cfs).get();
        assert cfs.getSSTables().isEmpty();
View Full Code Here

Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        rm = new RowMutation(tableName, key.key);
        rm.delete(new QueryPath(cfName, null, null), 1);
        rm.apply();

        // flush and major compact
        cfs.forceBlockingFlush();
        Util.compactAll(cfs).get();

        // re-inserts with timestamp lower than delete
        rm = new RowMutation(tableName, key.key);
        for (int i = 0; i < 10; i++)
View Full Code Here

Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        rm = new RowMutation(tableName, key.key);
        rm.delete(new QueryPath(cfName, null, null), 4);
        rm.apply();

        // flush and major compact (with tombstone purging)
        cfs.forceBlockingFlush();
        Util.compactAll(cfs).get();

        // re-inserts with timestamp lower than delete
        rm = new RowMutation(tableName, key.key);
        for (int i = 0; i < 5; i++)
View Full Code Here

Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        rm = new RowMutation(tableName, key.key);
        rm.delete(new QueryPath(cfName, scName, null), 4);
        rm.apply();

        // flush and major compact
        cfs.forceBlockingFlush();
        Util.compactAll(cfs).get();

        // re-inserts with timestamp lower than delete
        rm = new RowMutation(tableName, key.key);
        for (int i = 0; i < 5; i++)
View Full Code Here

Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        ByteBuffer key = ByteBufferUtil.bytes("k");
        RowMutation rm = new RowMutation("Keyspace1", key);
        rm.add(new QueryPath("Standard1", null, ByteBufferUtil.bytes("c")), ByteBufferUtil.EMPTY_BYTE_BUFFER, 0);
        rm.apply();
        cfs.forceBlockingFlush();

        assertBytes(cfs, Integer.MAX_VALUE, true);
    }

    @Test
View Full Code Here

Examples of org.apache.cassandra.db.ColumnFamilyStore.forceBlockingFlush()

        ByteBuffer key =ByteBuffer.wrap( "k".getBytes() );
        RowMutation rm = new RowMutation("Keyspace1", key);
        rm.add(new QueryPath("Standard1", null, ByteBufferUtil.bytes("c")), ByteBufferUtil.EMPTY_BYTE_BUFFER, 0);
        rm.add(new QueryPath("Standard1", null, ByteBufferUtil.bytes("d")), ByteBufferUtil.EMPTY_BYTE_BUFFER, 0);
        rm.apply();
        cfs.forceBlockingFlush();

        assertBytes(cfs, Integer.MAX_VALUE, true);
    }

    @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.