A library for reading and writing data from and to Redis with Stuart, the Apache Spark runtime for embedding and edge computing.
This library can be used in two ways:
- external to a remote Redis server, in which case the redis-lua client library is used to read and write remote data structures
- embedded within a Stuart-based Spark job submitted via the Redis EVAL command, in which case the
redis
global variable is used to read and write local data structures
Spark data structures are mapped to Redis with guidance from the spark-redis project by Redis Labs.
$ luarocks install stuart-redis
To work with a remote Redis server, a Redis client libary will also be required. redis-lua is currently chosen because it is based on LuaSocket, which is widely available on many platforms, and which can also be used within a Go app.
$ luarocks install redis-lua
- Remoting (Configuring for use with a remote Redis)
- Embedding (Using embedded within a Redis EVAL)
- RDD
- Streaming
$ luarocks make stuart-redis-<version>.rockspec
stuart-redis <version> is now installed in /usr/local (license: Apache 2.0)
$ REDIS_URL=redis://localhost:6379 busted -v