-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support INFO command in UnifiedJedis #4078
Conversation
|
||
private static final Object DUMMY_OBJECT = new Object(); | ||
|
||
private final Map<Object, Object> replies; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not Map<HostAndPort, Object> replies;
or NodeID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we don't a specified solution for this, e.g. in ConnectionProvider and CommandExecutor interfaces, yet. For example, in ConnectionProvider interface the respective method definition is Map<?, ?> getConnectionMap()
.
@@ -353,6 +358,16 @@ public String configSet(String parameter, String value) { | |||
return checkAndBroadcastCommand(commandObjects.configSet(parameter, value)); | |||
} | |||
|
|||
public final JedisBroadcastReplies info() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be a bit strange API when connecting to standalone Redis using let's say UnifiedJedis.
Then you will get a JedisBroadcastReplies
which makes sense for the cluster.
But in case of standalone, you will get JedisBroadcastReplies
, and to get to actual value need to invoke JedisBroadcastReplies::getReplies(with host/port)
or end up with something like
infoReplies.getReplies().values().stream().findFirst().get()
just to get the value
@uglide @sazzad16
Here is a draft with the proposal. |
After a discussion with the team was decided to proceed with approach selected in PR 4079, |
This PR target's to resolve #4094
In PR 4079 is suggested simplified approach were in case of cluster, INFO
command is send to arbitrary node.
This PR suggests broadcasting the command to all node's from the cluster and return's aggregated response in complex object