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
3
votes
2 answers

how to use jedis for mass insertion of commands

If I have create a file containing the following commands in the Redis protocol format: SET Key0 Value0 SET Key1 Value1 ... SET KeyN ValueN how can I use Jedis in my application to feed it to Redis?
twb
  • 1,248
  • 4
  • 18
  • 31
3
votes
4 answers

Delete similar patern keys from redis using JAVA

I am using jedis for redis connect in java. I want to delete similar pattern keys from redis server using jedis. e.g. 1. 1_pattern 2. 2_pattern 3. 3_pattern 4. 4_pattern 5. 5_pattern We can use del(key), but it will delete only one key. I want…
dipendra
  • 235
  • 4
  • 12
3
votes
1 answer

How to manipulate number in Redis using Lua Script

I am trying to multiply two numbers stored in Redis using the Lua Script. But I am getting ClassCastException. Could someone point out What is wrong in the program jedis.set("one", "1"); jedis.set("two", "2"); String script = "return…
user1182253
  • 1,079
  • 2
  • 14
  • 26
3
votes
2 answers

Redis exception with transactions with Jedis client

In order to avoid duplicates in my redis channel I'm checking if the message is already there by keeping an index in Redis set. Following is my implementation. However, it is giving an exception. redis.clients.jedis.exceptions.JedisDataException:…
Soumya Simanta
  • 11,523
  • 24
  • 106
  • 161
3
votes
1 answer

Redis hash very slow writing speed

I'm facing a very strange issue : i get really crappy writing speeds when using redis (in a ideal world the writing speed should be approaching the writing speed on RAM). Here is my benchmark : package redisbenchmark; import…
Stephan
  • 8,000
  • 3
  • 36
  • 42
3
votes
3 answers

ERR EXEC without MULTI - Jedis

I'm learning jedis, I couldn't exactly find out what is the problem in this code. Can anyone help me.The exception occurs at the statement tx.exec() public class JedisFactory { public static void main (String [] args){ JedisPool pool = new…
user1182253
  • 1,079
  • 2
  • 14
  • 26
3
votes
0 answers

Getting resource error accessing Redis Q multiple times

This is my code used to access the value from redis Q. Jedis jedis = null; try { int maxActive = 1000; int maxIdle = 5; int minIdle = 1; long maxWait = 5000; JedisPoolConfig config = new JedisPoolConfig (); config.setMaxActive…
Vignesh
  • 2,295
  • 7
  • 33
  • 41
2
votes
1 answer

How to trace low-level output for Redis server

I want to trace all low-level output that the Jedis client sends via JedisCommands to the Redis server. Should I enable logging to achieve this?
diya
  • 6,938
  • 9
  • 39
  • 55
2
votes
0 answers

How to use ConnectionPoolConfig + UnifiedJedis + Transaction

I am using ConnectionPoolConfig + UnifiedJedis + Transaction. I am new for the redis using redis.clients 4.4.0-rc1, i have two questions 1 - can i use ConnectionPoolConfig in this way? 2 - Whats is the use of poolConfig.setMaxTotal()? in the code i…
2
votes
1 answer

Testcontainers "JedisConnectionException: Could not get a resource from the pool" on Gitlab pipeline

I'm using Testcontainers for Redis cluster integration tests; though locally everything work as expected, but after creating a remote branch and pushing the code on Gitlab pipeline I'm getting the exception below. I have Cassandra and PostgreSQL…
bellomd
  • 81
  • 1
  • 5
2
votes
1 answer

Redis key expiry event in spring?

I have a key that expires after 30 seconds. redisTemplate.expire(sessionId , 30, TimeUnit.SECONDS); This is my listener: @Service public class RedisController implements MessageListener { @Override public void onMessage(Message message,…
WISHY
  • 11,067
  • 25
  • 105
  • 197
2
votes
0 answers

Socket timeout in redis after migrating elastic redis cluster from cache.t2.micro to cache.t2.small

My application immediately started facing socket timeout error after I migrated my elastic cache cluster on aws from cache.t2.micro to cache.t2.small. Which ultimately lead to Could not get a resource from the pool exceptions. This lead to…
2
votes
2 answers

JedisPool vs JedisPooled

Looking at the Jedis Getting Started, I understand it's better to use connection pools to be threadsafe. To do so, I would need a JedisPool and a try-with-resources statement like so: try (Jedis jedis = pool.getResource()) { jedis.set("hello",…
parpar8090
  • 66
  • 9
2
votes
0 answers

missing type id property '@class' with latest versions of spring data redis, jedis, jackson

I am seeing the below stacktrace with latest versions of spring-data-redis, jedis, jackson build 28-Jul-2022 18:45:32 at [Source:…
2
votes
0 answers

MISCONF Errors writing to the AOF file: No space left on dev

I created a Redis cluster with 3 masters and 3 slaves. Each of the node has at least 20 maps with 2 million key-value each. I'm trying to insert data in billions, after inserting certain millions of data facing below error while inserting more…
tcs hr
  • 21
  • 2