Package org.apache.cassandra.db

Examples of org.apache.cassandra.db.SuperColumn


    @Test
    public void testResolveDeletedSuper()
    {
        // subcolumn is newer than a tombstone on its parent, but not newer than the row deletion
        ColumnFamily scf1 = ColumnFamily.create("Keyspace1", "Super1");
        SuperColumn sc = superColumn(scf1, "super-foo", column("one", "A", 1));
        sc.delete(new DeletionInfo(0L, (int) (System.currentTimeMillis() / 1000)));
        scf1.addColumn(sc);

        ColumnFamily scf2 = ColumnFamily.create("Keyspace1", "Super1");
        scf2.delete(new DeletionInfo(2L, (int) (System.currentTimeMillis() / 1000)));
View Full Code Here


            return;
        }

        if (columnContainer instanceof SuperColumn)
        {
            SuperColumn superColumn = (SuperColumn) columnContainer;
            DeletionInfo deletionInfo = new DeletionInfo(superColumn.getMarkedForDeleteAt(),
                    superColumn.getLocalDeletionTime());
            if (!deletionInfo.equals(DeletionInfo.LIVE))
            {
                writeKey(out, "metadata");
                writeDeletionInfo(out, deletionInfo.getTopLevelDeletion());
                out.print(",");
View Full Code Here

        if (isSuperCF)
        {
            while (row.hasNext())
            {
                SuperColumn scol = (SuperColumn)row.next();
                assert scol instanceof IColumn;
                IColumn column = (IColumn)scol;
                writeKey(out, comparator.getString(column.name()));
                out.print("{");
                writeMeta(out, scol);
View Full Code Here

                JsonColumn col = new JsonColumn(c);
                QueryPath path = new QueryPath(cfamily.name(), superName, hexToBytes(col.name));
                cfamily.addColumn(path, hexToBytes(col.value), col.timestamp, col.isDeleted);
            }
           
            SuperColumn superColumn = (SuperColumn)cfamily.getColumn(superName);
            superColumn.markForDeleteAt((int)(System.currentTimeMillis()/1000), deletedAt);
        }
    }
View Full Code Here

            return;
        }

        if (columnContainer instanceof SuperColumn)
        {
            SuperColumn superColumn = (SuperColumn) columnContainer;
            DeletionInfo deletionInfo = new DeletionInfo(superColumn.getMarkedForDeleteAt(),
                    superColumn.getLocalDeletionTime());
            if (!deletionInfo.equals(DeletionInfo.LIVE))
            {
                writeKey(out, "metadata");
                writeDeletionInfo(out, deletionInfo.getTopLevelDeletion());
                out.print(",");
View Full Code Here

        if (isSuperCF)
        {
            while (row.hasNext())
            {
                SuperColumn scol = (SuperColumn)row.next();
                assert scol instanceof IColumn;
                IColumn column = (IColumn)scol;
                writeKey(out, comparator.getString(column.name()));
                out.print("{");
                writeMeta(out, scol);
View Full Code Here

            return;
        }

        if (columnContainer instanceof SuperColumn)
        {
            SuperColumn superColumn = (SuperColumn) columnContainer;
            DeletionInfo deletionInfo = new DeletionInfo(superColumn.getMarkedForDeleteAt(),
                    superColumn.getLocalDeletionTime());
            if (!deletionInfo.equals(DeletionInfo.LIVE))
            {
                writeKey(out, "metadata");
                writeDeletionInfo(out, deletionInfo.getTopLevelDeletion());
                out.print(",");
View Full Code Here

        if (isSuperCF)
        {
            while (row.hasNext())
            {
                SuperColumn scol = (SuperColumn)row.next();
                assert scol instanceof IColumn;
                IColumn column = (IColumn)scol;
                writeKey(out, comparator.getString(column.name()));
                out.print("{");
                writeMeta(out, scol);
View Full Code Here

        }
        rm.apply();

        // Check that the second insert did went in
        ColumnFamily cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key, new QueryPath(cfName)));
        SuperColumn sc = (SuperColumn)cf.getColumn(scName);
        assert sc != null;
        assertEquals(10, sc.getColumnCount());
    }
View Full Code Here

            return;
        }

        if (columnContainer instanceof SuperColumn)
        {
            SuperColumn superColumn = (SuperColumn) columnContainer;
            DeletionInfo deletionInfo = new DeletionInfo(superColumn.getMarkedForDeleteAt(),
                    superColumn.getLocalDeletionTime());
            if (!deletionInfo.equals(DeletionInfo.LIVE))
            {
                writeKey(out, "metadata");
                writeDeletionInfo(out, deletionInfo.getTopLevelDeletion());
                out.print(",");
View Full Code Here

TOP

Related Classes of org.apache.cassandra.db.SuperColumn

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.