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

WHY Can't release jedis resource using jedis pool on tomcat

Using Tomcat to run a web app. and I use jedis to connect to our redis server. Every method that I use is call jedis.close() in finallay block but it look like not return the jedis resources to the pool. using netstat -atnlp|grep 6379 The…
BeeNoisy
  • 1,254
  • 1
  • 14
  • 23
0
votes
1 answer

Store ListBuffer[List[Double]] with Redis

I'm using Redis as catching in a play application. With Redis, I can store some string list associated to a key string like in the case class Cache1 : case class Cache1(val hostname : String, val port : Int, val timeout : Int) { val pool :…
alifirat
  • 2,899
  • 1
  • 17
  • 33
0
votes
0 answers

how to solve read timeout on redis?

I'm the new to Redis. In my case, there is a project A insert data to redis maybe 10000 records per second. And I have project B to read data from redis to mongodb in every 5 minutes.By the way , both project is coding by java. Project A will work…
v11
  • 2,124
  • 7
  • 26
  • 54
0
votes
1 answer

I'm getting a corrupted value from Spring Redis MessageReceiver

I'm playing with Spring/Redis/Jedis for a simple message queue system. I've brought up a simple test case using just Strings, but for some reason the strings are coming back corrupted. I was originally trying with POJOs, but that also had…
Zipper
  • 7,034
  • 8
  • 49
  • 66
0
votes
0 answers

Dependency Injected JedisPool in custom class returning null in tests

I am using Play framework 2.4 and have created a custom wrapper class around a redis hash using the play-redis plugin. I have an interface: @ImplementedBy(RedisStoreProvider.class) public interface IStoreProvider { long countStore(String…
RichyHBM
  • 798
  • 1
  • 7
  • 18
0
votes
1 answer

Update value after Expiration of the key in Redis

I am using Redis for cache some key value pairs.And I put TTL for that keys So it should be deleted after that timeout.But instead of deletion I want to reset the value when the key expires.Is that possible? If so can anyone send me how to do this?…
Jinu Santh Rose
  • 323
  • 3
  • 15
0
votes
0 answers

Redis lrange OutOfMemory error

Pipeline pipeline = jedis.pipelined(); long len = jedis.llen(table); List tableKeys = jedis.lrange(table, (long) 0, len); for (String key : tableKeys) { pipeline.del(key); pipeline.lrem(table,…
user160108
  • 930
  • 3
  • 8
  • 38
0
votes
1 answer

jedis llen result not equal redis llen

I meet a very weird problem about Redis and its Java client Jedis. I have two list in Redis named workMQ and backupMQ, when I execute llen workMQ in redis-cli, it returns 16. However when I execute jedis.llen("workMQ") in Java code with Jedis, it…
Armstrongya
  • 795
  • 1
  • 6
  • 9
0
votes
1 answer

Spring Jedis. SCAN and KEYS keys mismatch

I put in redis a key-value, where key is UUID converted to a byte array, for space optimization. "3DEBB752-654A-4206-89BA-D3517237312E" -> [-119, -70, -45, 81, 114, 55, 49, 46, 61, -21, -73, 82, 101, 74, 66, 6]. I'm using Spring Jedis to get data…
0
votes
0 answers

Spring data redis master and slave configuration in application-context.xml

I have done a poc on spring data redis by using jedis connection factory and redis template which is working fine and getting results fast with single node, but now i want to use master to write and child for read to improve reading performance so…
Balaji
  • 151
  • 4
  • 15
0
votes
1 answer

Different connection exceptions in Redis

I am using Redis in server mode and not in Cluster mode. I have 3 instances of Redis Server running, 3 slaves corresponding to these 3 masters. I also have 3 Sentinels each monitoring all the three masters. To connect to my Sentinels and create a…
abi_pat
  • 572
  • 2
  • 12
  • 35
0
votes
1 answer

Use Sedis pool is Play! Framework object

From Play! 2.4 (Scala) Sedis plugin should be injected in class using: class TryIt @Inject()(sedisPool: Pool) extends Controller { val directValue: String = sedisPool.withJedisClient(client => client.get("someKey")) } But I need to use it in…
PsychoX
  • 1,088
  • 4
  • 21
  • 43
0
votes
1 answer

Lua script for scan with 'match' and 'count' constraints

I am using Jedis. I need a Lua script to scan for a pattern with a specified limit. I don't know how to pass the parameters inside Lua script. Sample Code: String script="return …
Karthikeyan Gopall
  • 5,469
  • 2
  • 19
  • 35
0
votes
0 answers

Using futures for making parallel redis cache calls

I'm trying to do a multi-get on my redis data store which is distributed across multiple shards. However the keys I want to do this on do not belong to the same shard so I can't use redis' inbuilt multi-get. Instead I'm trying to use futures to…
Ole Gooner
  • 567
  • 2
  • 10
  • 25
0
votes
1 answer

Lpush and Zadd methods of Jedis not found in Jmeter

I have written a beanshell sampler which has the objective of setting the multiple values for a single key. I tried with lpush just for the start. Then I went on using the zadd method which I believe is for adding multiple values for a single…
katebl58
  • 133
  • 1
  • 13