Guest User

Untitled

a guest
Apr 26th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. @StreamListener
  2. public Stream<Long, Output> handleStreams(@Input KStream<Long, Parent> parentStream,
  3. @Input KStream<Long, Child1> child1Stream,
  4. @Input KStream<Long, Child2> child2Stream) {
  5.  
  6. KTable<Long, Parent> parentTable = convertParent(parentStream);
  7. KTable<Long, ArrayList<Child1>> child1Table = convertChild1(parentStream);
  8. KTable<Long, ArrayList<Child2>> child2Table = convertChild2(parentStream);
  9.  
  10. parentTable.leftJoin(child1Table, (parent, child1List) -> new Output(k, v))
  11. .leftJoin(child2Table, (output, child2List) -> output.setChild2List(child2List)).toStream()
  12.  
  13. }
Add Comment
Please, Sign In to add comment