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);
}
Aggregations