feat : Add support for HOTKEYS command (#4421)#4417
Merged
Conversation
d506e0a to
9c006e6
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds client support for Redis HOTKEYS command family (START/STOP/RESET/GET), including parameter modeling, response parsing, and integration tests (standalone + “unsupported in cluster client” coverage), along with test environment adjustments to run against a Redis build that includes HOTKEYS.
Changes:
- Introduce
HotkeysParams,HotkeysMetric, andHotkeysInfoto model request/response forHOTKEYS. - Wire
HOTKEYSinto command construction/execution paths (CommandObjects,Jedis,UnifiedJedis, pipeline), and explicitly block it for cluster command objects. - Add integration tests for standalone clients and cluster “unsupported” behavior; update test env + formatter includes.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/resources/env/.env.v8.6 | Updates Redis image tag used for v8.6 integration env. |
| src/test/java/redis/clients/jedis/commands/unified/cluster/ClusterHotkeysCommandsTest.java | New unified cluster test asserting HOTKEYS is unsupported. |
| src/test/java/redis/clients/jedis/commands/unified/client/RedisClientHotkeysCommandsTest.java | New unified client integration tests for HOTKEYS lifecycle/options/fields. |
| src/test/java/redis/clients/jedis/commands/unified/HotkeysCommandsTestBase.java | New unified HOTKEYS test base with cleanup hooks. |
| src/test/java/redis/clients/jedis/commands/jedis/HotkeysCommandsTest.java | New Jedis integration tests for HOTKEYS lifecycle/options/fields. |
| src/test/java/redis/clients/jedis/commands/jedis/ClusterHotkeysCommandsTest.java | New Jedis cluster test asserting HOTKEYS is unsupported. |
| src/main/java/redis/clients/jedis/resps/HotkeysInfo.java | New response parser/model for HOTKEYS GET. |
| src/main/java/redis/clients/jedis/params/HotkeysParams.java | New params builder for HOTKEYS START. |
| src/main/java/redis/clients/jedis/commands/ServerCommands.java | Adds HOTKEYS methods to the server commands API. |
| src/main/java/redis/clients/jedis/args/HotkeysMetric.java | Adds metric enum (CPU/NET) for HOTKEYS. |
| src/main/java/redis/clients/jedis/UnifiedJedis.java | Adds HOTKEYS methods to UnifiedJedis. |
| src/main/java/redis/clients/jedis/Protocol.java | Registers HOTKEYS command and related keywords. |
| src/main/java/redis/clients/jedis/PipeliningBase.java | Adds pipeline variants of HOTKEYS commands. |
| src/main/java/redis/clients/jedis/Jedis.java | Implements HOTKEYS methods on Jedis. |
| src/main/java/redis/clients/jedis/CommandObjects.java | Adds command object builders for HOTKEYS subcommands. |
| src/main/java/redis/clients/jedis/ClusterCommandObjects.java | Explicitly throws unsupported for HOTKEYS in cluster command objects. |
| pom.xml | Adds new files to formatter-maven-plugin include list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/test/java/redis/clients/jedis/commands/jedis/HotkeysCommandsTest.java
Outdated
Show resolved
Hide resolved
src/test/java/redis/clients/jedis/commands/unified/cluster/ClusterHotkeysCommandsTest.java
Show resolved
Hide resolved
- standalone mode some response fields might be null
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes : #4421