Package org.apache.cassandra.db.composites

Examples of org.apache.cassandra.db.composites.Composite.end()


        Mutation mutation = new Mutation(Keyspace.SYSTEM_KS, SystemKeyspace.getSchemaKSKey(ksName));
        ColumnFamily cf = mutation.addOrGet(SchemaColumnFamiliesCf);
        int ldt = (int) (System.currentTimeMillis() / 1000);

        Composite prefix = SchemaColumnFamiliesCf.comparator.make(cfName);
        cf.addAtom(new RangeTombstone(prefix, prefix.end(), timestamp, ldt));

        for (ColumnDefinition cd : allColumns())
            cd.deleteFromSchema(mutation, timestamp);

        for (TriggerDefinition td : triggers.values())
View Full Code Here


        Mutation mutation = new Mutation(Keyspace.SYSTEM_KS, SystemKeyspace.getSchemaKSKey(ksName));
        ColumnFamily cf = mutation.addOrGet(SchemaColumnFamiliesCf);
        int ldt = (int) (System.currentTimeMillis() / 1000);

        Composite prefix = SchemaColumnFamiliesCf.comparator.make(cfName);
        cf.addAtom(new RangeTombstone(prefix, prefix.end(), timestamp, ldt));

        for (ColumnDefinition cd : allColumns())
            cd.deleteFromSchema(mutation, timestamp);

        for (TriggerDefinition td : triggers.values())
View Full Code Here

        }
        else
        {
            prefix = index.getIndexComparator().make(key);
        }
        return isStart ? prefix.start() : prefix.end();
    }

    private ColumnFamilyStore.AbstractScanIterator getIndexedIterator(final ExtendedFilter filter)
    {
        // Start with the most-restrictive indexed clause, then apply remaining clauses
View Full Code Here

        DecoratedKey key = StorageService.getPartitioner().decorateKey(getSchemaKSKey(ksName));
        ColumnFamilyStore schemaCFS = SystemKeyspace.schemaCFS(schemaCfName);
        Composite prefix = schemaCFS.getComparator().make(cfName);
        ColumnFamily cf = schemaCFS.getColumnFamily(key,
                                                    prefix,
                                                    prefix.end(),
                                                    false,
                                                    Integer.MAX_VALUE,
                                                    System.currentTimeMillis());
        return new Row(key, cf);
    }
View Full Code Here

        Mutation mutation = new Mutation(Keyspace.SYSTEM_KS, SystemKeyspace.getSchemaKSKey(droppedType.keyspace));
        ColumnFamily cf = mutation.addOrGet(SystemKeyspace.SCHEMA_USER_TYPES_CF);
        int ldt = (int) (System.currentTimeMillis() / 1000);

        Composite prefix = CFMetaData.SchemaUserTypesCf.comparator.make(droppedType.name);
        cf.addAtom(new RangeTombstone(prefix, prefix.end(), timestamp, ldt));

        return mutation;
    }

    public UserType getType(ByteBuffer typeName)
View Full Code Here

        ColumnFamily cf = mutation.addOrGet(CFMetaData.SchemaColumnsCf);
        int ldt = (int) (System.currentTimeMillis() / 1000);

        // Note: we do want to use name.toString(), not name.bytes directly for backward compatibility (For CQL3, this won't make a difference).
        Composite prefix = CFMetaData.SchemaColumnsCf.comparator.make(cfName, name.toString());
        cf.addAtom(new RangeTombstone(prefix, prefix.end(), timestamp, ldt));
    }

    public void toSchema(Mutation mutation, long timestamp)
    {
        ColumnFamily cf = mutation.addOrGet(CFMetaData.SchemaColumnsCf);
View Full Code Here

    public CFRowAdder resetCollection(String cql3ColumnName)
    {
        ColumnDefinition def = getDefinition(cql3ColumnName);
        assert def.type.isCollection();
        Composite name = cf.getComparator().create(prefix, def.name);
        cf.addAtom(new RangeTombstone(name.start(), name.end(), timestamp - 1, ldt));
        return this;
    }

    public CFRowAdder addMapEntry(String cql3ColumnName, Object key, Object value)
    {
View Full Code Here

        DecoratedKey key = StorageService.getPartitioner().decorateKey(getSchemaKSKey(ksName));
        ColumnFamilyStore schemaCFS = SystemKeyspace.schemaCFS(schemaCfName);
        Composite prefix = schemaCFS.getComparator().make(cfName);
        ColumnFamily cf = schemaCFS.getColumnFamily(key,
                                                    prefix,
                                                    prefix.end(),
                                                    false,
                                                    Integer.MAX_VALUE,
                                                    System.currentTimeMillis());
        return new Row(key, cf);
    }
View Full Code Here

        ColumnFamily cf = mutation.addOrGet(CFMetaData.SchemaColumnsCf);
        int ldt = (int) (System.currentTimeMillis() / 1000);

        // Note: we do want to use name.toString(), not name.bytes directly for backward compatibility (For CQL3, this won't make a difference).
        Composite prefix = CFMetaData.SchemaColumnsCf.comparator.make(cfName, name.toString());
        cf.addAtom(new RangeTombstone(prefix, prefix.end(), timestamp, ldt));
    }

    public void toSchema(Mutation mutation, long timestamp)
    {
        ColumnFamily cf = mutation.addOrGet(CFMetaData.SchemaColumnsCf);
View Full Code Here

        }
        else
        {
            prefix = index.getIndexComparator().make(key);
        }
        return isStart ? prefix.start() : prefix.end();
    }

    private ColumnFamilyStore.AbstractScanIterator getIndexedIterator(final OpOrder.Group writeOp, final ExtendedFilter filter, final IndexExpression primary, final CompositesIndex index)
    {
        // Start with the most-restrictive indexed clause, then apply remaining clauses
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.