You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/12/03 00:11:10 UTC

[jira] [Commented] (GEODE-184) The gfsh 'locate entry' command fails to find the entry on partitioned regions if the key is not a string

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

ASF subversion and git services commented on GEODE-184:
-------------------------------------------------------

Commit 74e136401fa0d0a01d562c8e3f3db48b30ad56bc in incubator-geode's branch refs/heads/develop from [~jens.deppe]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=74e1364 ]

GEODE-184: The gfsh 'locate entry' command fails to find the entry on partitioned regions if the key is not a string


> The gfsh 'locate entry' command fails to find the entry on partitioned regions if the key is not a string
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-184
>                 URL: https://issues.apache.org/jira/browse/GEODE-184
>             Project: Geode
>          Issue Type: Bug
>          Components: management
>            Reporter: Barry Oglesby
>            Assignee: Jens Deppe
>            Priority: Minor
>              Labels: gfsh
>
> The *DataCommandFunction locateEntry* method uses the input string _key_ instead of the converted _keyObject_ in the *get*, *getPrimaryMemberForKey* and *getKeyInfo* calls in the *PartitionedRegion* case.
> The current code looks like:
> {code:title=DataCommandFunction.java|borderStyle=solid}
> Object keyObject = null;
> try{
>   keyObject = getClassObject(key,keyClass);
> ....
> if (region instanceof PartitionedRegion) {
>   Region localRegion = PartitionRegionHelper.getLocalData((PartitionedRegion)region);
>   value = localRegion.get(key);
>   if(value!=null){
>     DistributedMember primaryMember = PartitionRegionHelper.getPrimaryMemberForKey(region, key);
>     int bucketId = pr.getKeyInfo(key).getBucketId();        
> {code}
> The fixed code should be:
> {code:title=DataCommandFunction.java|borderStyle=solid}
> value = localRegion.get(keyObject);
> if(value!=null){
>   DistributedMember primaryMember = PartitionRegionHelper.getPrimaryMemberForKey(region, keyObject);
>   int bucketId = pr.getKeyInfo(keyObject).getBucketId();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)