hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars George <l...@worldlingo.com>
Subject Re: Low-cost and fast HTable.exists(...)?
Date Mon, 10 Nov 2008 09:13:23 GMT
Oh, I see now, that is implementing the memcached(b) functionality right 
into HBase. I thought about that too, well at least wondering if that 
wouldn't be useful. For me it is for sure. But since it is not there 
(yet) I am using a separate memcachedb instance (for stored to disk 
persistence). I give that Jira a +1 (in case you ask me) :)


Billy Pearson wrote:
> We have an open issue for stuff similar to this
> Atomic increment operations
> https://issues.apache.org/jira/browse/HBASE-803
> either that or use something like
> memcache or scan the table.
>
> Billy
>
>
> "Lars George" <lars@worldlingo.com> wrote in message 
> news:4916F67B.5080300@worldlingo.com...
>> Hi,
>>
>> I was wondering if there is a low cost (as in memory) and fast way to
>> check if a certain cell already exists? I need to insert a cell, but
>> based on if it was there before or not increase a counter (as in total
>> number of entries in a table). I see that HTable.get(...) returns the
>> byte array, means there are memory, reading and network streaming
>> involved. So if I do a
>>
>> if (table.get(row, col) == null) { incr(counter); }
>> table.put(...);
>>
>> this seems like a waste of resources and may not be as fast as a true
>>
>> if (!table.exists(row, col))  { incr(counter); }
>> table.put(...)
>>
>> It looks like this is easily doable since get() also delegates to the
>> region servers.
>>
>> Am I missing something? Assuming HTable is sort of a Set implementation
>> I am confused as to way this check is missing.
>>
>> Please advise.
>>
>> Lars
>>
>>
>
>

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