[geode] branch GEODE-9892-Create-Infrastructure-for-Redis-Lists updated: Flesh out NullRedisList
This is an automated email from the ASF dual-hosted git repository. ringles pushed a commit to branch GEODE-9892-Create-Infrastructure-for-Redis-Lists in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/GEODE-9892-Create-Infrastructure-for-Redis-Lists by this push: new c5f6b6e Flesh out NullRedisList c5f6b6e is described below commit c5f6b6e5fa781247138b21d7f166d63bb7040916 Author: Ray Ingles AuthorDate: Tue Jan 4 17:25:59 2022 -0500 Flesh out NullRedisList --- .../geode/redis/internal/data/NullRedisList.java| 21 + 1 file changed, 21 insertions(+) diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java index ced1c7e..55a4b74 100644 --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java +++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java @@ -16,7 +16,13 @@ package org.apache.geode.redis.internal.data; +import static java.util.Collections.emptyList; + import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.apache.geode.cache.Region; class NullRedisList extends RedisList { @@ -29,4 +35,19 @@ class NullRedisList extends RedisList { return true; } + @Override + public long lpush(List elementsToAdd, Region region, RedisKey key) { +region.create(key, new RedisList(elementsToAdd)); +return elementsToAdd.size(); + } + + @Override + public Collection lpop(Region region, RedisKey key, int popCount) { +return emptyList(); + } + + @Override + public int llen() { +return 0; + } }
[geode] branch GEODE-9892-Create-Infrastructure-for-Redis-Lists updated: Actually builds
This is an automated email from the ASF dual-hosted git repository. ringles pushed a commit to branch GEODE-9892-Create-Infrastructure-for-Redis-Lists in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/GEODE-9892-Create-Infrastructure-for-Redis-Lists by this push: new 55635d1 Actually builds 55635d1 is described below commit 55635d1be5a0b7ce5cda4cc8d204b033fd5d385a Author: Ray Ingles AuthorDate: Tue Jan 4 17:21:30 2022 -0500 Actually builds --- .../internal/data/NullRedisDataStructures.java | 1 + .../geode/redis/internal/data/NullRedisList.java | 48 +- .../geode/redis/internal/data/RedisDataType.java | 2 + .../geode/redis/internal/data/RedisList.java | 105 - .../internal/data/collections/SizeableList.java| 69 ++ 5 files changed, 94 insertions(+), 131 deletions(-) diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisDataStructures.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisDataStructures.java index e0e750e..5f16975 100644 --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisDataStructures.java +++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisDataStructures.java @@ -20,4 +20,5 @@ public class NullRedisDataStructures { public static final NullRedisSortedSet NULL_REDIS_SORTED_SET = new NullRedisSortedSet(); public static final NullRedisHash NULL_REDIS_HASH = new NullRedisHash(); public static final NullRedisData NULL_REDIS_DATA = new NullRedisData(); + public static final NullRedisList NULL_REDIS_LIST = new NullRedisList(); } diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java index 1e1f1cf..ced1c7e 100644 --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java +++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java @@ -16,20 +16,12 @@ package org.apache.geode.redis.internal.data; -import static java.util.Collections.emptyList; - -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.apache.geode.cache.Region; +import java.util.ArrayList; class NullRedisList extends RedisList { NullRedisList() { -super(new HashSet<>()); +super(new ArrayList<>()); } @Override @@ -37,40 +29,4 @@ class NullRedisList extends RedisList { return true; } - @Override - public Collection spop(Region region, RedisKey key, int popCount) { -return emptyList(); - } - - @Override - public Collection srandmember(int count) { -return emptyList(); - } - - @Override - public boolean sismember(byte[] member) { -return false; - } - - @Override - public int scard() { -return 0; - } - - @Override - public long sadd(List membersToAdd, Region region, RedisKey key) { -region.create(key, new RedisSet(membersToAdd)); -return membersToAdd.size(); - } - - @Override - public long srem(List membersToRemove, Region region, RedisKey key) { -return 0; - } - - @Override - public Set smembers() { -// some callers want to be able to modify the set returned -return Collections.emptySet(); - } } diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataType.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataType.java index e44eafe..dfb26c6 100755 --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataType.java +++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataType.java @@ -18,6 +18,7 @@ package org.apache.geode.redis.internal.data; import static org.apache.geode.redis.internal.data.NullRedisDataStructures.NULL_REDIS_DATA; import static org.apache.geode.redis.internal.data.NullRedisDataStructures.NULL_REDIS_HASH; +import static org.apache.geode.redis.internal.data.NullRedisDataStructures.NULL_REDIS_LIST; import static org.apache.geode.redis.internal.data.NullRedisDataStructures.NULL_REDIS_SET; import static org.apache.geode.redis.internal.data.NullRedisDataStructures.NULL_REDIS_SORTED_SET; import static org.apache.geode.redis.internal.data.NullRedisDataStructures.NULL_REDIS_STRING; @@ -28,6 +29,7 @@ public enum RedisDataType { REDIS_STRING("string", NULL_REDIS_STRING), REDIS_HASH("hash", NULL_REDIS_HASH), REDIS_SET("set", NULL_REDIS_SET), + REDIS_LIST("list", NULL_REDIS_LIST), REDIS_SORTED_SET("sortedset", NULL_REDIS_SORTED_SET); private final String toStringValue; diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java
[geode] 01/01: Initial (broken) commit
This is an automated email from the ASF dual-hosted git repository. ringles pushed a commit to branch GEODE-9892-Create-Infrastructure-for-Redis-Lists in repository https://gitbox.apache.org/repos/asf/geode.git commit 90b39edc4638e267929f3d1f750eae8d56e074e8 Author: Ray Ingles AuthorDate: Tue Jan 4 14:26:48 2022 -0500 Initial (broken) commit --- .../geode/redis/internal/data/NullRedisList.java | 76 ++ .../geode/redis/internal/data/RedisList.java | 297 + .../serialization/DataSerializableFixedID.java | 2 +- 3 files changed, 374 insertions(+), 1 deletion(-) diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java new file mode 100644 index 000..1e1f1cf --- /dev/null +++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java @@ -0,0 +1,76 @@ +/* + * 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.data; + +import static java.util.Collections.emptyList; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.apache.geode.cache.Region; + +class NullRedisList extends RedisList { + + NullRedisList() { +super(new HashSet<>()); + } + + @Override + public boolean isNull() { +return true; + } + + @Override + public Collection spop(Region region, RedisKey key, int popCount) { +return emptyList(); + } + + @Override + public Collection srandmember(int count) { +return emptyList(); + } + + @Override + public boolean sismember(byte[] member) { +return false; + } + + @Override + public int scard() { +return 0; + } + + @Override + public long sadd(List membersToAdd, Region region, RedisKey key) { +region.create(key, new RedisSet(membersToAdd)); +return membersToAdd.size(); + } + + @Override + public long srem(List membersToRemove, Region region, RedisKey key) { +return 0; + } + + @Override + public Set smembers() { +// some callers want to be able to modify the set returned +return Collections.emptySet(); + } +} diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java new file mode 100644 index 000..6a3bfbd --- /dev/null +++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java @@ -0,0 +1,297 @@ +/* + * 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.data; + +import static java.util.Collections.emptyList; +import static org.apache.geode.internal.JvmSizeUtils.memoryOverhead; +import static org.apache.geode.redis.internal.data.RedisDataType.REDIS_SET; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Random; +import java.util.Set; + +import it.unimi.dsi.fastutil.bytes.ByteArrays; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; + +import org.apache.geode.DataSerializer; +import org.apache.geode.annotations.VisibleForTesting; +import
[geode] branch GEODE-9892-Create-Infrastructure-for-Redis-Lists created (now 90b39ed)
This is an automated email from the ASF dual-hosted git repository. ringles pushed a change to branch GEODE-9892-Create-Infrastructure-for-Redis-Lists in repository https://gitbox.apache.org/repos/asf/geode.git. at 90b39ed Initial (broken) commit This branch includes the following new commits: new 90b39ed Initial (broken) commit The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode] branch develop updated (68f074d -> 5e9c775)
This is an automated email from the ASF dual-hosted git repository. donalevans pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 68f074d Enable tests again (#7233) add 5e9c775 GEODE-9828: support SDIFFSTORE command (#7172) No new revisions were added by this update. Summary of changes: .../tools_modules/geode_for_redis.html.md.erb | 1 + geode-for-redis/README.md | 1 + ...va => SDiffStoreNativeRedisAcceptanceTest.java} | 2 +- .../server/AbstractHitsMissesIntegrationTest.java | 12 +- .../executor/set/AbstractSDiffIntegrationTest.java | 132 -- .../set/AbstractSDiffStoreIntegrationTest.java | 196 + ...ionTest.java => SDiffStoreIntegrationTest.java} | 2 +- .../redis/internal/commands/RedisCommandType.java | 4 +- .../commands/executor/set/SetOpExecutor.java | 38 ++-- .../redis/internal/data/AbstractRedisData.java | 9 + .../apache/geode/redis/internal/data/RedisSet.java | 61 ++- .../geode/redis/internal/data/delta/DeltaType.java | 1 + .../{AddByteArrays.java => ReplaceByteArrays.java} | 21 ++- .../redis/internal/services/RegionProvider.java| 14 ++ .../geode/redis/internal/data/RedisSetTest.java| 44 - 15 files changed, 363 insertions(+), 175 deletions(-) copy geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/{SMoveNativeRedisAcceptanceTest.java => SDiffStoreNativeRedisAcceptanceTest.java} (92%) create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSDiffStoreIntegrationTest.java copy geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/{SMoveIntegrationTest.java => SDiffStoreIntegrationTest.java} (92%) copy geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/{AddByteArrays.java => ReplaceByteArrays.java} (77%)
[geode] branch develop updated (237d3ac -> 68f074d)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 237d3ac GEODE-9911: Allow ExecutorServiceRule to name threads (#7231) add 68f074d Enable tests again (#7233) No new revisions were added by this update. Summary of changes: .../executor/hash/HashesAndCrashesDUnitTest.java | 260 +++-- 1 file changed, 136 insertions(+), 124 deletions(-)
[geode] branch develop updated (5c76706 -> 237d3ac)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 5c76706 GEODE-9912: Add unique identifier to DUnit log lines (#7232) add 237d3ac GEODE-9911: Allow ExecutorServiceRule to name threads (#7231) No new revisions were added by this update. Summary of changes: .../test/junit/rules/ExecutorServiceRule.java | 35 ++ 1 file changed, 29 insertions(+), 6 deletions(-)
[geode] branch develop updated (87b1007 -> 5c76706)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 87b1007 Revert "GEODE-9854: Orphaned .drf file causing memory leak (#7145)" (#7209) add 5c76706 GEODE-9912: Add unique identifier to DUnit log lines (#7232) No new revisions were added by this update. Summary of changes: .../java/org/apache/geode/test/dunit/internal/ProcessManager.java | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)
[geode] branch GEODE-9869-Remove-Radish-GFSH-commands updated (bb0581d -> 2c00f83)
This is an automated email from the ASF dual-hosted git repository. ringles pushed a change to branch GEODE-9869-Remove-Radish-GFSH-commands in repository https://gitbox.apache.org/repos/asf/geode.git. from bb0581d Make sure to enable geode-for-redis in tests add 2c00f83 Update test parameter format No new revisions were added by this update. Summary of changes: .../GeodeRedisServerStartupUsingGfshAcceptanceTest.java| 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-)
[geode] branch develop updated (0e787a6 -> 87b1007)
This is an automated email from the ASF dual-hosted git repository. mkevo pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 0e787a6 GEODE-9887: Fix for deadlock during server shutdown (#7194) add 87b1007 Revert "GEODE-9854: Orphaned .drf file causing memory leak (#7145)" (#7209) No new revisions were added by this update. Summary of changes: ...ObjectThatAreNoLongerNeededIntegrationTest.java | 407 - .../org/apache/geode/internal/cache/Oplog.java | 70 +--- 2 files changed, 20 insertions(+), 457 deletions(-) delete mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionCompactorClearsObjectThatAreNoLongerNeededIntegrationTest.java
[geode] branch develop updated (d974f15 -> 0e787a6)
This is an automated email from the ASF dual-hosted git repository. mkevo pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from d974f15 GEODE-8644: CME will send additional UPDATE_VERSION event via serial … (#7204) add 0e787a6 GEODE-9887: Fix for deadlock during server shutdown (#7194) No new revisions were added by this update. Summary of changes: .../GatewaySenderEventRemoteDispatcher.java| 8 +++ ...atewaySenderEventRemoteDispatcherJUnitTest.java | 68 ++ 2 files changed, 76 insertions(+)