debasishg / scala-redis

A scala library for connecting to a redis server, or a cluster of redis nodes using consistent hashing on the client side.
1.02k stars 219 forks source link

All methods in RedisShards from RedisCommand trait must be overriden #242

Closed atais closed 5 years ago

atais commented 5 years ago

Hi.

I wanted to use RedisShards but currently, many methods return strange errors. What I have found is that basically, any method from RedisCommand that is not overridden will not work. Simply because in RedisShards single host variables are dummies:

  // not needed at cluster level
  override val host = null
  override val port = 0
  override val timeout = 0

And the error that happens is

java.lang.IllegalArgumentException: hostname can't be null

Linked issue: https://github.com/debasishg/scala-redis/issues/216


Check my failing PR https://github.com/atais/scala-redis/pull/1


I am not sure, but RedisCluster may have the same issue