Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sazzad16
Copy link
Contributor

@sazzad16 sazzad16 commented Feb 2, 2025

No description provided.

@sazzad16 sazzad16 marked this pull request as ready for review February 3, 2025 06:06

private static final Object DUMMY_OBJECT = new Object();

private final Map<Object, Object> replies;
Copy link
Contributor

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?

Copy link
Contributor Author

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() {
Copy link
Contributor

@ggivo ggivo Feb 11, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants