RedisLabs / spark-redis

A connector for Spark that allows reading and writing to/from Redis cluster
BSD 3-Clause "New" or "Revised" License
936 stars 367 forks source link

add support to spark.redis.url #349

Open jonathansp opened 2 years ago

jonathansp commented 2 years ago

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: