You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/21 20:53:41 UTC

[jira] [Commented] (GEODE-2469) Redis adapter Hash key support

    [ https://issues.apache.org/jira/browse/GEODE-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15935316#comment-15935316 ] 

ASF GitHub Bot commented on GEODE-2469:
---------------------------------------

Github user ggreen closed the pull request at:

    https://github.com/apache/geode/pull/404


> 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)