Search in sources :

Example 1 with CassandraTransactionalStore

use of org.apache.apex.malhar.contrib.cassandra.CassandraTransactionalStore in project apex-malhar by apache.

the class CassandraOutputBenchmarkApplication method populateDAG.

@Override
public void populateDAG(DAG dag, Configuration conf) {
    int maxValue = 1000;
    RandomEventGenerator rand = dag.addOperator("rand", new RandomEventGenerator());
    rand.setMinvalue(0);
    rand.setMaxvalue(maxValue);
    rand.setTuplesBlast(200);
    CassandraOutputOperator cassandra = dag.addOperator("cassandra", new CassandraOutputOperator());
    CassandraTransactionalStore store = new CassandraTransactionalStore();
    store.setKeyspace("test");
    store.setNode("127.0.0.1");
    cassandra.setStore(store);
    dag.addStream("rand_cassandra", rand.integer_data, cassandra.input).setLocality(locality);
}
Also used : RandomEventGenerator(org.apache.apex.malhar.lib.testbench.RandomEventGenerator) CassandraTransactionalStore(org.apache.apex.malhar.contrib.cassandra.CassandraTransactionalStore)

Aggregations

CassandraTransactionalStore (org.apache.apex.malhar.contrib.cassandra.CassandraTransactionalStore)1 RandomEventGenerator (org.apache.apex.malhar.lib.testbench.RandomEventGenerator)1