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 9A0781075C for ; Tue, 25 Mar 2014 03:36:56 +0000 (UTC) Received: (qmail 42498 invoked by uid 500); 25 Mar 2014 03:36:52 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 42427 invoked by uid 500); 25 Mar 2014 03:36:51 -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 42408 invoked by uid 99); 25 Mar 2014 03:36:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2014 03:36:50 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of fancyerii@gmail.com designates 209.85.217.179 as permitted sender) Received: from [209.85.217.179] (HELO mail-lb0-f179.google.com) (209.85.217.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2014 03:36:44 +0000 Received: by mail-lb0-f179.google.com with SMTP id p9so4300478lbv.38 for ; Mon, 24 Mar 2014 20:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=HmEzTp/NaC4RLArEKUqrrq7ka+tFH7zUgzrfy4ZyvsA=; b=wKFp/K8Ex2nzRqFlPtuJgeye+djdr492v58I1BGAAbVgJdSfpNYE1w66DwRdf75Lbb 4m6uSuBPVpMbOvSSVUGlfqj4LWUXWJcrW9lrGtbYyWNqgLtoYCoGOCgOMTeoERcTIoMd P/AVuqEY9oWr5312bwxqBxPgynO357M+qz++0jRkQzfWZfxtYkCpjvpo3AuRJZJNDt7J Sl35QD7j3KS085HHxmQypySMle+ODZEc0UG3EkfdUBNohIbfKEK22I0dN55M+fwltk7G BYH0hTidSmWQOQos4qQ/IFz1Th9JuBNvMPUxiICcEsppy+dJwPE6e/ckfvtaDK6O3CRH 8QeQ== MIME-Version: 1.0 X-Received: by 10.152.170.137 with SMTP id am9mr48646242lac.15.1395718583391; Mon, 24 Mar 2014 20:36:23 -0700 (PDT) Received: by 10.112.148.41 with HTTP; Mon, 24 Mar 2014 20:36:23 -0700 (PDT) Date: Tue, 25 Mar 2014 11:36:23 +0800 Message-ID: Subject: how to calculate stop key for a scan? From: Li Li To: user@hbase.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org I have two string as primary key(k1,k2) and my row key in hbase is MD5(k1)MD5(k1) I want to get all the rows equals k1.I can set startRowKey easily. But How can I calculate stopRowKey? is following correct? what if the last byte of md5 is 127? what about overflow? any tools for this? Scan scan=new Scan(); byte[] start=MD5(key1); scan.setStartRow(start); byte[] end=MD5(key1); end[end.length-1]++ scan.setStopRow(end);