GEODE-10278: Remove the geode-for-redis example
This module is being removed from the geode repository, so we need to remove
the corresponding example as well.
diff --git a/README.md b/README.md
index c7ec472..4276218 100644
--- a/README.md
+++ b/README.md
@@ -110,7 +110,6 @@
* SpringBoot Application
* HTTP Session replication
-* [Geode for Redis](geodeForRedis/README.md)
* Memcached
* Spark Connector
diff --git a/build.gradle b/build.gradle
index 3816169..551fdf9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -102,8 +102,6 @@
delete 'server-ln-2'
delete 'server-ny-1'
delete 'server-ny-2'
- delete 'redisServer1'
- delete 'redisServer2'
}
}
clean.finalizedBy cleanServer
diff --git a/geodeForRedis/README.md b/geodeForRedis/README.md
deleted file mode 100644
index 58c885a..0000000
--- a/geodeForRedis/README.md
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-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.
--->
-
-# Geode for Redis Example using Jedis Client
-
-This example demonstrates simple operations on a Geode for Redis cluster using the Jedis Client.
-For more information on starting and configuring a Geode for Redis cluster, please refer to the
-Geode documentation for [Geode for Redis](http://geode.apache.org/docs/guide/tools_modules/geode_for_redis.html).
-
-In this example, two servers are started with geode-for-redis enabled, some data is added to the
-cluster using the Jedis client.
-
-This example assumes that Java and Geode are installed.
-
-## Set up the cluster
-1. Set directory `geode-examples/geodeForRedis` to be the current working directory.
-Each step in this example specifies paths relative to that directory.
-
-2. Build the example
-
- $ ../gradlew build
-
-3. Run a script that starts a locator and two servers with geode-for-redis enabled.
-
- $ ../gradlew start
-
-## Run the example program
-Run the example to populate the cluster with some initial leaderboard data, increment
-the scores associated with each member, then remove the lowest scoring member, printing the
-contents of the leaderboard at each step.
-
- $ ../gradlew run
-
-## Optionally use the redis-cli to issue additional commands
-
-1. If you do not have `redis-cli` installed, follow the "Installing Redis" instructions
-at: https://redis.io/topics/quickstart
-
-2. Start the `redis-cli` in cluster mode, specifying the port used to start the geode-for-redis
-server:
-
- $ redis-cli -c -p 6379
-
-3. Experiment with other commands:
-
- $ set stringKey aString
- OK
-
- $ get stringKey
- "aString"
-
- $ append stringKey WithAppendedData
- (integer) 23
-
- $ get stringKey
- "aStringWithAppendedData"
-
- $ del stringKey
- (integer) 1
-
- $ get stringKey
- (nil)
-
-Other supported commands can be listed using the `COMMAND` command.
-
-## Shut down the cluster and (optionally) clean up the directory
-1. Shut down the cluster:
-
- $ ../gradlew stop
-
-2. If desired, clean up the generated directories containing
-logs:
-
- $ ../gradlew cleanServer
diff --git a/geodeForRedis/build.gradle b/geodeForRedis/build.gradle
deleted file mode 100644
index 1abef25..0000000
--- a/geodeForRedis/build.gradle
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-
-dependencies {
- implementation("redis.clients:jedis")
-}
-
-
-task installRedis(type: Copy) {
- from {
- zipTree(tarTree(rootProject.configurations.geodeDistribution.singleFile)
- .matching { include("**/geode-for-redis-*.zip")}.singleFile )
- }
- eachFile { fcp ->
- fcp.path = fcp.path.replaceFirst("^geode-for-redis-[a-zA-Z0-9\\.\\-]+\\/", "geode-for-redis/")
- }
-
- into buildDir
- includeEmptyDirs false
-}
-
-start.dependsOn(installRedis)
diff --git a/geodeForRedis/scripts/start.gfsh b/geodeForRedis/scripts/start.gfsh
deleted file mode 100644
index f56b505..0000000
--- a/geodeForRedis/scripts/start.gfsh
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.
- */
-
-start locator --name=locator --bind-address=localhost
-
-set variable --name=STAR --value=*
-start server --name=redisServer1 --locators=localhost[10334] --server-port=0 \
- --J=-Dgemfire.geode-for-redis-enabled=true \
- --J=-Dgemfire.geode-for-redis-port=6379 \
- --J=-Dgemfire.geode-for-redis-bind-address=127.0.0.1 \
- --J=-Dgemfire.geode-for-redis-redundant-copies=1 \
- --classpath=../build/geode-for-redis/lib/${STAR}
-
-start server --name=redisServer2 --locators=localhost[10334] --server-port=0 \
- --J=-Dgemfire.geode-for-redis-enabled=true \
- --J=-Dgemfire.geode-for-redis-port=6380 \
- --J=-Dgemfire.geode-for-redis-bind-address=127.0.0.1 \
- --J=-Dgemfire.geode-for-redis-redundant-copies=1 \
- --classpath=../build/geode-for-redis/lib/${STAR}
diff --git a/geodeForRedis/scripts/stop.gfsh b/geodeForRedis/scripts/stop.gfsh
deleted file mode 100644
index 9755688..0000000
--- a/geodeForRedis/scripts/stop.gfsh
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * 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.
- */
-
-connect --locator=127.0.0.1[10334]
-shutdown --include-locators=true
diff --git a/geodeForRedis/src/main/java/org/apache/geode_examples/geodeForRedis/Example.java b/geodeForRedis/src/main/java/org/apache/geode_examples/geodeForRedis/Example.java
deleted file mode 100644
index e59f485..0000000
--- a/geodeForRedis/src/main/java/org/apache/geode_examples/geodeForRedis/Example.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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_examples.geodeForRedis;
-
-import java.time.Duration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-
-import redis.clients.jedis.HostAndPort;
-import redis.clients.jedis.JedisCluster;
-
-public class Example {
- public static final String SORTED_SET_KEY = "{tag}leaderboard";
-
- public static void main(String[] args) {
- JedisCluster jedis = new JedisCluster(new HostAndPort("127.0.0.1", 6379),
- (int) Duration.ofMinutes(2).toMillis());
-
- populateSortedSet(jedis);
-
- printSortedSetContents("Initial leaderboard with key '" + SORTED_SET_KEY + "': ", jedis);
-
- System.out.println("Updating scores...");
- modifyScores(jedis);
-
- printSortedSetContents("Updated leaderboard with key '" + SORTED_SET_KEY + "': ", jedis);
-
- System.out.println("Removing lowest scoring member...");
- jedis.zpopmin(SORTED_SET_KEY);
-
- printSortedSetContents("Updated leaderboard with key '" + SORTED_SET_KEY + "': ", jedis);
- }
-
- private static void populateSortedSet(JedisCluster jedis) {
- Map<String, Double> memberScoreMap = new HashMap<>();
- memberScoreMap.put("John", 0.0);
- memberScoreMap.put("Maria", 0.0);
- memberScoreMap.put("Jose", 0.0);
- memberScoreMap.put("Wei", 0.0);
- memberScoreMap.put("Ahmed", 0.0);
-
- jedis.zadd(SORTED_SET_KEY, memberScoreMap);
- }
-
- private static void printSortedSetContents(String baseMessage, JedisCluster jedis) {
- System.out
- .println(baseMessage + jedis.zrevrangeWithScores(SORTED_SET_KEY, 0, Integer.MAX_VALUE));
- }
-
- private static void modifyScores(JedisCluster jedis) {
- Random random = new Random();
- jedis.zincrby(SORTED_SET_KEY, random.nextInt(10_000) / 100.0, "John");
- jedis.zincrby(SORTED_SET_KEY, random.nextInt(10_000) / 100.0, "Maria");
- jedis.zincrby(SORTED_SET_KEY, random.nextInt(10_000) / 100.0, "Jose");
- jedis.zincrby(SORTED_SET_KEY, random.nextInt(10_000) / 100.0, "Wei");
- jedis.zincrby(SORTED_SET_KEY, random.nextInt(10_000) / 100.0, "Ahmed");
- }
-}
diff --git a/gradle/rat.gradle b/gradle/rat.gradle
index 2b569c6..b22e4fe 100644
--- a/gradle/rat.gradle
+++ b/gradle/rat.gradle
@@ -71,8 +71,6 @@
'**/locator-ny/**',
'**/server-ny-1/**',
'**/server-ny-2/**',
- '**/redisServer1/**',
- '**/redisServer2/**',
'**/META-INF/**'
]
diff --git a/settings.gradle b/settings.gradle
index fc595ce..a2165fa 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -43,7 +43,6 @@
include 'micrometerMetrics'
include 'compression'
include 'rest'
-include 'geodeForRedis'
// Logic for defining a custom Geode clone for integration with this project
// Define `-PgeodeCompositeDirectory` to your geode root, default `../geode`