RedisLabs / spark-redis

A connector for Spark that allows reading and writing to/from Redis cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add support to spark.redis.url

jonathansp opened this issue · comments

Since redis 4.0, redis-cli accepts -u parameter, where an URL can be provided. Redis URL scheme is a well-known format (https://www.iana.org/assignments/uri-schemes/prov/redis) supported by most Redis drivers.

# snippet from redis-py.

>>> from redis.cluster import RedisCluster as Redis
>>> rc = Redis.from_url("redis://localhost:6379/0")
// snippet from jedis.

Jedis jedis = new Jedis("redis://:password@host:port/database");

Since spark-redis uses Jedis, I'd like to suggest adding support to spark.redis.url to connect to Redis.

References: