Questions tagged [jedis]

Jedis is a small free client for Redis, written in and for Java.

From its GitHub repository:

Jedis is a Java client for Redis designed for performance and ease of use.

Resources

868 questions
64
votes
5 answers

Why is data getting stored with weird keys in Redis when using Jedis with Spring Data?

I am using Spring Data Redis with Jedis. I am trying to store a hash with key vc:${list_id}. I was able to successfully insert to redis. However, when I inspect the keys using the redis-cli, I don't see the key vc:501381. Instead I see…
arun
  • 10,685
  • 6
  • 59
  • 81
48
votes
1 answer

Redisson vs Jedis for redis

Now I have to use a java client for redis. I have come across Jedis and Redisson. EDIT: Reframing as the question was kind of opinion based. Which is more efficient in terms of speed? Any benchmarks? Which of them is able to provide the…
Shubham Chaurasia
  • 2,472
  • 2
  • 15
  • 22
43
votes
11 answers

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…
Vignesh
  • 2,295
  • 7
  • 33
  • 41
37
votes
1 answer

How Jedis Pool works?

I'm using Jedis pool to manage connections to Redis server. An example code of mine as follows: public Set getTopArticleList(int start, int end) { Set list = null; Jedis j =…
ipkiss
  • 13,311
  • 33
  • 88
  • 123
36
votes
3 answers

JedisConnectionFactory setHostName is deprecated

This will be my first time connecting Spring to Redis. The documentation for jedis connection factory: http://www.baeldung.com/spring-data-redis-tutorial Offers the following code: @Bean JedisConnectionFactory jedisConnectionFactory() { …
Michael Draper
  • 1,928
  • 3
  • 18
  • 24
34
votes
2 answers

Jedis and Lettuce async abilities

I am using redis with Akka so I need no blocking calls. Lettuce has async-future call built into it. But Jedis is the recommended client by Redis. Can someone tell me if I am using both of them the right way. If so which one is better. JEDIS I am…
Mark
  • 833
  • 1
  • 9
  • 27
30
votes
1 answer

ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context

I am using jdish.publish in my web app and jedis.subscribe in my desktop app. so both are separate app. I have this pubsub class public class RedisNewPostListener extends JedisPubSub { private final Jedis jedis; private final AppInstances…
Manish Kumar
  • 10,214
  • 25
  • 77
  • 147
26
votes
5 answers

How to use java object as a value in Redis

I am pretty new to Redis. I downloaded Jedis and added that to my classpath. But, it doesnt provide a way to store java object as "value" Am i missing something or Jedis doesn't provide the way to store java object as value? Thanks, -Venkat
Venkat Teki
  • 2,233
  • 4
  • 21
  • 28
25
votes
2 answers

Redis performance on a multi core CPU

I am looking around redis to provide me an intermediate cache storage with a lot of computation around set operations like intersection and union. I have looked at the redis website, and found that the redis is not designed for a multi-core CPU. My…
Love Hasija
  • 2,528
  • 2
  • 27
  • 26
23
votes
2 answers

Using ShardedJedis with RedisTemplate

Following is Jedis documentation directly copied from jedis github page: List shards = new ArrayList(); JedisShardInfo si = new JedisShardInfo("localhost", 6379); si.setPassword("foobared"); shards.add(si); si = new…
hrishikeshp19
  • 8,838
  • 26
  • 78
  • 141
22
votes
4 answers

How to use SCAN commands in Jedis

I was using redis and jedis for quite some time and never needed the SCAN commands so far. Now however I need to use the SCAN commands, particularly hscan. I understand how it works on the redis level, but the jedis Java wrapper side is confusing to…
luksch
  • 11,497
  • 6
  • 38
  • 53
20
votes
2 answers

Can Jedis get/set an Java POJO?

I'm using Jedis as the java client to connect to Redis Servers. Question 1: It seems there is no method to get/set Object < ? extends Serializable> ? All the values must be String or byte[]? Other clients like "JRedis" and Spymemcache(for…
hongtium
  • 465
  • 1
  • 3
  • 8
19
votes
4 answers

Jedis, Cannot get jedis connection: cannot get resource from pool

I have seen answers in couple of threads but didn't work out for me and since my problem occurs occasionally, asking this question if any one has any idea. I am using jedis version 2.8.0, Spring Data redis version 1.7.5. and redis server version…
Bikas Katwal
  • 1,895
  • 1
  • 21
  • 42
19
votes
2 answers

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 set = jedis.smembers(KEY); for (String s : set) { …
Zeeshan
  • 11,851
  • 21
  • 73
  • 98
18
votes
2 answers

ERR Client sent AUTH, but no password is set

I am using jedis 2.8.0 and getting following exception: Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set at redis.clients.jedis.Protocol.processError(Protocol.java:123) at…
user1619355
  • 429
  • 1
  • 4
  • 17
1
2 3
57 58