Package com.hmsonline.storm.cassandra.client

Examples of com.hmsonline.storm.cassandra.client.AstyanaxClient.lookup()


                                StringSerializer.get())).getKey(new SimpleComposite("key1val", "key2val"))
                .getColumn("foo").execute().getResult();
        assertEquals("fooval", result.getStringValue());
       
        // test lookup
        Map<String, String> map = client.lookup(tupleMapper, tuple);
        assertEquals("fooval", map.get("foo"));
       
       
        map = client.lookup(tupleMapper, tuple, "bar", "foo", Equality.EQUAL);
        assertNotNull(map.get("foo"));
View Full Code Here


        // test lookup
        Map<String, String> map = client.lookup(tupleMapper, tuple);
        assertEquals("fooval", map.get("foo"));
       
       
        map = client.lookup(tupleMapper, tuple, "bar", "foo", Equality.EQUAL);
        assertNotNull(map.get("foo"));
        assertNotNull(map.get("bar"));
        assertNull(map.get("key1"));
       
        ArrayList<String> slice = new ArrayList<String>();
View Full Code Here

       
        ArrayList<String> slice = new ArrayList<String>();
        slice.add("foo");
        slice.add("bar");
        slice.add("key1");
        map = client.lookup(tupleMapper, tuple, slice);
        assertNotNull(map.get("foo"));
        assertNotNull(map.get("bar"));
        assertNotNull(map.get("key1"));
       
        client.stop();
View Full Code Here

       
        SimpleTridentTupleMapper tupleMapper = new SimpleTridentTupleMapper(KEYSPACE, fields);
       
        client.writeTuple(tuple, tupleMapper);
       
        Map<String, String> map = client.lookup(tupleMapper, tuple);
       
        assertEquals("fooval", map.get("foo"));
       
        map = client.lookup(tupleMapper, tuple,"bar", "foo",Equality.GREATER_THAN_EQUAL);
        assertEquals("fooval", map.get("foo"));
View Full Code Here

       
        Map<String, String> map = client.lookup(tupleMapper, tuple);
       
        assertEquals("fooval", map.get("foo"));
       
        map = client.lookup(tupleMapper, tuple,"bar", "foo",Equality.GREATER_THAN_EQUAL);
        assertEquals("fooval", map.get("foo"));
        assertEquals("barval", map.get("bar"));
        assertNull(map.get("key1"));
        client.stop();
    }
View Full Code Here

       
        tuple = newTridentTuple(fields, new Values("my_row", "d", "d", "dd"));
        client.writeTuple(tuple, tupleMapper);
       
       
        Map<SimpleComposite, String> map = client.lookup(tupleMapper, tuple, new SimpleComposite("a", "a"), new SimpleComposite("a", "c"), Equality.GREATER_THAN_EQUAL);
        dumpMap(map);
       
        assertNotNull(map.get(new SimpleComposite("a", "a")));
        assertNotNull(map.get(new SimpleComposite("a", "b")));
        assertNotNull(map.get(new SimpleComposite("a", "c")));
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.