Package com.hmsonline.storm.cassandra.client

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


        TupleMapper tupleMapper = new SimpleTupleMapper(KEYSPACE, "simple");
        AstyanaxClient client = new AstyanaxClient();
        Map<String, Object> clientConfig = new HashMap<String, Object>();
        clientConfig.put(StormCassandraConstants.CASSANDRA_HOST, "localhost:9160");
        clientConfig.put(StormCassandraConstants.CASSANDRA_KEYSPACE, Arrays.asList(new String [] {KEYSPACE}));
        client.start(clientConfig);

        Fields fields = new Fields("key1", "key2", "foo", "bar");
        Values values = new Values("key1val", "key2val", "fooval", "barval");
        Tuple tuple = new MockTuple(fields, values);
View Full Code Here


    public void testTrident() throws Exception {
        AstyanaxClient client = new AstyanaxClient();
        Map<String, Object> clientConfig = new HashMap<String, Object>();
        clientConfig.put(StormCassandraConstants.CASSANDRA_HOST, "localhost:9160");
        clientConfig.put(StormCassandraConstants.CASSANDRA_KEYSPACE, Arrays.asList(new String [] {KEYSPACE}));
        client.start(clientConfig);
       
        Fields fields = new Fields("key1", "key2", "foo", "bar");
        Values values = new Values("key1val", "key2val", "fooval", "barval");
        TridentTuple tuple = newTridentTuple(fields, values);
       
View Full Code Here

        try{
        AstyanaxClient client = new AstyanaxClient();
        Map<String, Object> clientConfig = new HashMap<String, Object>();
        clientConfig.put(StormCassandraConstants.CASSANDRA_HOST, "localhost:9160");
        clientConfig.put(StormCassandraConstants.CASSANDRA_KEYSPACE, Arrays.asList(new String [] {KEYSPACE}));
        client.start(clientConfig);
       
        Fields fields = new Fields("rowkey", "a", "b", "value");
        Values values = new Values("my_row", "a", "a", "aa");
        TridentTuple tuple = newTridentTuple(fields, values);
       
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.