Created
November 20, 2018 20:20
-
-
Save brachi-wernick/0e96c087c2226b8ebb5dd477f89916f3 to your computer and use it in GitHub Desktop.
buildRecord.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
counts.mapValues((windowed, counter) -> | |
{ | |
try { | |
return buildRecord(new LoginAttackCount( | |
windowed.key(), | |
counter, | |
windowed.window().start(), | |
windowed.window().end())); | |
} catch (IOException e) { | |
throw new RuntimeException(e); | |
} | |
}) | |
.toStream() | |
.selectKey((k, v) -> k.toString()) | |
.to(TOPIC, Produced.with(stringSerde, genericAvroSerde)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment