Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 801BD1063F for ; Tue, 16 Jul 2013 21:41:51 +0000 (UTC) Received: (qmail 70944 invoked by uid 500); 16 Jul 2013 21:41:48 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 70872 invoked by uid 500); 16 Jul 2013 21:41:48 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 70837 invoked by uid 99); 16 Jul 2013 21:41:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jul 2013 21:41:48 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yuzhihong@gmail.com designates 209.85.215.47 as permitted sender) Received: from [209.85.215.47] (HELO mail-la0-f47.google.com) (209.85.215.47) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jul 2013 21:41:42 +0000 Received: by mail-la0-f47.google.com with SMTP id fe20so932636lab.6 for ; Tue, 16 Jul 2013 14:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0wR0MCEQLyc+yr5XhvSywRlEZ9CYFitvhHjGTaIh7v0=; b=iGYJWtIjwjh/TYjjjq9mHYvCxOzoUr8i5nH8r78ZNcIqt0BRksgCKvQCA5lfafhfkr yC4In06XIqU6EYPrlH8GuIQtLICK7D4SZxAVBu85khJI17V+b85s5be9rtjdtqVmYYYB +45nKvZfS5kUybnE5G6x5SK/fFyTQnNm4WvxfjfexMHEse17Y0ttF3laI5fik3St1IyU T6HGr43QpmLo+qn+jw8Rgzr3dKKdPPX75kusqzpi3hbDVwLNb7/8muiqoHv5ML3sXp3E 8keITsMdacQiiX909+eMXk7Lu9RoqakvCnmjngL+O/FYwtdsxUp4ZgUR4MiBsDcE/q9k JptA== MIME-Version: 1.0 X-Received: by 10.152.87.172 with SMTP id az12mr1651927lab.24.1374010882256; Tue, 16 Jul 2013 14:41:22 -0700 (PDT) Received: by 10.112.141.5 with HTTP; Tue, 16 Jul 2013 14:41:22 -0700 (PDT) In-Reply-To: References: Date: Tue, 16 Jul 2013 14:41:22 -0700 Message-ID: Subject: Re: Scanner problem after bulk load hfile From: Ted Yu To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a11c23e2c8df30e04e1a7d680 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c23e2c8df30e04e1a7d680 Content-Type: text/plain; charset=ISO-8859-1 Here is from tip of 0.94: public long getMaxTimestamp() { return timeRangeTracker == null ? Long.MAX_VALUE : timeRangeTracker.maximumTimestamp; } The following JIRA fixed the NPE: HBASE-8055 Null check missing in StoreFile.Reader.getMaxTimestamp() Please consider upgrading (to 0.94.9) Cheers On Tue, Jul 16, 2013 at 2:33 PM, Rohit Kelkar wrote: > This ( http://pastebin.com/yhx4apCG ) is the error on the region server > side when execute the following on the shell - > get 'mytable', 'myrow', 'cf:q' > > - R > > > > > On Tue, Jul 16, 2013 at 3:28 PM, Jimmy Xiang wrote: > > > Do you see any exception/logging in the region server side? > > > > > > On Tue, Jul 16, 2013 at 1:15 PM, Rohit Kelkar > > wrote: > > > > > Yes. I tried everything from myTable.flushCommits() to > > > myTable.clearRegionCache() before and after the > > > LoadIncrementalHFiles.doBulkLoad(). But it doesn't seem to work. This > is > > > what I am doing right now to get things moving although I think this > may > > > not be the recommended approach - > > > > > > HBaseAdmin hbaseAdmin = new HBaseAdmin(hbaseConf); > > > hbaseAdmin.majorCompact(myTableName.getBytes()); > > > myTable.close(); > > > hbaseAdmin.close(); > > > > > > - R > > > > > > > > > On Mon, Jul 15, 2013 at 9:14 AM, Amit Sela > wrote: > > > > > > > Well, I know it's kind of voodoo but try it once before pre-split and > > > once > > > > after. Worked for me. > > > > > > > > > > > > On Mon, Jul 15, 2013 at 7:27 AM, Rohit Kelkar > > > > > wrote: > > > > > > > > > Thanks Amit, I am also using 0.94.2 . I am also pre-splitting and I > > > tried > > > > > the table.clearRegionCache() but still doesn't work. > > > > > > > > > > - R > > > > > > > > > > > > > > > On Sun, Jul 14, 2013 at 3:45 AM, Amit Sela > > > wrote: > > > > > > > > > > > If new regions are created during the bulk load (are you > > > pre-splitting > > > > > ?), > > > > > > maybe try myTable.clearRegionCache() after the bulk load (or even > > > after > > > > > the > > > > > > pre-splitting if you do pre-split). > > > > > > This should clear the region cache. I needed to use this because > I > > am > > > > > > pre-splitting my tables for bulk load. > > > > > > BTW I'm using HBase 0.94.2 > > > > > > Good luck! > > > > > > > > > > > > > > > > > > On Fri, Jul 12, 2013 at 6:50 PM, Rohit Kelkar < > > rohitkelkar@gmail.com > > > > > > > > > > wrote: > > > > > > > > > > > > > I am having problems while scanning a table created using > HFile. > > > > > > > This is what I am doing - > > > > > > > Once Hfile is created I use following code to bulk load > > > > > > > > > > > > > > LoadIncrementalHFiles loadTool = new > LoadIncrementalHFiles(conf); > > > > > > > HTable myTable = new HTable(conf, mytablename.getBytes()); > > > > > > > loadTool.doBulkLoad(new Path(outputHFileBaseDir + "/" + > > > mytablename), > > > > > > > mytableTable); > > > > > > > > > > > > > > Then scan the table using- > > > > > > > > > > > > > > HTable table = new HTable(conf, mytable); > > > > > > > Scan scan = new Scan(); > > > > > > > scan.addColumn("cf".getBytes(), "q".getBytes()); > > > > > > > ResultScanner scanner = table.getScanner(scan); > > > > > > > for (Result rr = scanner.next(); rr != null; rr = > > scanner.next()) { > > > > > > > numRowsScanned += 1; > > > > > > > } > > > > > > > > > > > > > > This code crashes with following error - > > > > http://pastebin.com/SeKAeAST > > > > > > > If I remove the scan.addColumn from the code then the code > works. > > > > > > > > > > > > > > Similarly on the hbase shell - > > > > > > > - A simple count 'mytable' in hbase shell gives the correct > > count. > > > > > > > - A scan 'mytable' gives correct results. > > > > > > > - get 'mytable', 'myrow', 'cf:q' crashes > > > > > > > > > > > > > > The hadoop dfs -ls /hbase/mytable shows the .tableinfo, .tmp, > the > > > > > > directory > > > > > > > for region etc. > > > > > > > > > > > > > > Now if I do a major_compact 'mytable' and then execute my code > > with > > > > the > > > > > > > scan.addColumn statement then it works. Also the get 'mytable', > > > > > 'myrow', > > > > > > > 'cf:q' works. > > > > > > > > > > > > > > My question is > > > > > > > What is major_compact doing to enable the scanner that the > > > > > > > LoadIncrementalFiles tool is not? I am sure I am missing a step > > > after > > > > > the > > > > > > > LoadIncrementalFiles. > > > > > > > > > > > > > > - R > > > > > > > > > > > > > > > > > > > > > > > > > > > > --001a11c23e2c8df30e04e1a7d680--