Package org.apache.cassandra.db.marshal

Examples of org.apache.cassandra.db.marshal.LongType


        final ColumnFamilyStore cfStore = table.getColumnFamilyStore("Super1");
        final String ROW = "row2";

        RowMutation rm = new RowMutation("Keyspace1", ROW);
        ColumnFamily cf = ColumnFamily.create("Keyspace1", "Super1");
        SuperColumn sc = new SuperColumn("sc1".getBytes(), new LongType());
        sc.addColumn(new Column(getBytes(1), "val1".getBytes(), 1L));
        cf.addColumn(sc);
        rm.add(cf);
        rm.apply();
View Full Code Here


        final ColumnFamilyStore cfStore = table.getColumnFamilyStore("Super1");
        final String ROW = "row2";

        RowMutation rm = new RowMutation("Keyspace1", ROW);
        ColumnFamily cf = ColumnFamily.create("Keyspace1", "Super1");
        SuperColumn sc = new SuperColumn("sc1".getBytes(), new LongType());
        sc.addColumn(new Column(getBytes(1), "val1".getBytes(), 1L));
        cf.addColumn(sc);
        rm.add(cf);
        rm.apply();
View Full Code Here

        final ColumnFamilyStore cfStore = table.getColumnFamilyStore("Super1");
        final String ROW = "row2";

        RowMutation rm = new RowMutation("Keyspace1", ROW);
        ColumnFamily cf = ColumnFamily.create("Keyspace1", "Super1");
        SuperColumn sc = new SuperColumn("sc1".getBytes(), new LongType());
        sc.addColumn(new Column(getBytes(1), "val1".getBytes(), 1L));
        cf.addColumn(sc);
        rm.add(cf);
        rm.apply();
View Full Code Here

        final ColumnFamilyStore cfStore = table.getColumnFamilyStore("Super1");
        final String ROW = "row2";

        RowMutation rm = new RowMutation("Keyspace1", ROW);
        ColumnFamily cf = ColumnFamily.create("Keyspace1", "Super1");
        SuperColumn sc = new SuperColumn("sc1".getBytes(), new LongType());
        sc.addColumn(new Column(getBytes(1), "val1".getBytes(), 1L));
        cf.addColumn(sc);
        rm.add(cf);
        rm.apply();
View Full Code Here

        final ColumnFamilyStore cfStore = table.getColumnFamilyStore("Super1");
        final String ROW = "row2";

        RowMutation rm = new RowMutation("Keyspace1", ROW);
        ColumnFamily cf = ColumnFamily.create("Keyspace1", "Super1");
        SuperColumn sc = new SuperColumn("sc1".getBytes(), new LongType());
        sc.addColumn(new Column(getBytes(1), "val1".getBytes(), 1L));
        cf.addColumn(sc);
        rm.add(cf);
        rm.apply();
View Full Code Here

public class SuperColumnTest
{  
    @Test
    public void testMissingSubcolumn() {
      SuperColumn sc = new SuperColumn("sc1".getBytes(), new LongType());
      sc.addColumn(new Column(getBytes(1), "value".getBytes(), 1));
      assertNotNull(sc.getSubColumn(getBytes(1)));
      assertNull(sc.getSubColumn(getBytes(2)));
    }
View Full Code Here

        final ColumnFamilyStore cfStore = table.getColumnFamilyStore("Super1");
        final String ROW = "row2";

        RowMutation rm = new RowMutation("Keyspace1", ROW);
        ColumnFamily cf = ColumnFamily.create("Keyspace1", "Super1");
        SuperColumn sc = new SuperColumn("sc1".getBytes(), new LongType());
        sc.addColumn(new Column(getBytes(1), "val1".getBytes(), 1L));
        cf.addColumn(sc);
        rm.add(cf);
        rm.apply();
View Full Code Here

        for (int j = 0; j < 8; j++)
        {
            column = iter.next();
            assert Arrays.equals(column.name(), getBytes(j));
        }
        TreeSet<byte[]> columnNames = new TreeSet<byte[]>(new LongType());
        columnNames.add(getBytes(10));
        columnNames.add(getBytes(0));
        cf = cfStore.getColumnFamily(new NamesQueryFilter("900", new QueryPath("StandardLong1"), columnNames));
        assert "c".equals(new String(cf.getColumn(getBytes(0)).value()));
        assert "c".equals(new String(cf.getColumn(getBytes(10)).value()));
View Full Code Here

public class SuperColumnTest
{  
    @Test
    public void testMissingSubcolumn() {
      SuperColumn sc = new SuperColumn("sc1".getBytes(), new LongType());
      sc.addColumn(new Column(getBytes(1), "value".getBytes(), 1));
      assertNotNull(sc.getSubColumn(getBytes(1)));
      assertNull(sc.getSubColumn(getBytes(2)));
    }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.db.marshal.LongType

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.