use of org.apache.storm.windowing.TupleWindow in project storm by apache.
the class TestJoinBolt method testNestedKeys.
@Test
public void testNestedKeys() throws Exception {
ArrayList<Tuple> userStream = makeNestedEventsStream("users", userFields, users);
TupleWindow window = makeTupleWindow(userStream);
JoinBolt bolt = new JoinBolt(JoinBolt.Selector.STREAM, "users", "outer.userId").select("outer.name, outer.city");
MockCollector collector = new MockCollector();
bolt.prepare(null, null, collector);
bolt.execute(window);
printResults(collector);
Assert.assertEquals(userStream.size(), collector.actualResults.size());
}
Aggregations