hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "GK Ephorus (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-12435) The exists method on the HTable-class changes the passed-in Get-instance
Date Thu, 06 Nov 2014 11:42:35 GMT

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

GK Ephorus updated HBASE-12435:
-------------------------------
    Attachment: HBASE-12435.take-1.patch

Store the old value of the checkExistenceOnly-property and restore after the call in a finally.

> The exists method on the HTable-class changes the passed-in Get-instance
> ------------------------------------------------------------------------
>
>                 Key: HBASE-12435
>                 URL: https://issues.apache.org/jira/browse/HBASE-12435
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 0.98.6.1
>         Environment: Cloudera Hadoop HBase 5.2.0: 0.98.6.?
>            Reporter: GK Ephorus
>            Priority: Minor
>              Labels: easyfix
>         Attachments: HBASE-12435.take-1.patch
>
>
> Running an HTable.get right after using HTable.exists using the same instance of a Get-object
yields no results.
> Up on inspection of the code we found that the HTable.exists changes the passed-in Get-object.
It changes the property 'checkExistenceOnly' to true which makes the passed-in Get-object
useless for subsequent HTable.get calls.
> My suggestion is either:
> * indicate this behaviour in the documentation/javadoc
> * store the old value of the 'checkExistenceOnly' and restore it using try-finally.



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

Mime
View raw message