Return-Path: Delivered-To: apmail-hadoop-hbase-user-archive@minotaur.apache.org Received: (qmail 26976 invoked from network); 23 Dec 2009 10:58:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Dec 2009 10:58:14 -0000 Received: (qmail 84173 invoked by uid 500); 23 Dec 2009 10:58:13 -0000 Delivered-To: apmail-hadoop-hbase-user-archive@hadoop.apache.org Received: (qmail 84085 invoked by uid 500); 23 Dec 2009 10:58:13 -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 84075 invoked by uid 99); 23 Dec 2009 10:58:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Dec 2009 10:58:13 +0000 X-ASF-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_MED X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [216.99.131.130] (HELO SJDCISCAN01.udc.trendmicro.com) (216.99.131.130) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Dec 2009 10:58:04 +0000 Received: from SJDCISCAN01.udc.trendmicro.com (SJDCISCAN01 [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id 33C4B9A8D9F for ; Wed, 23 Dec 2009 02:57:41 -0800 (PST) Received: from sjdcexbh02.us.trendnet.org (sjdcexbh02.udc.trendmicro.com [216.99.131.187]) by SJDCISCAN01.udc.trendmicro.com (Postfix) with ESMTP id 28FB19A8D2F for ; Wed, 23 Dec 2009 02:57:41 -0800 (PST) Received: from adcexbh02.tw.trendnet.org ([202.133.236.202]) by sjdcexbh02.us.trendnet.org with Microsoft SMTPSVC(6.0.3790.3959); Wed, 23 Dec 2009 02:57:43 -0800 Received: from CDCEXMAIL02.tw.trendnet.org ([10.64.1.42]) by adcexbh02.tw.trendnet.org with Microsoft SMTPSVC(6.0.3790.3959); Wed, 23 Dec 2009 18:57:41 +0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: quoted-printable Subject: RE: startRow and endRow doesn't work when use HBase mapreduce Date: Wed, 23 Dec 2009 18:57:39 +0800 Message-ID: <5A9CF7B9EF3FF34CB589EAC506A1664F03884B@CDCEXMAIL02.tw.trendnet.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: startRow and endRow doesn't work when use HBase mapreduce Thread-Index: AcqDpe+zTKrpvOoxRRqMy4TOeiWtowAAaqTgAASg+MA= References: <5A9CF7B9EF3FF34CB589EAC506A1664F038819@CDCEXMAIL02.tw.trendnet.org> <61770b880912222359u6b33221ax76b6ed36935881e9@mail.gmail.com> From: To: X-OriginalArrivalTime: 23 Dec 2009 10:57:41.0213 (UTC) FILETIME=[BF6D80D0:01CA83BE] Hi, =09I=20tried=20with=20HBase=200.20.2=20,=20the=20startRow=20works=20,=20b= ut=20the=20endRow=20doesn't=20work=20.=20It=20always=20scan=20to=20the=20= table=20end.=20 =09I=20reviewed=20the=20source=20code=20of=20HBase=20and=20found=20there= =20is=20a=20bug=20. \src\java\org\apache\hadoop\hbase\mapreduce\=20TableInputFormatBase.java= =20Line=20301 =20298=20=20=20=20=20=20=20byte[]=20splitStart=20=3D=20startRow.length=20= =3D=3D=200=20||=20 =20299=20=20=20=20=20=20=20=20Bytes.compareTo(keys.getFirst()[i],=20start= Row)=20>=3D=200=20?=20 =20300=20=20=20=20=20=20=20=20=20=20=20keys.getFirst()[i]=20:=20startRow; =20301=20=20=20=20=20=20byte[]=20splitStop=20=3D=20stopRow.length=20=3D= =3D=200=20||=20 =20302=20=20=20=20=20=20=20=20=20Bytes.compareTo(keys.getSecond()[i],=20s= topRow)=20<=3D=200=20?=20 =20303=20=20=20=20=20=20=20=20=20=20keys.getSecond()[i]=20:=20stopRow; =20304=20=20=20=20=20=20=20InputSplit=20split=20=3D=20new=20TableSplit(ta= ble.getTableName(), =20305=20=20=20=20=20=20=20=20splitStart,=20splitStop,=20regionLocation); When=20the=20region=20endkey=20is=20empty,=20the=20splitStop=20always=20i= s=20empty=20,=20So=20the=20endRow=20doesn't=20work. =09Will=20HBase=200.21=20fix=20this=20bug? Regards, Sandy -----Original=20Message----- From:=20Sandy=20Yin=20(RD-CN)=20 Sent:=202009=C4=EA12=D4=C223=C8=D5=2016:15 To:=20'hbase-user@hadoop.apache.org' Subject:=20RE:=20startRow=20and=20endRow=20doesn't=20work=20when=20use=20= HBase=20mapreduce Hi=20Lars, =09Many=20thanks=20for=20the=20information=20:-). =09I=20tested=20with=20HBase=200.20.1=20,=20it=20doesn't=20work=20.=20I= =20will=20upgrade=20to=200.20.2=20and=20have=20another=20test. Regards, Sandy =20 -----Original=20Message----- From:=20Lars=20George=20[mailto:lars.george@gmail.com]=20 Sent:=202009=C4=EA12=D4=C223=C8=D5=2015:59 To:=20hbase-user@hadoop.apache.org Subject:=20Re:=20startRow=20and=20endRow=20doesn't=20work=20when=20use=20= HBase=20mapreduce Hi=20Sandy, Have=20a=20look=20here:=20http://issues.apache.org/jira/browse/HBASE-1829 I=20added=20tests=20to=20check=20if=20that=20all=20works=20as=20advertise= d=20and=20it=20indeed does.=20But=20only=20with=20the=20next=20forthcoming=20versions=20I=20am= =20afraid.=20With the=20released=20versions=20I=20would=20have=20assumed=20at=20least=20the= =20scan=20works fine=20but=20still=20scans=20the=20whole=20table=20while=20simply=20skipp= ing=20the=20rows outside=20the=20given=20range.=20Do=20you=20see=20it=20not=20working=20at= =20all? Lars On=20Wed,=20Dec=2023,=202009=20at=208:46=20AM,=20=20=20wrote: >=20Hi, > > > >=20The=20startRow=20and=20endRow=20of=20Scan=20doesn't=20work=20when=20u= se=20HBase=20mapreduce.=20The=20job=20always=20scans=20the=20entire=20tab= le. > >=20Is=20there=20any=20reason=20for=20this=20or=20I=20misuse? > > > >=20Example=20code: > >=20Scan=20scan=20=3D=20new=20Scan(); > >=20scan.addFamily(...); > >=20scan.setStartRow(startkey); > >=20scan.setStopRow(endkey); > >=20TableMapReduceUtil.initTableMapperJob(tableName,scan,=20mapperClass,= =20ImmutableBytesWritable.class,Put.class,=20job); > > > >=20Thanks. > > >=20TREND=20MICRO=20EMAIL=20NOTICE >=20The=20information=20contained=20in=20this=20email=20and=20any=20attac= hments=20is=20confidential=20and=20may=20be=20subject=20to=20copyright=20= or=20other=20intellectual=20property=20protection.=20If=20you=20are=20not= =20the=20intended=20recipient,=20you=20are=20not=20authorized=20to=20use= =20or=20disclose=20this=20information,=20and=20we=20request=20that=20you= =20notify=20us=20by=20reply=20mail=20or=20telephone=20and=20delete=20the= =20original=20message=20from=20your=20mail=20system. > TREND=20MICRO=20EMAIL=20NOTICE The=20information=20contained=20in=20this=20email=20and=20any=20attachmen= ts=20is=20confidential=20and=20may=20be=20subject=20to=20copyright=20or= =20other=20intellectual=20property=20protection.=20If=20you=20are=20not= =20the=20intended=20recipient,=20you=20are=20not=20authorized=20to=20use= =20or=20disclose=20this=20information,=20and=20we=20request=20that=20you= =20notify=20us=20by=20reply=20mail=20or=20telephone=20and=20delete=20the= =20original=20message=20from=20your=20mail=20system.