[ https://issues.apache.org/jira/browse/GEODE-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15935317#comment-15935317 ]
ASF GitHub Bot commented on GEODE-2469: --------------------------------------- GitHub user ggreen reopened a pull request: https://github.com/apache/geode/pull/404 Geode 2469 The updated Geode Redis Adapter now works with a sample Spring Data Redis Example [GEODE-2469.pdf](https://github.com/apache/geode/files/785580/GEODE-2469.pdf) These changes are focused on the HASH and Set Redis Data Types to support Spring Data Redis sample code located at the following URL https://github.com/Pivotal-Data-Engineering/gemfire9_examples/tree/person_example_sdg_Tracker139498217/redis/spring-data-redis-example/src/test/java/io/pivotal/redis/gemfire/example/repository The Hash performance changes from this pull request had a 99.8% performance improvement. This is based on the Hashes JUNIT Tests. https://github.com/Pivotal-Data-Engineering/gemfire9_examples/blob/person_example_sdg_Tracker139498217/redis/gemfire-streaming-client/src/test/java/io/pivotal/gemfire9/HashesJUnitTest.java This code executed in 12.549s against Gemfire 9.0.1 code. After the changes, the test executed in 0.022s with the GEODE-2469 pull request. Redis Set related command performance had a 99.9% performance improvement. See https://github.com/Pivotal-Data-Engineering/gemfire9_examples/blob/person_example_sdg_Tracker139498217/redis/gemfire-streaming-client/src/test/java/io/pivotal/gemfire9/SetsJUnitTest.java The previous Set Junit tests executed against GemFire 9.0.1 executed in 31.507 seconds. These same test executed in 0.036 seconds with the GEODE-2469 pull request changes. The GemFire 9.0.1 Geode (1.1.0) version for the Geode Redis adapter created a Geode Region for each key provided in the Redis Hash or Set related command. Each Redis command to remove key entry previously destroyed the region. The big performance gain is based on using a new ReDiS_HASH and ReDiS_SET region. Note the changed will create or reuse an existing region with a matching name for Redis HASH commands references objects. For Redis HASH object's key will have a format of object:key Please see https://redis.io/topics/data-types-intro HASH section on objects for information on Redis objects. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ggreen/geode GEODE-2469 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/geode/pull/404.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #404 ---- commit 44b90c4f3f8e1ec4fdae63a8be126982d7c837a2 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-02-14T20:31:49Z GEODE-2469 initial changes to support Redis objects commit 27d7600e85945a7134115630efe378ed43d980f8 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-02-17T00:26:11Z GEODE-2469 changes to corrected introduced issue found during JUNIT runs commit a4ee164ddc944e8eed93c28d2db798c222a21cd4 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-02-17T00:27:55Z Merge branch 'develop' into GEODE-2469 commit d5191fb5cd10df1c9c2f34399b849d8bbf8c5bf7 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-02-18T21:14:02Z GEODE-2469 add additional junit test coverage commit 0b3bf689b835628b8573a49e3f0bb2900d07ff1c Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-02-18T21:14:33Z GEODE-2469 add additional junit test coverage commit 1958b1e129ab22be6dbb2d347fb189718fa5f8c4 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-02-18T21:15:44Z Merge branch 'develop' into GEODE-2469 commit 628f5093d32a272f7515bdd0953f90e91f559ec7 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-02-19T02:24:26Z GEODE-2469 adding licenses to fix RAT issues commit 3316d25d54d7dcf957180eb258a72d3c66ec3a8d Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-02-22T17:53:18Z GEODE-2469 missed check into for SetInterpreter commit f2b7ee7c7a5ae479158c35d91cdb2bfe6be58603 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-02-25T04:54:02Z GEODE-2469 fixing CI build issues commit 886289e24e254d56f7501b27f1d6c86fcfff39de Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-03-06T12:00:22Z Merge branch 'develop' into GEODE-2469 commit 0327403108fbb2139b9452a422878ee2fb91df76 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-03-06T22:16:26Z GEODE-2469 addressing pull request feedback commit c29b3ca58c0496e2a9672649d9f5ea45fdf00249 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-03-08T16:38:40Z GEOD-2469 incorporating pull request feedback, adding hash integration tests and enhancing documentation commit 64124126d5c4e5616e43dab0aa368890a0dfd66a Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-03-11T15:54:31Z Merge branch 'develop' into GEODE-2469 commit 454e09a86abf7c141910ec29faeb4d830ae74772 Author: Galen OSullivan <gosulli...@pivotal.io> Date: 2017-03-10T23:29:12Z Use DLockService in Redis adapter for Hashes and Sets. commit 3f8c590885137f730e2399fbf33090ec115a6223 Author: ggreen <ggr...@users.noreply.github.com> Date: 2017-03-18T17:04:47Z Merge pull request #1 from galen-pivotal/pr-404-DLock Use DLockService to avoid concurrency errors. commit d3b26424c20d723e563dd73b012323b7ff1f12f0 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-03-18T17:06:02Z Merge branch 'GEODE-2469' of https://github.com/ggreen/geode into GEODE-2469 commit 31c4c4a8581957424e29b718ba571be9523319c3 Author: Gregory Green <ggreen@ggreenmac.local> Date: 2017-03-21T20:34:32Z GEODE-2469 Fixing JUNIT failure, rat violations and introducing local Redis lock service ---- > Redis adapter Hash key support > ------------------------------ > > Key: GEODE-2469 > URL: https://issues.apache.org/jira/browse/GEODE-2469 > Project: Geode > Issue Type: Sub-task > Components: redis > Reporter: Gregory Green > Assignee: Hitesh Khamesra > > The Redis adapter does not appear to handle hash keys correctly. > The following Example: Redis CLI works. > localhost:11211> HSET companies name "John Smith" > Using a HSET <region>:id .. produces an error > Example: > localhost:11211> HSET companies:1000 name "John Smith" > [Server error] > [fine 2017/02/10 16:04:33.289 EST server1 <Function Execution Processor2> > tid=0x6a] Region names may only be alphanumeric and may contain hyphens or > underscores: companies: 1000 > java.lang.IllegalArgumentException: Region names may only be alphanumeric and > may contain hyphens or underscores: companies: 1000 > at > org.apache.geode.internal.cache.LocalRegion.validateRegionName(LocalRegion.java:7618) > at > org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:3201) > at > org.apache.geode.internal.cache.GemFireCacheImpl.basicCreateRegion(GemFireCacheImpl.java:3181) > at > org.apache.geode.internal.cache.GemFireCacheImpl.createRegion(GemFireCacheImpl.java:3169) > at org.apache.geode.cache.RegionFactory.create(RegionFactory.java:762) > at > org.apache.geode.management.internal.cli.functions.RegionCreateFunction.createRegion(RegionCreateFunction.java:355) > at > org.apache.geode.management.internal.cli.functions.RegionCreateFunction.execute(RegionCreateFunction.java:90) > at > org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:333) > at > org.apache.geode.internal.cache.execute.AbstractExecution$2.run(AbstractExecution.java:303) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:621) > at > org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1067) > at java.lang.Thread.run(Thread.java:745) > //Example Spring Data Redis Object sample > @Data > @EqualsAndHashCode() > @RedisHash(value="companies") > @NoArgsConstructor > public class Company > { > private @Id String id; > .... > //Repository > public interface CompanyRepository extends CrudRepository<Company, String> > { > .... > } > //When saving using a repository > repository.save(this.myCompany); > [Same Server error] > java.lang.IllegalArgumentException: Region names may only be alphanumeric and > may contain hyphens or underscores: > companies:f05405c2-86f2-4aaf-bd0c-6fecd483bf28 > at > org.apache.geode.internal.cache.LocalRegion.validateRegionName(LocalRegion.java:7618) > at > org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:3201) > at > org.apache.geode.internal.cache.GemFireCacheImpl.basicCreateRegion(GemFireCacheImpl.java:3181) > at > org.apache.geode.internal.cache.GemFireCacheImpl.createRegion(GemFireCacheImpl.java:3169) > at org.apache.geode.cache.RegionFactory.create(RegionFactory.java:762) > at > org.apache.geode.management.internal.cli.functions.RegionCreateFunction.createRegion(RegionCreateFunction.java:355) > at > org.apache.geode.management.internal.cli.functions.RegionCreateFunction.execute(RegionCreateFunction.java:90) > at > org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:333) > at > org.apache.geode.internal.cache.execute.AbstractExecution$2.run(AbstractExecution.java:303) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:621) > at > org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1067) > at java.lang.Thread.run(Thread.java:745) -- This message was sent by Atlassian JIRA (v6.3.15#6346)