Package org.apache.cassandra.db.composites

Examples of org.apache.cassandra.db.composites.CellName


                         ? rowKey
                         : ((CompositeType)data.metadata().getKeyValidator()).split(rowKey)[def.position()];
                case CLUSTERING_COLUMN:
                    return prefix.get(def.position());
                case REGULAR:
                    CellName cname = prefix == null
                                   ? data.getComparator().cellFromByteBuffer(def.name.bytes)
                                   : data.getComparator().create(prefix, def);

                    Cell cell = data.getColumn(cname);
                    return cell == null ? null : cell.value();
View Full Code Here


    public boolean isFullyCoveredBy(ColumnFamily cf, long now)
    {
        // cf will cover all the requested columns if the range it covers include
        // all said columns
        CellName first = cf.iterator(ColumnSlice.ALL_COLUMNS_ARRAY).next().name();
        CellName last = cf.reverseIterator(ColumnSlice.ALL_COLUMNS_ARRAY).next().name();

        return cf.getComparator().compare(first, columns.first()) <= 0
            && cf.getComparator().compare(columns.last(), last) <= 0;
    }
View Full Code Here

            protected RangeTombstone computeNext()
            {
                while (names.hasNext())
                {
                    CellName next = names.next();
                    if (lastFindRange != null && lastFindRange.includes(source.getComparator(), next))
                        return lastFindRange;

                    // We keep the last range around as since names are in sort order, it's
                    // possible it will match the next name too.
View Full Code Here

        protected OnDiskAtom computeNext()
        {
            while (iter.hasNext())
            {
                CellName current = iter.next();
                Cell cell = cf.getColumn(current);
                if (cell != null)
                    return cell;
            }
            return endOfData();
View Full Code Here

            return false;

        Composite low = isReversed() ? finish() : start();
        Composite high = isReversed() ? start() : finish();

        CellName first = cf.iterator(ColumnSlice.ALL_COLUMNS_ARRAY).next().name();
        CellName last = cf.reverseIterator(ColumnSlice.ALL_COLUMNS_ARRAY).next().name();

        return cf.getComparator().compare(first, low) <= 0
            && cf.getComparator().compare(high, last) <= 0;
    }
View Full Code Here

    {
        private int idx;

        public boolean isDeleted(Cell cell)
        {
            CellName name = cell.name();
            long timestamp = cell.timestamp();

            while (idx < size)
            {
                int cmp = comparator.compare(name, starts[idx]);
View Full Code Here

            {
                live = 1;
                return;
            }

            CellName current = cell.name();
            assert current.size() >= toGroup;

            if (previous != null)
            {
                boolean isSameGroup = previous.isStatic() == current.isStatic();
                if (isSameGroup)
                {
                    for (int i = 0; i < toGroup; i++)
                    {
                        if (type.subtype(i).compare(previous.get(i), current.get(i)) != 0)
                        {
                            isSameGroup = false;
                            break;
                        }
                    }
View Full Code Here

        }

        public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException
        {
            // delete + add
            CellName name = cf.getComparator().create(prefix, column);
            cf.addAtom(params.makeTombstoneForOverwrite(name.slice()));
            Adder.doAdd(t, cf, prefix, column, params);
        }
View Full Code Here

            assert value instanceof Sets.Value : value;

            Set<ByteBuffer> toAdd = ((Sets.Value)value).elements;
            for (ByteBuffer bb : toAdd)
            {
                CellName cellName = cf.getComparator().create(prefix, column, bb);
                cf.addColumn(params.makeColumn(cellName, ByteBufferUtil.EMPTY_BYTE_BUFFER));
            }
        }
View Full Code Here

                            catch (InvalidRequestException e)
                            {
                                throw new AssertionError(e);
                            }

                            CellName name = metadata.comparator.cellFromByteBuffer(nameBytes);
                            ColumnDefinition cd = metadata.getColumnDefinition(name);
                            if (cd != null)
                                result.schema.value_types.put(nameBytes, TypeParser.getShortName(cd.type));
                            org.apache.cassandra.db.Cell c = row.cf.getColumn(name);
                            if (c == null || !c.isLive())
View Full Code Here

TOP

Related Classes of org.apache.cassandra.db.composites.CellName

Copyright © 2018 www.massapicom. 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.