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
0
votes
1 answer

Installing and trying jesque-web

I am running redis on my laptop for trying out and learning with default config file located at /etc/redis/6379.conf. you can see at http://paste.ubuntu.com/10678722/ I want to try jesque-web on my laptop so to install and trying I followed steps…
Alok
  • 7,734
  • 8
  • 55
  • 100
0
votes
1 answer

How to make Redis save LRU data to disk?

How can I make REDISsave least recently used data to disk in order to save some memory? I have seen the documentation of REDIS but I only found how to set the memory limit to a specific amount of MB and the all eviction policies say that when a new…
flashdisk
  • 3,652
  • 3
  • 16
  • 22
0
votes
1 answer

Updating and retrieving keys in Redis

I am using Redis key-value pair for storing the data. The data against a particular key can change at any point of time, so after every retrieval request I asynchronously update the data stored against the requested key so that the next request can…
viks1010
  • 101
  • 8
0
votes
0 answers

Handle Jedis timeout

I have a Groovy script that uses the Jedis API. Once in a while, the Jedis client times out. I understand that timeout is by default set to 2000 and it can be customized. But I'm wondering if there is a way to handle this exception so that the…
jp92
  • 1
  • 1
0
votes
1 answer

Spring data redis, multi-threading issue with Jedis

I am using redis in a heavily multi-threaded java application and getting intermittent ClassCastExceptions. Reading through various discussions seemed to point out this might be because the Jedis connection instance getting shared between multiple…
user2111500
  • 63
  • 2
  • 9
0
votes
1 answer

Redis lindex works but not lpop

I'm seeing this strange behavior. I do a lpush to a key. There is a different service that listens to key notifications and tries to lpop the value. But strangely it returns null. If I do a lindex with 0 as index, I get the value. So, I know for…
user3261334
  • 139
  • 4
  • 13
0
votes
1 answer

jedis usage in servlet

import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import redis.clients.jedis.*; public class Welcome extends HttpServlet { Jedis jedis; public void init(ServletConfig sc) throws ServletException { Jedis jedis = new…
Karthikeyan Gopall
  • 5,469
  • 2
  • 19
  • 35
0
votes
2 answers

jedis psubscribe causes application to hang

I'm using redis 2.8.19 and jedis 2.6.0 pool = new JedisPool( new JedisPoolConfig(), "ip", 6379, 0 ); System.out.println( "test2" ); Jedis jedis = pool.getResource(); jedis.psubscribe( new KeyExpiredListener(), "__key*__:*"…
0
votes
0 answers

Jedis.keys() pagination / iterable

Jedis.keys("pattern") is returning millions of large key strings causing OutOfMemoryError. Is there anyway, I can get a paginated result or any iterable resultset? Jedis jcRead = rmgRead.getRedisClientFromPool(); // some more code in b/w // this is…
loc
  • 125
  • 1
  • 7
0
votes
1 answer

ERR EXEC without MULTI - spring redis+jedis

I meet with exception during a transactional operation with spring-data-redis RedisTemplate cartCache; public void create(final Cartline cartline) { Object txResults = cartCache.execute(new SessionCallback() { public List…
SpringKo
  • 1
  • 2
0
votes
1 answer

Forcing Redis to Timeout

I am trying to force my redis client to timeout for testing purpose and I a fail to achieve so. I specify timeout to 2ms in my config and the set operation I perform takes > 2ms so why it does not timeout? Are these settings are kind of soft…
Richeek
  • 2,068
  • 2
  • 29
  • 37
0
votes
0 answers

Reading spreadsheet from Jedis and loading them to Redis

I am new to this REDIS database and I am trying to use Jedis (by popularity)... My requirement is to read a spreadsheet of data and load them on REDIS using Jedis (java client for redis). I can read and get the spreadsheet data in java ( I can use…
0
votes
1 answer

jedis connection exception: socket write error

Using jedis client to save data to redis localhost. Once I connect to redisHost using jedis, I am not disconnecting as long as I get messages Is that an issue? Tried to change the timeout from default 2000 to 6000 but still the same…
user1609085
  • 855
  • 3
  • 17
  • 33
0
votes
1 answer

Use Redis with Wildfly java application server

I use Wildfly application server and would like to use Redis as datastore service. Redis server is running on the same machine as Wildfly. Do I need some special configuration for Wildfly to access Redis from classes deployed on it? I use jedis as…
0
votes
2 answers

is there a way to perform get and set atomically in redis?

I'm using jedis, and wish to get the result of a key and modify it and then store it back, String dataToModify = jedis.get(parent_id); //some modify eg: modifiedData = dataToModify + "modify"; jedis.set(parent_id, modifiedData); but I then…
user2810081
  • 589
  • 1
  • 8
  • 27