Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 31EC07D19 for ; Tue, 30 Aug 2011 01:01:20 +0000 (UTC) Received: (qmail 78277 invoked by uid 500); 30 Aug 2011 01:01:19 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 78223 invoked by uid 500); 30 Aug 2011 01:01:19 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 78215 invoked by uid 99); 30 Aug 2011 01:01:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 01:01:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of neerjapub@gmail.com designates 209.85.210.43 as permitted sender) Received: from [209.85.210.43] (HELO mail-pz0-f43.google.com) (209.85.210.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 01:01:10 +0000 Received: by pzk1 with SMTP id 1so9952709pzk.2 for ; Mon, 29 Aug 2011 18:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hTEizysf9BXkmtTfijeTHqe4h/E5kg6wnmL6pY76eQs=; b=CSn45//fsjGO5wUiuvLP8vecfc9IH6u2Q98qauC4ko/XL1zcbDu6u1O2NUEYzNhkPE 4HRplRB4Yg5uxXQ8yKksdZjfxZLSxdg3JHZAUTTWK/W4AF/BwwBBEHQctuHsHtOlXyMc Wg+3p+20f9yMnBIe+8vC92iH1fgptUMxDO+Uc= MIME-Version: 1.0 Received: by 10.142.149.25 with SMTP id w25mr2882215wfd.308.1314666049441; Mon, 29 Aug 2011 18:00:49 -0700 (PDT) Received: by 10.142.161.17 with HTTP; Mon, 29 Aug 2011 18:00:49 -0700 (PDT) In-Reply-To: References: Date: Mon, 29 Aug 2011 18:00:49 -0700 Message-ID: Subject: Re: HBase Scan returns fewer columns after a few minutes of insertion From: Neerja Bhatnagar To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=000e0cd28d98e00f0404abae8a86 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd28d98e00f0404abae8a86 Content-Type: text/plain; charset=ISO-8859-1 Hi J-D, Thanks! I do scan 'tablename' on the shell, and I can see all 3 columns in the 1 column family for a row. I haven't set any TTL on the table or result scanner. Any other suggestions would be very welcome. I was getting the same response with result.getFamilyMap() and I moved to result.getMap() thinking I was using the wrong api. Cheers, Neerja On Mon, Aug 29, 2011 at 5:23 PM, Jean-Daniel Cryans wrote: > (sending to user@ and bbcing dev@ since this is a user question) > > That type of problem can be "fun" to debug, did you try with the shell > to query the data? Do you get a different result? > > BTW, any TTL set on that table? > > J-D > > On Mon, Aug 29, 2011 at 5:09 PM, Neerja Bhatnagar > wrote: > > Hi, > > > > I am sorry if this question has been resolved before. Thank you for your > > help. > > > > I am seeing really strange behavior with HBase Scan. > > > > I insert 1 row into a table named test, 1 col family named testColFam, > and 3 > > columns : foo (with value foo), bar (with value bar), and id (a unique > id). > > > > I wait 5 minutes, and run the following code to retrieve the row --- > > > > HTablePool htablePool = new HTablePool(config, maxsize); > > > > HTable table = (HTable) htablePool.getTable("test"); // test is the > > tablename > > > > Scan scan = new Scan(); > > scan.addFamily(Bytes.toBytes("testColFam")); > > scan.setStartRow(Bytes.toBytes("")); // scan from the first row > > scan.setBatch(batchSize); > > > > ResultScanner resScanner = table.getScanner(scan); > > Iterator resultIterator = resultScanner.iterator(); > > > > Result result = resultIterator.next(); > > > > result.getMap(); > > > > the result.getMap() behaves differently based on time-elapsed. If I run > this > > code as soon as I have inserted the data, the 3 columns in the 1 row are > > returned as expected. > > > > But after some time elapses, scan returns fewer columns per row each > time. > > > > Can anyone please help me with this? Please let me know if you need more > > information. > > > > Do I need to set the timerange or something to make sure that all columns > > are returned? > > > > Cheers, Neerja > > > --000e0cd28d98e00f0404abae8a86--