geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Baker (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GEODE-184) The gfsh 'locate entry' command fails to find the entry on partitioned regions if the key is not a string
Date Fri, 08 Jan 2016 03:51:39 GMT

     [ https://issues.apache.org/jira/browse/GEODE-184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Anthony Baker updated GEODE-184:
--------------------------------
    Fix Version/s:     (was: 1.0.0-incubating)
                   1.0.0-alpha1

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

Mime
View raw message