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
4
votes
0 answers

Spring Data Redis (Jedis Lib) Connection Pool Utilization

We are using Redis for user-session info. for approx. 500 concurrent users with 430 req/s, we are getting Redis Implementation Layer (RedisTemplate) of 5 ms. we have configuration of Connection Pool Size 800. Is there anyway we can measure no. of…
user2775185
  • 1,099
  • 3
  • 17
  • 30
4
votes
2 answers

How to do Mass insertion in Redis using JAVA?

Hi I need to do multiple insertions of the form SADD key value I have the key value pair and needed to know how to perform mass insertions using JAVA . I have written a file in the Redis Protocol. How to proceed further
marvel308
  • 10,288
  • 1
  • 21
  • 32
4
votes
1 answer

Redis Cluster in multiple threads

Im currently using Redis Cluster Mode with 3 master instances, i'm using Jedis(Java client) in listening server which every data received i create a new thread then the thread make an update in redis. My question is how can i use Redis Cluster…
4
votes
1 answer

What is the best way to batch get on keys in Redis Cluster in response to a batch API?

I'm using redis hashes to store metadata associated with a single key which in my case is userId. I have a batchAPI where I pass in a batch of userIds and get the metadata back. Redis Cluster doesn't support multi key commands so What's the best way…
Phoenix
  • 8,695
  • 16
  • 55
  • 88
4
votes
1 answer

redis.clients.jedis.exceptions.JedisException: Could not return the resource to the pool

I am getting error while trying to returnResources from the jedis pool.The code are as follow. Jedis publisherJedis = jedispool.getResource(); if(!redisPassword.equals("")) …
Kundan Ray
  • 370
  • 1
  • 4
  • 15
4
votes
2 answers

Is there a redis library which handles the pipelining automatically?

I am looking at the possibility of triggering the redis command from the client as a normal api and the library can pipeline the commands into it and possibly reply asynchronously back. Any library for the Java would be highly appreciated. Any…
titan
  • 435
  • 1
  • 4
  • 7
4
votes
1 answer

sparkContext broadcast JedisPool not work

I was use sparkContext.broadcast in my spark streaming application for share redis connection pool(JedisPool). The code like this: lazy val redisPool = { val pool = Redis.createRedisPool(redisHost, redisPort) …
Guy
  • 53
  • 1
  • 6
4
votes
0 answers

spring data redis Failed to deserialize object type; nested exception is java.lang.ClassNotFoundException

I am using spring-data-redis 1.1.0 and jedis 2.1.0. When i deploy my code to Karaf, i'am getting the below exception: Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is…
Ravz1234
  • 129
  • 1
  • 2
  • 12
4
votes
1 answer

Subscribe to multiple channels with same thread Jedis

I have an application that uses Redis publish/subscribe to transfer messages between clients using the Jedis client in Java. I want to be able to subscribe to channels at runtime when the user types a command but as subscribe is a blocking operation…
user2248702
  • 2,741
  • 7
  • 41
  • 69
4
votes
1 answer

What is practical approach for fan-out-on-write in redis?

I have a news site that have a lot of topics. There might be millions of users following topics. I maintain a sortedset for each user to load news belonging to topics they are following. When an article is added or updated, I will write this article…
ipkiss
  • 13,311
  • 33
  • 88
  • 123
4
votes
1 answer

Reconnection to Redis after reboot

I've a bunch long running processes that connect to a Redis server (using Jedis). Everything works fine as long as I don't reboot the machine running Redis or restart the Redis server. As soon as I reboot or restart the connection is lost. Is there…
Soumya Simanta
  • 11,523
  • 24
  • 106
  • 161
4
votes
1 answer

Redis behavior with multiple concurrent programs doing read/del on the same hash key

I've a program (program_1) (Jedis-based) that writes to a Redis HASH (KEY_1) on a regular basis. I've another program (program_2) (separate JVM process) that executes periodically, and in a Redis transaction does the following: Transaction…
Soumya Simanta
  • 11,523
  • 24
  • 106
  • 161
4
votes
1 answer

Redis performance on AWS EC2 Micro Instance

I have made a funny observation on my Redis instance deployed on my AWS EC2 Micro instance ( Test environment) I was measuring the execution times of various operations that have to hit Redis. To summarise, the execution times ( average) are shown…
Kris Ogirri
  • 161
  • 1
  • 14
4
votes
3 answers

Jedis is running out of resource instances, web application blocks

I'm running a Tomcat application which uses Jedis to access a Redis database. Form time to time the whole application blocks. By monitoring Tomcat using JavaMelody I found out that the problem seems be related to the JedisPool when a object requests…
Flo
  • 27,355
  • 15
  • 87
  • 125
4
votes
1 answer

redis pub sub with jedis , sub crashes with error

All I have installed latest Redis 2.4.16 and trying to use its Pub/Sub system with java. I am putting a message to a channel every second. There is no issue with Publisher but Subscriber crashes with the message…
baba.kabira
  • 3,111
  • 2
  • 26
  • 37