-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add CLIENT ID
and CLIENT GETNAME
commands.
#98
Add CLIENT ID
and CLIENT GETNAME
commands.
#98
Conversation
java/client/src/main/java/glide/api/commands/ConnectionManagementClusterCommands.java
Outdated
Show resolved
Hide resolved
@@ -118,4 +122,40 @@ public CompletableFuture<ClusterValue<String>> info( | |||
return commandManager.submitNewCommand( | |||
Info, options.toArgs(), route, response -> ClusterValue.of(handleObjectResponse(response))); | |||
} | |||
|
|||
/** {@inheritDoc} The command will be routed a random node. */ |
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.
Do we want to follow this throughout - whenever we have a command with an extra comment when used in clustermode?
Problem I have is it breaks convention and we now have documentation in the implementation files.
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.
Fixed in cf519a0
if (route.isSingleNodeRoute()) { | ||
return ClusterValue.ofSingleValue(handleObjectOrNullResponse(response)); | ||
} | ||
if (response.hasConstantResponse()) { |
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.
We should have a test for this in java/client/src/test/java/glide/api/RedisClusterClientTest.java
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.
Tested in custom_command_returns_single_value_on_constant_response
(a part of another PR), already merged on upstream
"Modules", | ||
"Errorstats", | ||
"Cluster", | ||
"Keyspace"); |
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.
Did this change...? I don't understand why you have so many spotless differences in this file.
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.
Oh... this is the file that failed spotless before. This will get fixed by rebase, right?
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.
Rebased and cleaned
Signed-off-by: Yury-Fridlyand <[email protected]>
e220cc5
to
c31877e
Compare
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
68ba1a0
into
java/integ_yuryf_client_id_getname
* Add `CLIENT ID` and `CLIENT GETNAME` commands. Signed-off-by: Yury-Fridlyand <[email protected]>
* Add `CLIENT ID` and `CLIENT GETNAME` commands. Signed-off-by: Yury-Fridlyand <[email protected]>
* Add `CLIENT ID` and `CLIENT GETNAME` commands. (#98) Signed-off-by: Yury-Fridlyand <[email protected]> Co-authored-by: Andrew Carbonetto <[email protected]> Co-authored-by: SanHalacogluImproving <[email protected]>
* Add `CLIENT ID` and `CLIENT GETNAME` commands. (#98) Signed-off-by: Yury-Fridlyand <[email protected]> Co-authored-by: Andrew Carbonetto <[email protected]> Co-authored-by: SanHalacogluImproving <[email protected]>
Features:
CLIENT ID
https://redis.io/commands/client-id/CLIENT GETNAME
https://redis.io/commands/client-getname/