This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 5e115a6c92d6973f39f606593831fac72b2c3c6a
Author: Jens Deppe <[email protected]>
AuthorDate: Tue Mar 2 14:29:23 2021 -0800

    Add ZADD command for YCSB support
---
 .../geode/redis/internal/RedisCommandType.java     |  4 ++-
 .../apache/geode/redis/internal/ZaddExecutor.java  | 29 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git 
a/geode-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandType.java
 
b/geode-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandType.java
index fd2429d..ee90919 100755
--- 
a/geode-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandType.java
+++ 
b/geode-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandType.java
@@ -284,6 +284,9 @@ public enum RedisCommandType {
   CLUSTER(new ClusterExecutor(), UNSUPPORTED, new 
MinimumParameterRequirements(1)),
   READONLY(new ReadonlyExecutor(), UNSUPPORTED, new 
MinimumParameterRequirements(1)),
 
+  /*********** Sorted Sets **********/
+  ZADD(new ZaddExecutor(), SUPPORTED, new MinimumParameterRequirements(1)),
+
   /////////// UNIMPLEMENTED /////////////////////
 
   ACL(null, UNIMPLEMENTED),
@@ -368,7 +371,6 @@ public enum RedisCommandType {
   XACK(null, UNIMPLEMENTED),
   XCLAIM(null, UNIMPLEMENTED),
   XPENDING(null, UNIMPLEMENTED),
-  ZADD(null, UNIMPLEMENTED),
   ZCARD(null, UNIMPLEMENTED),
   ZCOUNT(null, UNIMPLEMENTED),
   ZINCRBY(null, UNIMPLEMENTED),
diff --git 
a/geode-redis/src/main/java/org/apache/geode/redis/internal/ZaddExecutor.java 
b/geode-redis/src/main/java/org/apache/geode/redis/internal/ZaddExecutor.java
new file mode 100644
index 0000000..e87fdb1
--- /dev/null
+++ 
b/geode-redis/src/main/java/org/apache/geode/redis/internal/ZaddExecutor.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+
+package org.apache.geode.redis.internal;
+
+import org.apache.geode.redis.internal.executor.AbstractExecutor;
+import org.apache.geode.redis.internal.executor.RedisResponse;
+import org.apache.geode.redis.internal.netty.Command;
+import org.apache.geode.redis.internal.netty.ExecutionHandlerContext;
+
+public class ZaddExecutor extends AbstractExecutor {
+
+  @Override
+  public RedisResponse executeCommand(Command command, ExecutionHandlerContext 
context) {
+    return RedisResponse.integer(1);
+  }
+}

Reply via email to