Examples of SuperColumn


Examples of org.apache.cassandra.db.SuperColumn

        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

Examples of org.apache.cassandra.db.SuperColumn

    public SuperColumn filterSuperColumn(SuperColumn superColumn, int gcBefore)
    {
        // we clone shallow, then add, under the theory that generally we're interested in a relatively small number of subcolumns.
        // this may be a poor assumption.
        SuperColumn scFiltered = superColumn.cloneMeShallow();
        Iterator<IColumn> subcolumns;
        if (reversed)
        {
            List<IColumn> columnsAsList = new ArrayList<IColumn>(superColumn.getSubColumns());
            subcolumns = new ReverseListIterator(columnsAsList);
View Full Code Here

Examples of org.apache.cassandra.db.SuperColumn

                {
                    cfamily.addColumn(path, ByteBuffer.wrap(hexToBytes(col.value)), col.timestamp);
                }
            }
           
            SuperColumn superColumn = (SuperColumn)cfamily.getColumn(superName);
            superColumn.markForDeleteAt((int)(System.currentTimeMillis()/1000), deletedAt);
        }
    }
View Full Code Here

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((int) (System.currentTimeMillis() / 1000), 0);
        scf1.addColumn(sc);

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

Examples of org.apache.cassandra.db.SuperColumn

        }
        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

Examples of org.apache.cassandra.db.SuperColumn

        }
        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

Examples of org.apache.cassandra.db.SuperColumn

                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

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((int) (System.currentTimeMillis() / 1000), 0);
        scf1.addColumn(sc);

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

Examples of org.apache.cassandra.db.SuperColumn

                } else {
                    cfamily.addTombstone(path, hexToBytes(col.value), new TimestampClock(col.timestamp));
                }
            }
           
            SuperColumn superColumn = (SuperColumn)cfamily.getColumn(superName);
            superColumn.markForDeleteAt((int)(System.currentTimeMillis()/1000), new TimestampClock(deletedAt));
        }
    }
View Full Code Here

Examples of org.apache.cassandra.db.SuperColumn

        }
        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
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.