Examples of CellName


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

        else
            logger.warn("Unable to find matching endpoint for target {} when storing a hint", targetId);

        UUID hintId = UUIDGen.getTimeUUID();
        // serialize the hint with id and version as a composite column name
        CellName name = CFMetaData.HintsCf.comparator.makeCellName(hintId, MessagingService.current_version);
        ByteBuffer value = ByteBuffer.wrap(FBUtilities.serialize(mutation, Mutation.serializer, MessagingService.current_version));
        ColumnFamily cf = ArrayBackedSortedColumns.factory.create(Schema.instance.getCFMetaData(Keyspace.SYSTEM_KS, SystemKeyspace.HINTS_CF));
        cf.addColumn(name, value, now, ttl);
        return new Mutation(Keyspace.SYSTEM_KS, UUIDType.instance.decompose(targetId), cf);
    }
View Full Code Here

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

    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

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

            && comp.compare(name.get(columnDef.position()), columnDef.name.bytes) == 0;
    }

    public boolean isStale(IndexedEntry entry, ColumnFamily data, long now)
    {
        CellName name = data.getComparator().create(entry.indexedEntryPrefix, columnDef.name, entry.indexValue.key);
        Cell liveCell = data.getColumn(name);
        return (liveCell == null || liveCell.isMarkedForDelete(now));
    }
View Full Code Here

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

        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

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

        }

        public Future<Pair<CounterCacheKey, ClockAndCount>> deserialize(DataInputStream in, final ColumnFamilyStore cfs) throws IOException
        {
            final ByteBuffer partitionKey = ByteBufferUtil.readWithLength(in);
            final CellName cellName = cfs.metadata.comparator.cellFromByteBuffer(ByteBufferUtil.readWithLength(in));
            return StageManager.getStage(Stage.READ).submit(new Callable<Pair<CounterCacheKey, ClockAndCount>>()
            {
                public Pair<CounterCacheKey, ClockAndCount> call() throws Exception
                {
                    DecoratedKey key = cfs.partitioner.decorateKey(partitionKey);
View Full Code Here

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

            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

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

            {
                live = 1;
                return;
            }

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

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

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

        if (container == null)
            return;

        for (Iterator<CellName> iterator = ((NamesQueryFilter) filter.filter).columns.iterator(); iterator.hasNext(); )
        {
            CellName filterColumn = iterator.next();
            Cell cell = container.getColumn(filterColumn);
            if (cell != null && cell.timestamp() > sstableTimestamp)
                iterator.remove();
        }
    }
View Full Code Here

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

        }

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

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

            assert value instanceof Sets.Value : value;

            Set<ByteBuffer> toAdd = ((Sets.Value)value).elements;
            for (ByteBuffer bb : toAdd)
            {
                CellName cellName = cf.getComparator().create(prefix, columnName, bb);
                cf.addColumn(params.makeColumn(cellName, ByteBufferUtil.EMPTY_BYTE_BUFFER));
            }
        }
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.