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

Can redis pipeline multiple commands that depend on previous ones?

I'm very very new to redis and still playing around with it. I want to test to see if its relevant to my project but I'm not sure about a specific command I'm running. The users on SO have got me convinced of the performance benefits of using…
Lostsoul
  • 25,013
  • 48
  • 144
  • 239
8
votes
3 answers

How to create RedisCacheManager in spring-data 2.0.x

I'm migrating my application from spring boot 1.5.x to 2.0.x. I want to keep jedis but I have a problem with the instantiation of RedisCacheManager. Now constructor signature is RedisCacheManager(RedisCacheWriter cacheWriter,…
Nikita
  • 4,435
  • 3
  • 24
  • 44
8
votes
2 answers

Using jedis how to write to a specific slot/node in redis cluster

I'm trying to improve the performance of writing data to redis cluster. We are planning to move from redi-sentinel to cluster mode for scalability. But, the performance of write operations is very less compared to redis-sentinel. We leveraged…
barath
  • 762
  • 1
  • 8
  • 26
8
votes
2 answers

How to configure ElastiCache Redis for Spring Data Access

I am trying to setup ElastiCache to use with a Java Application. I have based my setup based on this documentation: https://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/BestPractices.html The EC2 instance where the Java (8) App runs is in…
asaraff2
  • 81
  • 1
  • 4
8
votes
2 answers

Multiple-get in one go - Redis

How can we use lua scripting to implement multi-get. Let's say if I've set name_last to Beckham and name_first to David. What should the lua script be in order to get both name_last and name_first in one go? I can implement something like: eval…
user_ab
  • 225
  • 1
  • 3
  • 6
8
votes
0 answers

Is there a way to achieve Autofailover and autodiscovery of redis nodes with JedisCluster?

I used Jedis Java client for Redis and it is fantastic. I used separately the features for clustering (JedisCluster) and for High-Availability (JedisSentinelPool). Both implementations work like a charm alone, however it doesn't seem to be a way to…
1vand1ng0
  • 1,203
  • 1
  • 16
  • 18
8
votes
4 answers

JedisPoolConfig is not assignable to GenericObjectPoolConfig

I have a Spring based java web application hosted on Heroku. I am attempting to utilize the Spring Caching abstraction using the Redis implementation. When the server starts, I get an error saying: Type 'redis/clients/jedis/JedisPoolConfig'…
user3089280
  • 381
  • 2
  • 4
  • 12
7
votes
0 answers

Is it necessary to use jedis.close()

Hi I am new in implementing the java code, Tried the following things:- I am using jedis as redis java client-library, I have made the jedis object and used its api to print the redis information, but this all is done inside the method, So my doubt…
Rohit Pathak
  • 71
  • 1
  • 3
7
votes
1 answer

Redis/java - writing and reading binary data

I'm trying to write and read a gzip to/from Redis. The problem is that I tried saving the read bytes to a file and opening it with gzip - it's invalid. The strings are also different when looking at them in the Eclipse console. Here's my code:…
Buffalo
  • 3,861
  • 8
  • 44
  • 69
7
votes
2 answers

Connect Redis cluster with jedis

Since a single redis instance doesn't meet my requirements, I went for redis cluster. I formed cluster with three nodes and populated data into the cluster. When I get data from cluster using JedisCluster it takes more time than the single instance.…
Hemnath
  • 255
  • 1
  • 3
  • 13
7
votes
2 answers

Why is the nxxx parameter of set() in Jedis exclusive?

In Jedis, I want to set some key and value with expiring time by a single invocation. I can do this by combination of set() and expire() but it needs two invocations. I found the following method: set(final String key, final String value, final…
Johnny Lim
  • 5,623
  • 8
  • 38
  • 53
7
votes
2 answers

Redis/Jedis no single point of failure and automated failover

In a simple situation with 3 servers with 1 master and 2 slaves with no sharding. Is there a proven solution with java and Jedis that has no single point of failure and will automatically deal with a single server going down be that master or…
Derek Organ
  • 8,323
  • 17
  • 56
  • 75
7
votes
3 answers

Extracting Keys From Redis

I use this following code to extract all of the Keys start with "NAME:" and it return only over 5,000 records (There is over 60,000 keys in my index). Can anyone explain why it is happening or how can I extract all of the keys from Redis…
BonBoon
  • 107
  • 1
  • 2
  • 7
6
votes
1 answer

How do I test run Memurai on Windows

I have installed Memurai on my Windows 10 64-bit system. Memurai is a Redis-compatible in-memory cache and persistent datastore running on Windows. I followed the steps given in Installation steps. Memurai can be installed as a Windows service…
Dr. Debasish Jana
  • 6,980
  • 4
  • 30
  • 69
6
votes
1 answer

@EnableRedisRepositories - What is the use of in Spring Data Redis?

I search a lot over web to get more practical usage of @EnableRedisRepositories, but I did not found any. Even in my Spring Boot + Spring Data Redis example, I removed @EnableRedisRepositories but still I did not understood what difference it make,…
Jeff Cook
  • 7,956
  • 36
  • 115
  • 186