Created
February 10, 2021 10:37
-
-
Save jacace/27b433c4b173868859fac5c4e3853443 to your computer and use it in GitHub Desktop.
Transform each record in one stream vs another (kafka vs Spark streamign APIs)
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
#With Kafka Streaming API: | |
stream.mapValues(value -> value.toLowerCase()); | |
#With Spark Streaming API: | |
stream.map(record -> new Tuple2<>(record.key(), record.value())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment