You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Jens Deppe (JIRA)" <ji...@apache.org> on 2016/01/07 20:36:40 UTC

[jira] [Updated] (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:all-tabpanel ]

Jens Deppe updated GEODE-184:
-----------------------------
    Affects Version/s: 1.0.0-incubating

> 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
>    Affects Versions: 1.0.0-incubating
>            Reporter: Barry Oglesby
>            Assignee: Jens Deppe
>            Priority: Minor
>              Labels: gfsh
>             Fix For: 1.0.0-incubating
>
>
> 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)