From 1e0e27d1258ec3171e94a14074d3a9c73474e3ca Mon Sep 17 00:00:00 2001
From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
Date: Thu, 18 May 2023 17:54:00 +0600
Subject: [PATCH] Add CLUSTER MYSHARDID command
and update CLUSTER BUMPEPOCH command and other tests
---
pom.xml | 4 ++--
src/main/java/redis/clients/jedis/Jedis.java | 9 ++++++++-
src/main/java/redis/clients/jedis/Protocol.java | 3 ++-
.../clients/jedis/commands/ClusterCommands.java | 2 ++
.../jedis/commands/jedis/ClusterCommandsTest.java | 15 ++++++++++++++-
5 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index cfff50b453..78e10c3374 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,8 +80,8 @@
org.hamcrest
- hamcrest-library
- 1.3
+ hamcrest
+ 2.2
test
diff --git a/src/main/java/redis/clients/jedis/Jedis.java b/src/main/java/redis/clients/jedis/Jedis.java
index d9ba05fc59..a0ee4ac7c3 100644
--- a/src/main/java/redis/clients/jedis/Jedis.java
+++ b/src/main/java/redis/clients/jedis/Jedis.java
@@ -8827,7 +8827,7 @@ public String clusterSetConfigEpoch(long configEpoch) {
public String clusterBumpEpoch() {
checkIsInMultiOrPipeline();
connection.sendCommand(CLUSTER, ClusterKeyword.BUMPEPOCH);
- return connection.getStatusCodeReply();
+ return connection.getBulkReply();
}
@Override
@@ -8880,6 +8880,13 @@ public String clusterMyId() {
return connection.getBulkReply();
}
+ @Override
+ public String clusterMyShardId() {
+ checkIsInMultiOrPipeline();
+ connection.sendCommand(CLUSTER, ClusterKeyword.MYSHARDID);
+ return connection.getBulkReply();
+ }
+
@Override
public List