This project shows spark streaming capability with Redis
RedisRandomProducer
is a random data producer.
It produces data to stream name mystream
RedisSparkStreamingExample
is a consumer of random data.
It consumes data from stream name mystream
Constants
can be used to change the host
, port
and stream
name.
- Redis
In the package pagecount
lies the example of streaming redis event of user page visit and counting the number of user visit.
Constant
object in package simple
can be used to configure few variables.
docker run --name spark-redis-test -p 6379:6379 -d redis