Skip to content

Instantly share code, notes, and snippets.

View JonCole's full-sized avatar

Jon Cole JonCole

  • Microsoft Corporation
View GitHub Profile
@deepakverma
deepakverma / Jedis.java
Last active January 22, 2019 19:31
Jedis Sample
try(Jedis jedis = jedisPool.getResource())
{
//pipeline
Pipeline p = jedis.pipelined();
Response<String> pipeIdResponse = p.get("ID");
Response<String> pipeNameResponse = p.get("Name");
p.sync();
String id = pipeIdResponse.get();
String name = pipeNameResponse.get();

REDIS CLUSTER ERRORS

INTRODUCTION:

Redis cluster provides automatic sharding of data where every key is conceptually a part of something called a hash slot. There are 16384 hashslots in Redis Cluster, and these hashslots are distributed across all shards of a cluster and every shard is responsible for serving queries for a subset of these 16384 hashslots. For details of the Redis cluster refer this tutorial