Examples of DropKeyspace


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

        logger.debug("drop_keyspace");
        state().hasKeyspaceListAccess(Permission.WRITE);
       
        try
        {
            applyMigrationOnStage(new DropKeyspace(keyspace));
            return DatabaseDescriptor.getDefsVersion().toString();
        }
        catch (ConfigurationException e)
        {
            InvalidRequestException ex = new InvalidRequestException(e.getMessage());
View Full Code Here

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

        if (!(DatabaseDescriptor.getAuthenticator() instanceof AllowAllAuthenticator))
            throw newInvalidRequestException("Unable to create new keyspace while authentication is enabled.");
       
        try
        {
            applyMigrationOnStage(new DropKeyspace(keyspace.toString()));
            return DatabaseDescriptor.getDefsVersion().toString();
        }
        catch (ConfigurationException e)
        {
            throw newInvalidRequestException(e);
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

        ColumnFamilyStore store = Table.open(cfm.ksName).getColumnFamilyStore(cfm.cfName);
        assert store != null;
        store.forceBlockingFlush();
        assert DefsTable.getFiles(cfm.ksName, 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 DefsTable.getFiles(cfm.ksName, 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 DefsTable.getFiles(cfm.ksName, cfm.cfName).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

        ColumnFamilyStore store = Table.open(cfm.ksName).getColumnFamilyStore(cfm.cfName);
        assert store != null;
        store.forceBlockingFlush();
        assert DefsTable.getFiles(cfm.ksName, 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
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.