As Spark 2 is not a breaking news anymore, it's time to make reference apps working with it.
I can see at least the following things to do:
- Use SparkSession instead of SQLContext
- Use Dataset API
- Update JavaDStream.foreachRDD() invocations to new contract (returns nothing)
- Update JavaPairDStream.updateStateByKey() to new contract (uses Spark implementation of Optional)