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 00B601877F for ; Tue, 9 Jun 2015 04:13:07 +0000 (UTC) Received: (qmail 96106 invoked by uid 500); 9 Jun 2015 04:13:05 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 96034 invoked by uid 500); 9 Jun 2015 04:13:04 -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 96022 invoked by uid 99); 9 Jun 2015 04:13:04 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2015 04:13:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1684A183996 for ; Tue, 9 Jun 2015 04:13:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.13 X-Spam-Level: *** X-Spam-Status: No, score=3.13 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id VrtlXp2Lc9lQ for ; Tue, 9 Jun 2015 04:12:57 +0000 (UTC) Received: from mail-yk0-f169.google.com (mail-yk0-f169.google.com [209.85.160.169]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 6905B42AD6 for ; Tue, 9 Jun 2015 04:12:57 +0000 (UTC) Received: by ykfr66 with SMTP id r66so3185578ykf.0 for ; Mon, 08 Jun 2015 21:12:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=kA7h2+93uAxDVvy3S/AXYepE3P7CJsrihoFnvo5dsRs=; b=aqd/Sz2ZYjF6Tt1VtGtiENn6ZOxGUDkdq7Brxv5Mdgn4D0UdYEV2ABlzyyOuePR9Wb yqwCfYwNEblzPmOG9GE5n9OFse2jhZldVCCFDxnLF+X8xDujanaO/oG5vSYLMSrpuO/4 XhurL6igGpG0qqq/wP2qBZbhuYVvArLG17n3JIQ4TcLvDnn/LzGIlNo1x+lvg7xlejaq wdWzgmFPATAsRK0Sx+LziEXTdh2dqYFp8nYDfmuSiQve1RcT+8lcSVlji+n1mW9lqp7N TmFZs0oLrr/BNm1JUXROZrgNnnpW0vTr+CzfXABRodT4wwC5szXavUoL91Mb7FulvF6V P6Sw== X-Received: by 10.170.224.84 with SMTP id q81mr15023776ykf.122.1433823125804; Mon, 08 Jun 2015 21:12:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.228.65 with HTTP; Mon, 8 Jun 2015 21:11:45 -0700 (PDT) In-Reply-To: References: From: anil gupta Date: Mon, 8 Jun 2015 21:11:45 -0700 Message-ID: Subject: Re: HBase shell providing wrong results with startrow(with composite key having String and Ints) To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=001a113a6f74159a6305180df6c4 --001a113a6f74159a6305180df6c4 Content-Type: text/plain; charset=UTF-8 Hi Jean, My bad. I gave a wrong illustration. This is the query is was trying on my composite key: hbase(main):017:0> scan 'CAR_ARCHIVE' , {COLUMNS=>'A', STARTROW => '110\x00' , LIMIT=>1} ROW COLUMN+CELL 12\x0010123\x0019XFB2F56CE026679\x00\x80\x00\x00\x0 column=A:BODYSTYLE, timestamp=1432899595317, value=SEDAN 0 12\x0010123\x0019XFB2F56CE026679\x00\x80\x00\x00\x0 column=A:BODYSTYLESLUG, timestamp=1432899595317, value=sedan. I do have this rowkey: 110\x0033078\x001C4AJWAG0CL260823\x00\x80\x00\x00 So, i was expecting to get that row. Solution: scan 'CAR_ARCHIVE' , {COLUMNS=>'A', STARTROW => "110\x00" , LIMIT=>1} I dont really know what's the difference between single quotes and double quotes in startrow. Can anyone explain? Also, It would help others, if it can be documented somewhere. Thanks, Anil On Mon, Jun 8, 2015 at 4:07 PM, Jean-Marc Spaggiari wrote: > Hi Anil, > > Can you please clarify what seems to be wrong for you? > > You asked for start row "33078". Which mean Rows starting with a "3", > followed by a "3", a "0", etc. and the first row returned start with a "4" > which is correct given the startrow you have specified. > > You seems to have a composite key. And you seems to scan without building > the composite key. How have you created your table and what is your key > design? > > JM > > 2015-06-08 16:56 GMT-04:00 anil gupta : > > > Hi All, > > > > I m having a lot of trouble dealing with HBase shell. I am running > > following query: > > > > scan 'CAR_ARCHIVE' , {COLUMNS=>'A', STARTROW => '33078' , LIMIT=>1} > > > > ROW > > COLUMN+CELL > > > > 4\x0010135\x001C4BJWEG2CL117550\x00\x7F\xFF\xFF\xFF > > column=A:BODYSTYLE, timestamp=1430280906358, value=SPORT > > UTILITY > > > > 4\x0010135\x001C4BJWEG2CL117550\x00\x7F\xFF\xFF\xFF > > column=A:BODYSTYLESLUG, timestamp=1430280906358, > > value=sport-utility > > > > 4\x0010135\x001C4BJWEG2CL117550\x00\x7F\xFF\xFF\xFF > > column=A:CARFAXREPORTAVAILABLE, timestamp=1430280906358, > > value=\x01 > > > > 4\x0010135\x001C4BJWEG2CL117550\x00\x7F\xFF\xFF\xFF > > column=A:CARTYPE, timestamp=1430280906358, value={"isLuxury": false, > > "isTruck": false, "isSedan": false, "isCoupe": false, "isSuv": true, > > "isConvertible": false, "isVan": false, "isWagon": false, > > "isEasyCareQualified": true} > > > > I specified, startRow='33078'. Then how come this result shows up? What's > > going over here? > > > > -- > > Thanks & Regards, > > Anil Gupta > > > -- Thanks & Regards, Anil Gupta --001a113a6f74159a6305180df6c4--