hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerke Ephorus <gerke.epho...@gmail.com>
Subject org.apache.hadoop.hbase.client.HTable.exists changes my Get-object
Date Wed, 05 Nov 2014 15:53:23 GMT
Hi all,

we are in the process of upgrading HBase from 0.92.x to 0.98.6.x and run
into this code in the HBase-client:
   * {@inheritDoc}
  public boolean exists(final Get get) throws IOException {
    Result r = get(get);
    assert r.getExists() != null;
    return r.getExists();

We used to use this exists-call as this was way faster in case of a
BloomFilter-miss. But maybe that has changed?

The code shows that the get-object passed-in is changed. Now I understand
that it might not make sense to re-use the get-object after the exists
returns true, but I explained the reason for doing so anyway above.

Can anyone throw some light on this, please?

I was just wondering if it might make sense to add a notice in the API-doc
that tell that the passed-in object will be changed during the call. Or
maybe add a 'set-back-to-old-value' try-finally-construction.

with kind regards,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message