Guest User

Untitled

a guest
Nov 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. counts.mapValues((windowed, counter) ->
  2. {
  3. try {
  4. return buildRecord(new LoginAttackCount(
  5. windowed.key(),
  6. counter,
  7. windowed.window().start(),
  8. windowed.window().end()));
  9. } catch (IOException e) {
  10. throw new RuntimeException(e);
  11. }
  12. })
  13. .toStream()
  14. .selectKey((k, v) -> k.toString())
  15. .to(TOPIC, Produced.with(stringSerde, genericAvroSerde));
Add Comment
Please, Sign In to add comment