Return-Path: Delivered-To: apmail-hadoop-hbase-user-archive@locus.apache.org Received: (qmail 97666 invoked from network); 30 Dec 2008 13:33:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Dec 2008 13:33:28 -0000 Received: (qmail 78304 invoked by uid 500); 30 Dec 2008 13:33:27 -0000 Delivered-To: apmail-hadoop-hbase-user-archive@hadoop.apache.org Received: (qmail 78280 invoked by uid 500); 30 Dec 2008 13:33:27 -0000 Mailing-List: contact hbase-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-user@hadoop.apache.org Delivered-To: mailing list hbase-user@hadoop.apache.org Received: (qmail 78269 invoked by uid 99); 30 Dec 2008 13:33:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Dec 2008 05:33:26 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Dec 2008 13:33:19 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LHeiQ-0001iR-GS for hbase-user@hadoop.apache.org; Tue, 30 Dec 2008 05:32:58 -0800 Message-ID: <21217215.post@talk.nabble.com> Date: Tue, 30 Dec 2008 05:32:58 -0800 (PST) From: Thibaut_ To: hbase-user@hadoop.apache.org Subject: Exist function? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: tbritz@blue.lu X-Virus-Checked: Checked by ClamAV on apache.org On a few occasions, I have to check if a key exists in a table or not. What's the best way to do it? The htable interface doesn't have any function to check if a key exists or not, and I have to specify at least one column when fetching a key. At the moment I have secondary tables (with bloomfilters and blockcache enabled) just used to check if a key exists. When adding deleting a key, I will also add/delete an entry in the secondary table Another possibility would be to just have an nearempty columnfamily used to test if a key exists (my other column families always have about 100 KB of data in it, and I don't want hbase to fetch that data from disk). Thibaut -- View this message in context: http://www.nabble.com/Exist-function--tp21217215p21217215.html Sent from the HBase User mailing list archive at Nabble.com.