Package me.prettyprint.hector.api.beans

Examples of me.prettyprint.hector.api.beans.Composite.addComponent()


    query2.setKey("row1");

    // Create a composite search range
    Composite start2 = new Composite();
    start2.addComponent(12L, LongSerializer.get());
    start2.addComponent("a", StringSerializer.get());

    Composite finish2 = new Composite();
    finish2.addComponent(12L, LongSerializer.get());
    finish2.addComponent(Character.toString(Character.MAX_VALUE), StringSerializer.get());
    query2.setRange(start2, finish2, false, 100);
View Full Code Here


    Composite start2 = new Composite();
    start2.addComponent(12L, LongSerializer.get());
    start2.addComponent("a", StringSerializer.get());

    Composite finish2 = new Composite();
    finish2.addComponent(12L, LongSerializer.get());
    finish2.addComponent(Character.toString(Character.MAX_VALUE), StringSerializer.get());
    query2.setRange(start2, finish2, false, 100);

    // Now search.
    ColumnSlice<Composite, String> columnSlice2 = query2.execute().get();
View Full Code Here

    start2.addComponent(12L, LongSerializer.get());
    start2.addComponent("a", StringSerializer.get());

    Composite finish2 = new Composite();
    finish2.addComponent(12L, LongSerializer.get());
    finish2.addComponent(Character.toString(Character.MAX_VALUE), StringSerializer.get());
    query2.setRange(start2, finish2, false, 100);

    // Now search.
    ColumnSlice<Composite, String> columnSlice2 = query2.execute().get();
    assertThat(columnSlice2.getColumns().size(), is(3));
View Full Code Here

    Keyspace keyspace = HFactory.createKeyspace("compositeKeyspace", cluster);

    SliceQuery<Composite, String, String> query = HFactory.createSliceQuery(keyspace, new CompositeSerializer(),
        StringSerializer.get(), StringSerializer.get());
    Composite key = new Composite();
    key.addComponent(12L, LongSerializer.get());
    key.addComponent("az", StringSerializer.get());
    query.setColumnFamily("columnFamilyWithRowKeyCompositeType").setKey(key);
    query.setRange(null, null, false, 100);
    QueryResult<ColumnSlice<String, String>> result = query.execute();
    assertThat(result.get().getColumns().get(0).getValue(), is("a"));
View Full Code Here

    SliceQuery<Composite, String, String> query = HFactory.createSliceQuery(keyspace, new CompositeSerializer(),
        StringSerializer.get(), StringSerializer.get());
    Composite key = new Composite();
    key.addComponent(12L, LongSerializer.get());
    key.addComponent("az", StringSerializer.get());
    query.setColumnFamily("columnFamilyWithRowKeyCompositeType").setKey(key);
    query.setRange(null, null, false, 100);
    QueryResult<ColumnSlice<String, String>> result = query.execute();
    assertThat(result.get().getColumns().get(0).getValue(), is("a"));
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.