Package org.apache.cassandra.db

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


        schema.purge(cfm);
        schema.setTableDefinition(ksm, newVersion);

        if (!StorageService.instance.isClientMode())
        {
            cfs.snapshot(Table.getTimestampedSnapshotName(cfs.columnFamily));

            CompactionManager.instance.getCompactionLock().lock();
            cfs.flushLock.lock();
            try
            {
View Full Code Here


            {
                ColumnFamilyStore cfs = Table.open(ksm.name, schema).getColumnFamilyStore(cfm.cfName);
                schema.purge(cfm);
                if (!StorageService.instance.isClientMode())
                {
                    cfs.snapshot(snapshotName);
                    cfs.flushLock.lock();
                    try
                    {
                        Table.open(ksm.name, schema).dropCf(cfm.cfId);
                    }
View Full Code Here

            case SNAPSHOT:
                logger.debug("Snapshotting {}", desc);
                ColumnFamilyStore cfs = Keyspace.open(desc.keyspace).getColumnFamilyStore(desc.columnFamily);
                final Range<Token> repairingRange = desc.range;
                Set<SSTableReader> snapshottedSSSTables = cfs.snapshot(desc.sessionId.toString(), new Predicate<SSTableReader>()
                {
                    public boolean apply(SSTableReader sstable)
                    {
                        return sstable != null &&
                               !(sstable.partitioner instanceof LocalPartitioner) && // exclude SSTables from 2i
View Full Code Here

    public void beforeApplyModels()
    {
        if (clientMode)
            return;
        ColumnFamilyStore cfs = Table.open(tableName).getColumnFamilyStore(cfName);
        cfs.snapshot(Table.getTimestampedSnapshotName(null));
    }

    @Override
    public void applyModels() throws IOException
    {
View Full Code Here

    public void beforeApplyModels()
    {
        if (clientMode)
            return;
        ColumnFamilyStore cfs = Table.open(oldCfm.tableName).getColumnFamilyStore(oldCfm.cfName);
        cfs.snapshot(Table.getTimestampedSnapshotName(null));
    }

    void applyModels() throws IOException
    {
        // all we really need to do is reload the cfstore.
View Full Code Here

                break;

            case SNAPSHOT:
                ColumnFamilyStore cfs = Keyspace.open(desc.keyspace).getColumnFamilyStore(desc.columnFamily);
                final Range<Token> repairingRange = desc.range;
                cfs.snapshot(desc.sessionId.toString(), new Predicate<SSTableReader>()
                {
                    public boolean apply(SSTableReader sstable)
                    {
                        return sstable != null && new Bounds<>(sstable.first.getToken(), sstable.last.getToken()).intersects(Collections.singleton(repairingRange));
                    }
View Full Code Here

        CFMetaData.purge(cfm);
        DatabaseDescriptor.setTableDefinition(ksm, newVersion);

        if (!StorageService.instance.isClientMode())
        {
            cfs.snapshot(Table.getTimestampedSnapshotName(null));

            CompactionManager.instance.getCompactionLock().lock();
            cfs.flushLock.lock();
            try
            {
View Full Code Here

            {
                ColumnFamilyStore cfs = Table.open(ksm.name).getColumnFamilyStore(cfm.cfName);
                CFMetaData.purge(cfm);
                if (!StorageService.instance.isClientMode())
                {
                    cfs.snapshot(snapshotName);
                    cfs.flushLock.lock();
                    try
                    {
                        Table.open(ksm.name).dropCf(cfm.cfId);
                    }
View Full Code Here

        CFMetaData.purge(cfm);
        DatabaseDescriptor.setTableDefinition(ksm, newVersion);

        if (!StorageService.instance.isClientMode())
        {
            cfs.snapshot(Table.getTimestampedSnapshotName(null));

            CompactionManager.instance.getCompactionLock().lock();
            cfs.flushLock.lock();
            try
            {
View Full Code Here

    public void beforeApplyModels()
    {
        if (clientMode)
            return;
        ColumnFamilyStore cfs = Table.open(tableName).getColumnFamilyStore(cfName);
        cfs.snapshot(Table.getTimestampedSnapshotName(null));
    }

    @Override
    public void applyModels() throws IOException
    {
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.