Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Fastest way to find is a row exist?


Copy link to this message
-
Re: Fastest way to find is a row exist?
Hello Jean-Marc,

BloomFilters are just designed for that.

But they say if a row doesn't exist with a ash of the key (not the oposit,
2 rowkeys could have the same ash result).

If you want to be sure the rowkey exists you have to search for it in the
HFile ( the whole mechanism is transparent with the get() ).

Their is also an KeOnlyFilter
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/KeyOnlyFilter.html
preventing from getting the whole columns of the existing key as return
(which could be heavy).

Cheers,

--
Damien
2013/1/4 Jean-Marc Spaggiari <[EMAIL PROTECTED]>

> Hi,
>
> What's the fastest way to know if a row exist?
>
> Today I'm doing that:
>
> Get get_entry_exist = new Get(key).addColumn(CF_DATA, C_DATA);
> Result entry_exist = table_entry.get(get_entry_exist);
>
> But should this be faster?
> Get get_entry_exist = new Get(key);
> Result entry_exist = table_entry.get(get_entry_exist);
>
> There is only one CF and one C on my table.
>
> Or is there an even faster way?
>
> Also, is there a way to make that even faster? I think BloomFilters
> can help, right?
>
> Thanks,
>
> JM
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB