Return-Path: Delivered-To: apmail-hbase-user-archive@www.apache.org Received: (qmail 6118 invoked from network); 1 Apr 2011 00:21:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2011 00:21:03 -0000 Received: (qmail 19433 invoked by uid 500); 1 Apr 2011 00:21:02 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 19399 invoked by uid 500); 1 Apr 2011 00:21:02 -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 19391 invoked by uid 99); 1 Apr 2011 00:21:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2011 00:21:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jdcryans@gmail.com designates 209.85.214.169 as permitted sender) Received: from [209.85.214.169] (HELO mail-iw0-f169.google.com) (209.85.214.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2011 00:20:57 +0000 Received: by iwg8 with SMTP id 8so4188531iwg.14 for ; Thu, 31 Mar 2011 17:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=IIAilwSr6UAhE+UGLU3WRTI2w8SROnSxiteeSSwiRVQ=; b=ei0JTQw/h2Ab1BbjxMenUGMVpyPYkNjIqdBo2f4bNz52JKrkiZkg2LFJAP2bSsiGp2 nSbX/0Db27uPjQ6t3xyPcyNK4JUlsH4BsgkToBMWkvaOIWbGT1vBSIKj3p+F7SE7DMKd 5WpzAHP19fCOve4SlMu2otDhfnQNAGzYLIwpI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=gZ1cPZ3hAjgBy0VGL28IUST3MWx/etVysNU3FVBoMzYYt0nz6I1YuMdwRqu0U6Fw67 GrwF1RROmioty9cpvS7BmdqqZuHk2VAwj6zBeO/gCj4/epA2np+TPTDV8RA+fTILKdCm ZR7jIZWK/JYluoie1fur4NtrISZOwNdgRMDJA= MIME-Version: 1.0 Received: by 10.42.219.2 with SMTP id hs2mr250836icb.324.1301617236441; Thu, 31 Mar 2011 17:20:36 -0700 (PDT) Sender: jdcryans@gmail.com Received: by 10.42.162.197 with HTTP; Thu, 31 Mar 2011 17:20:36 -0700 (PDT) In-Reply-To: References: Date: Thu, 31 Mar 2011 17:20:36 -0700 X-Google-Sender-Auth: NEjvYGeHhdH5nWKlCDM0pk6G2vY Message-ID: Subject: Re: ScannerTimeoutException when a scan enables caching, no exception when it doesn't From: Jean-Daniel Cryans To: user@hbase.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable That's the correct guess. J-D On Thu, Mar 31, 2011 at 4:59 PM, Joseph Boyd wrote: > We're using hbase 0.90.0 here, and I'm seeing a curious behavior with my = scans. > > I have some code that does a scan over a table, and for each row > returned some work to verify the data... > > I set the scan up like so : > =A0byte[] family =3D Bytes.toBytes("mytable"); > =A0Scan scan =3D new Scan(); > =A0scan.setCaching(2000); > =A0scan.addFamily(family); > > and then scan using a fairly normal looking loop: > > =A0ResultScanner scanner =3D table.getScanner(scan); > =A0for (Result userInfoResult : scanner) { > =A0 =A0 =A0// do some work that takes about half a second > =A0} > > After this code runs for 60 seconds, I get the exception below: > > Exception in thread "main" java.lang.RuntimeException: > org.apache.hadoop.hbase.client.ScannerTimeoutException: 78850ms passed > since the last invocation, timeout is currently set to 60000 > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.client.HTable$ClientScanner$1.h= asNext(HTable.java:1213) > =A0 =A0 =A0 =A0at cnwk.tridentp.firehose.ShowAssetMatchStatsMain.scanForP= roperties(ShowAssetMatchStatsMain.java:82) > =A0 =A0 =A0 =A0at cnwk.tridentp.firehose.ShowAssetMatchStatsMain.generate= AssetMatchStats(ShowAssetMatchStatsMain.java:56) > =A0 =A0 =A0 =A0at cnwk.tridentp.firehose.ShowAssetMatchStatsMain.main(Sho= wAssetMatchStatsMain.java:33) > Caused by: org.apache.hadoop.hbase.client.ScannerTimeoutException: > 78850ms passed since the last invocation, timeout is currently set to > 60000 > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.client.HTable$ClientScanner.nex= t(HTable.java:1114) > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.client.HTable$ClientScanner$1.h= asNext(HTable.java:1210) > =A0 =A0 =A0 =A0... 3 more > Caused by: org.apache.hadoop.hbase.UnknownScannerException: > org.apache.hadoop.hbase.UnknownScannerException: Name: > -3447615741604242626 > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.regionserver.HRegionServer.next= (HRegionServer.java:1793) > =A0 =A0 =A0 =A0at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown So= urce) > =A0 =A0 =A0 =A0at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegat= ingMethodAccessorImpl.java:25) > =A0 =A0 =A0 =A0at java.lang.reflect.Method.invoke(Method.java:597) > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseR= PC.java:570) > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBa= seServer.java:1036) > =A0 =A0 =A0 =A0at sun.reflect.NativeConstructorAccessorImpl.newInstance0(= Native Method) > =A0 =A0 =A0 =A0at sun.reflect.NativeConstructorAccessorImpl.newInstance(N= ativeConstructorAccessorImpl.java:39) > =A0 =A0 =A0 =A0at sun.reflect.DelegatingConstructorAccessorImpl.newInstan= ce(DelegatingConstructorAccessorImpl.java:27) > =A0 =A0 =A0 =A0at java.lang.reflect.Constructor.newInstance(Constructor.j= ava:513) > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.RemoteExceptionHandler.decodeRe= moteException(RemoteExceptionHandler.java:96) > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.client.ScannerCallable.call(Sca= nnerCallable.java:83) > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.client.ScannerCallable.call(Sca= nnerCallable.java:38) > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.client.HConnectionManager$HConn= ectionImplementation.getRegionServerWithRetries(HConnectionManager.java:999= ) > =A0 =A0 =A0 =A0at org.apache.hadoop.hbase.client.HTable$ClientScanner.nex= t(HTable.java:1100) > =A0 =A0 =A0 =A0... 4 more > > > The message seems to indicate that I haven't called scanner.next() in > a long time (> 60 seconds), which isn't true, scanner.next() is being > called more than once per second. > > However, if I disable caching (comment out the scan.setCaching() line > above), or set caching to a smaller value (1000, instead of 2000), the > code runs as expected. > > I'm guessing that a cache-hit during my scan isn't resetting the > timeout that leads to a ScannerTimeoutException, but that's just a > guess... > > Is this expected behavior? > > > ...joe >