ringles commented on a change in pull request #5749:
URL: https://github.com/apache/geode/pull/5749#discussion_r525540590
##########
File path:
geode-redis/src/main/java/org/apache/geode/redis/internal/executor/server/SlowlogExecutor.java
##########
@@ -30,7 +27,21 @@
@Override
public RedisResponse executeCommand(Command command,
ExecutionHandlerContext context) {
- List<ByteArrayWrapper> values = new ArrayList<ByteArrayWrapper>();
- return RedisResponse.array(values);
+ String subCommand = command.getStringKey();
+ if (subCommand.toLowerCase().equals("get")) {
+ return RedisResponse.emptyArray();
+ } else if (subCommand.toLowerCase().equals("len")) {
+ return RedisResponse.integer(0);
+ } else if (subCommand.toLowerCase().equals("reset")) {
+ return RedisResponse.ok();
+ }
+ throw new
RedisParametersMismatchException(wrongNumberOfArgumentsErrorMessage());
+ }
+
+ public String wrongNumberOfArgumentsErrorMessage() {
+ String result;
+ result = String
+ .format("Unknown subcommand or wrong number of arguments for 'len'.
Try SLOWLOG HELP.");
+ return result;
Review comment:
Also fixed when we refactored. Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]