edoreld

Untitled

Jul 31st, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. KTable<String, Long> wordCounts = textLines .flatMapValues(textLine -> Arrays.asList(textLine.toLowerCase()
  2.                                                     .split("\\W+")))
  3.                                                     .groupBy((key, word) -> word)
  4.                                                     .count(Materialized.<String, Long, KeyValueStore<Bytes, byte[]>>as(
  5.                                                             "counts-store"));
Advertisement
Add Comment
Please, Sign In to add comment