use of org.apache.apex.malhar.contrib.util.TupleGenerator in project apex-malhar by apache.
the class MemcachePOJOOperatorTest method testMemcacheOutputOperatorInternal.
@SuppressWarnings("unchecked")
@Test
public void testMemcacheOutputOperatorInternal() throws Exception {
MemcachePOJOOutputOperator operator = new MemcachePOJOOutputOperator();
operator.setStore(store);
TableInfo tableInfo = new TableInfo();
tableInfo.setRowOrIdExpression(TestPOJO.getRowExpression());
tableInfo.setFieldsInfo(TestPOJO.getFieldsInfo());
tableInfo.setRowOrIdExpression(TestPOJO.getRowExpression());
operator.setTableInfo(tableInfo);
operator.setup(null);
TupleGenerator<TestPOJO> generator = new TupleGenerator<TestPOJO>(TestPOJO.class);
for (int i = 0; i < TUPLE_SIZE; ++i) {
operator.processTuple(generator.getNextTuple());
}
readDataAndVerify(operator.getStore(), generator);
}
use of org.apache.apex.malhar.contrib.util.TupleGenerator in project apex-malhar by apache.
the class GeodePOJOOperatorTest method testGeodeOutputOperatorInternal.
@SuppressWarnings("unchecked")
@Test
public void testGeodeOutputOperatorInternal() throws Exception {
GeodePOJOOutputOperator operator = new GeodePOJOOutputOperator();
operator.setStore(store);
TableInfo tableInfo = new TableInfo();
tableInfo.setRowOrIdExpression(TestPOJO.getRowExpression());
tableInfo.setFieldsInfo(TestPOJO.getFieldsInfo());
tableInfo.setRowOrIdExpression(TestPOJO.getRowExpression());
operator.setTableInfo(tableInfo);
operator.setup(null);
TupleGenerator<TestPOJO> generator = new TupleGenerator<TestPOJO>(TestPOJO.class);
for (int i = 0; i < TUPLE_SIZE; ++i) {
operator.processTuple(generator.getNextTuple());
}
generator.reset();
for (int i = 0; i < TUPLE_SIZE; ++i) {
operator.processTuple(generator.getNextTuple());
}
// readDataAndVerify(operator.getStore(), generator);
}
Aggregations