Examples of UpdateColumnFamily


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

        cf_def.min_compaction_threshold = 5;
        cf_def.max_compaction_threshold = 31;
       
        // test valid operations.
        cf_def.comment = "Modified comment";
        new UpdateColumnFamily(cf_def).apply(); // doesn't get set back here.
       
        cf_def.row_cache_size = 2d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.key_cache_size = 3d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.read_repair_chance = 0.23;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.gc_grace_seconds = 12;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.default_validation_class = "UTF8Type";
        new UpdateColumnFamily(cf_def).apply();

        cf_def.min_compaction_threshold = 3;
        new UpdateColumnFamily(cf_def).apply();

        cf_def.max_compaction_threshold = 33;
        new UpdateColumnFamily(cf_def).apply();

        // can't test changing the reconciler because there is only one impl.
       
        // check the cumulative affect.
        assert DatabaseDescriptor.getCFMetaData(cf.ksName, cf.cfName).getComment().equals(cf_def.comment);
View Full Code Here

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

        cf_def.min_compaction_threshold = 5;
        cf_def.max_compaction_threshold = 31;
       
        // test valid operations.
        cf_def.comment = "Modified comment";
        new UpdateColumnFamily(cf_def).apply(); // doesn't get set back here.
       
        cf_def.row_cache_size = 2d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.key_cache_size = 3d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.read_repair_chance = 0.23;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.gc_grace_seconds = 12;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.default_validation_class = "UTF8Type";
        new UpdateColumnFamily(cf_def).apply();

        cf_def.min_compaction_threshold = 3;
        new UpdateColumnFamily(cf_def).apply();

        cf_def.max_compaction_threshold = 33;
        new UpdateColumnFamily(cf_def).apply();

        // can't test changing the reconciler because there is only one impl.
       
        // check the cumulative affect.
        assert DatabaseDescriptor.getCFMetaData(cf.tableName, cf.cfName).getComment().equals(cf_def.comment);
View Full Code Here

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

            throw newInvalidRequestException("Could not find column family definition to modify.");
       
        try
        {
            oldCfm.apply(cf_def);
            UpdateColumnFamily update = new UpdateColumnFamily(cf_def);
            applyMigrationOnStage(update);
            return DatabaseDescriptor.getDefsVersion().toString();
        }
        catch (ConfigurationException e)
        {
View Full Code Here

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

        cf_def.min_compaction_threshold = 5;
        cf_def.max_compaction_threshold = 31;
       
        // test valid operations.
        cf_def.comment = "Modified comment";
        new UpdateColumnFamily(cf_def).apply(); // doesn't get set back here.
       
        cf_def.row_cache_size = 2d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.key_cache_size = 3d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.read_repair_chance = 0.23;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.gc_grace_seconds = 12;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.default_validation_class = "UTF8Type";
        new UpdateColumnFamily(cf_def).apply();

        cf_def.min_compaction_threshold = 3;
        new UpdateColumnFamily(cf_def).apply();

        cf_def.max_compaction_threshold = 33;
        new UpdateColumnFamily(cf_def).apply();

        // can't test changing the reconciler because there is only one impl.
       
        // check the cumulative affect.
        assert DatabaseDescriptor.getCFMetaData(cf.tableName, cf.cfName).getComment().equals(cf_def.comment);
View Full Code Here

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

       
        try
        {
            // ideally, apply() would happen on the stage with the
            CFMetaData.applyImplicitDefaults(cf_def);
            UpdateColumnFamily update = new UpdateColumnFamily(CFMetaData.convertToAvro(cf_def));
            applyMigrationOnStage(update);
            return DatabaseDescriptor.getDefsVersion().toString();
        }
        catch (ConfigurationException e)
        {
View Full Code Here

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

        cf_def.min_compaction_threshold = 5;
        cf_def.max_compaction_threshold = 31;
       
        // test valid operations.
        cf_def.comment = "Modified comment";
        new UpdateColumnFamily(cf_def).apply(); // doesn't get set back here.
       
        cf_def.row_cache_size = 2d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.key_cache_size = 3d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.read_repair_chance = 0.23;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.gc_grace_seconds = 12;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.default_validation_class = "UTF8Type";
        new UpdateColumnFamily(cf_def).apply();

        cf_def.min_compaction_threshold = 3;
        new UpdateColumnFamily(cf_def).apply();

        cf_def.max_compaction_threshold = 33;
        new UpdateColumnFamily(cf_def).apply();

        // can't test changing the reconciler because there is only one impl.
       
        // check the cumulative affect.
        assert Schema.instance.getCFMetaData(cf.ksName, cf.cfName).getComment().equals(cf_def.comment);
View Full Code Here

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

        // drop the index
        CFMetaData meta = CFMetaData.rename(cfs.metadata, cfs.metadata.cfName); // abusing rename to clone
        ColumnDefinition cdOld = meta.getColumn_metadata().values().iterator().next();
        ColumnDefinition cdNew = new ColumnDefinition(cdOld.name, cdOld.getValidator(), null, null, null);
        meta.columnMetadata(Collections.singletonMap(cdOld.name, cdNew));
        UpdateColumnFamily update = new UpdateColumnFamily(meta.toAvro());
        update.apply();

        // check
        assert cfs.indexManager.getIndexedColumns().isEmpty();
        SSTableDeletingTask.waitForDeletions();
        assert !new File(desc.filenameFor(Component.DATA)).exists();
View Full Code Here

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

        }

        if (cfDef == null)
            throw new InvalidRequestException("Index '" + index + "' could not be found in any of the ColumnFamilies of keyspace '" + keyspace + "'");

        return new UpdateColumnFamily(cfDef);
    }
View Full Code Here

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

        }

        if (cfDef == null)
            throw new InvalidRequestException("Index '" + index + "' could not be found in any of the ColumnFamilies of keyspace '" + keyspace + "'");

        return new UpdateColumnFamily(cfDef);
    }
View Full Code Here

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

        cf_def.min_compaction_threshold = 5;
        cf_def.max_compaction_threshold = 31;
       
        // test valid operations.
        cf_def.comment = "Modified comment";
        new UpdateColumnFamily(cf_def).apply(); // doesn't get set back here.
       
        cf_def.row_cache_size = 2d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.key_cache_size = 3d;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.read_repair_chance = 0.23;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.gc_grace_seconds = 12;
        new UpdateColumnFamily(cf_def).apply();
       
        cf_def.default_validation_class = "UTF8Type";
        new UpdateColumnFamily(cf_def).apply();

        cf_def.min_compaction_threshold = 3;
        new UpdateColumnFamily(cf_def).apply();

        cf_def.max_compaction_threshold = 33;
        new UpdateColumnFamily(cf_def).apply();

        // can't test changing the reconciler because there is only one impl.
       
        // check the cumulative affect.
        assert DatabaseDescriptor.getCFMetaData(cf.ksName, cf.cfName).getComment().equals(cf_def.comment);
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.