Package org.apache.cassandra.db.composites

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


        return deserialize(in, flag, Integer.MIN_VALUE);
    }

    public Cell deserialize(DataInput in, ColumnSerializer.Flag flag, int expireBefore) throws IOException
    {
        CellName name = type.cellSerializer().deserialize(in);

        int b = in.readUnsignedByte();
        return deserializeColumnBody(in, name, b, flag, expireBefore);
    }
View Full Code Here


            Term.Terminal key = t.bind(params.variables);
            if (key == null)
                throw new InvalidRequestException("Invalid null map key");
            assert key instanceof Constants.Value;

            CellName cellName = cf.getComparator().create(prefix, column.name, ((Constants.Value)key).bytes);
            cf.addColumn(params.makeTombstone(cellName));
        }
View Full Code Here

            super(column, t);
        }

        public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException
        {
            CellName cname = cf.getComparator().create(prefix, column.name);
            ByteBuffer value = t.bindAndGet(params.variables);
            cf.addColumn(value == null ? params.makeTombstone(cname) : params.makeColumn(cname, value));
        }
View Full Code Here

        {
            ByteBuffer bytes = t.bindAndGet(params.variables);
            if (bytes == null)
                throw new InvalidRequestException("Invalid null value for counter increment");
            long increment = ByteBufferUtil.toLong(bytes);
            CellName cname = cf.getComparator().create(prefix, column.name);
            cf.addCounter(cname, increment);
        }
View Full Code Here

            long increment = ByteBufferUtil.toLong(bytes);
            if (increment == Long.MIN_VALUE)
                throw new InvalidRequestException("The negation of " + increment + " overflows supported counter precision (signed 8 bytes integer)");

            CellName cname = cf.getComparator().create(prefix, column.name);
            cf.addCounter(cname, -increment);
        }
View Full Code Here

            super(column, null);
        }

        public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException
        {
            CellName cname = cf.getComparator().create(prefix, column.name);
            if (column.type.isCollection())
                cf.addAtom(params.makeRangeTombstone(cname.slice()));
            else
                cf.addColumn(params.makeTombstone(cname));
        }
View Full Code Here

        if (ranges.isEmpty())
            return;

        Iterator<CellName> toFetch = columnNames.iterator();
        CellName nextToFetch = toFetch.next();
        for (IndexHelper.IndexInfo indexInfo : ranges)
        {
            long positionToSeek = basePosition + indexInfo.offset;

            // With new promoted indexes, our first seek in the data file will happen at that point.
View Full Code Here

        ColumnFamilyStore cfs = keyspace.getColumnFamilyStore("StandardGCGS0");
        cfs.disableAutoCompaction();

        Mutation rm;
        DecoratedKey dk = Util.dk("key1");
        CellName cellName = Util.cellname("Column1");

        // add data
        rm = new Mutation(keyspace.getName(), dk.key);
        rm.add(cfs.name, cellName, ByteBufferUtil.bytes("asdf"), 0);
        rm.apply();
View Full Code Here

    public CFRowAdder addMapEntry(String cql3ColumnName, Object key, Object value)
    {
        ColumnDefinition def = getDefinition(cql3ColumnName);
        assert def.type instanceof MapType;
        MapType mt = (MapType)def.type;
        CellName name = cf.getComparator().create(prefix, def.name, mt.keys.decompose(key));
        return add(name, def, value);
    }
View Full Code Here

    public CFRowAdder addListEntry(String cql3ColumnName, Object value)
    {
        ColumnDefinition def = getDefinition(cql3ColumnName);
        assert def.type instanceof ListType;
        CellName name = cf.getComparator().create(prefix, def.name, ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes()));
        return add(name, def, value);
    }
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.