Examples of DropKeyspace


Examples of org.apache.cassandra.db.migration.DropKeyspace

        ColumnFamilyStore store = Table.open(cfm.tableName).getColumnFamilyStore(cfm.cfName);
        assert store != null;
        store.forceBlockingFlush();
        assert DefsTable.getFiles(cfm.tableName, cfm.cfName).size() > 0;
       
        new DropKeyspace(ks.name).apply();
       
        assert DatabaseDescriptor.getTableDefinition(ks.name) == null;
       
        // write should fail.
        rm = new RowMutation(ks.name, dk.key);
View Full Code Here

Examples of org.apache.cassandra.db.migration.DropKeyspace

        RowMutation rm = new RowMutation(ks.name, dk.key);
        for (int i = 0; i < 100; i++)
            rm.add(new QueryPath(cfm.cfName, null, ByteBufferUtil.bytes(("col" + i))), ByteBufferUtil.bytes("anyvalue"), 1L);
        rm.apply();

        new DropKeyspace(ks.name).apply();

        assert DatabaseDescriptor.getTableDefinition(ks.name) == null;
    }
View Full Code Here

Examples of org.apache.cassandra.db.migration.DropKeyspace

        ColumnFamilyStore store = Table.open(cfm.ksName).getColumnFamilyStore(cfm.cfName);
        assert store != null;
        store.forceBlockingFlush();
        assert store.directories.sstableLister().list().size() > 0;
       
        new DropKeyspace(ks.name).apply();

        assert Schema.instance.getTableDefinition(ks.name) == null;
       
        // write should fail.
        rm = new RowMutation(ks.name, dk.key);
View Full Code Here

Examples of org.apache.cassandra.db.migration.DropKeyspace

        RowMutation rm = new RowMutation(ks.name, dk.key);
        for (int i = 0; i < 100; i++)
            rm.add(new QueryPath(cfm.cfName, null, ByteBufferUtil.bytes(("col" + i))), ByteBufferUtil.bytes("anyvalue"), 1L);
        rm.apply();

        new DropKeyspace(ks.name).apply();

        assert Schema.instance.getTableDefinition(ks.name) == null;
    }
View Full Code Here

Examples of org.apache.cassandra.db.migration.DropKeyspace

        ThriftValidation.validateKeyspaceNotSystem(keyspace);
    }

    public Migration getMigration() throws ConfigurationException, IOException
    {
        return new DropKeyspace(keyspace);
    }
View Full Code Here

Examples of org.apache.cassandra.db.migration.DropKeyspace

        ColumnFamilyStore store = Table.open(cfm.tableName).getColumnFamilyStore(cfm.cfName);
        assert store != null;
        store.forceBlockingFlush();
        assert DefsTable.getFiles(cfm.tableName, cfm.cfName).size() > 0;
       
        new DropKeyspace(ks.name).apply();
       
        assert DatabaseDescriptor.getTableDefinition(ks.name) == null;
       
        // write should fail.
        rm = new RowMutation(ks.name, dk.key);
View Full Code Here

Examples of org.apache.cassandra.db.migration.DropKeyspace

        RowMutation rm = new RowMutation(ks.name, dk.key);
        for (int i = 0; i < 100; i++)
            rm.add(new QueryPath(cfm.cfName, null, ByteBufferUtil.bytes(("col" + i))), ByteBufferUtil.bytes("anyvalue"), 1L);
        rm.apply();

        new DropKeyspace(ks.name).apply();

        assert DatabaseDescriptor.getTableDefinition(ks.name) == null;
    }
View Full Code Here

Examples of org.apache.cassandra.db.migration.DropKeyspace

        ColumnFamilyStore store = Table.open(cfm.tableName).getColumnFamilyStore(cfm.cfName);
        assert store != null;
        store.forceBlockingFlush();
        assert DefsTable.getFiles(cfm.tableName, cfm.cfName).size() > 0;
       
        new DropKeyspace(ks.name).apply();
       
        assert DatabaseDescriptor.getTableDefinition(ks.name) == null;
       
        // write should fail.
        rm = new RowMutation(ks.name, dk.key);
View Full Code Here

Examples of org.apache.cassandra.db.migration.DropKeyspace

        RowMutation rm = new RowMutation(ks.name, dk.key);
        for (int i = 0; i < 100; i++)
            rm.add(new QueryPath(cfm.cfName, null, ByteBufferUtil.bytes(("col" + i))), ByteBufferUtil.bytes("anyvalue"), 1L);
        rm.apply();

        new DropKeyspace(ks.name).apply();

        assert DatabaseDescriptor.getTableDefinition(ks.name) == null;
    }
View Full Code Here

Examples of org.apache.cassandra.db.migration.DropKeyspace

                clientState.hasKeyspaceListAccess(Permission.WRITE);
                validateSchemaAgreement();
               
                try
                {
                    applyMigrationOnStage(new DropKeyspace(deleteKeyspace));
                }
                catch (ConfigurationException e)
                {
                    InvalidRequestException ex = new InvalidRequestException(e.getMessage());
                    ex.initCause(e);
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.