Related questions
Could not get a resource from the pool(SocketTimeoutException:)
I'm running multiple worker threads(around 10) to access the data from the redis Q.
For the i'm using infinte timeout for Jedis Client.
Jedis jedis = pool.getResource();
jedis.getClient().setTimeoutInfinite();
Still i'm getting the error "Could not get a resource …
Configure Jedis timeout
I'm having problems completing an .hgetall(), here's what I've tried:
Jedis jedis = new Jedis(REDIS_MASTER_NODE);
jedis.connect();
jedis.configSet("timeout", "30");
Map<String, String> alreadyStored = jedis.hgetAll(redisTargetHash);
and here's what I get:
Exception in thread "main" …
Get Set value from Redis using RedisTemplate
I am able to retrieve values from Redis using Jedis:
public static void main(String[] args) {
Jedis jedis = new Jedis(HOST, PORT);
jedis.connect();
Set<String> set = jedis.smembers(KEY);
for (String s : set) {
System.out.println(s);
}
…