Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-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 0BF447E33 for ; Fri, 22 Jul 2011 07:19:22 +0000 (UTC) Received: (qmail 8909 invoked by uid 500); 22 Jul 2011 07:19:15 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 7245 invoked by uid 500); 22 Jul 2011 07:19:01 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 7205 invoked by uid 99); 22 Jul 2011 07:18:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jul 2011 07:18:58 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mp2893@gmail.com designates 209.85.160.176 as permitted sender) Received: from [209.85.160.176] (HELO mail-gy0-f176.google.com) (209.85.160.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jul 2011 07:18:50 +0000 Received: by gyb11 with SMTP id 11so1391082gyb.35 for ; Fri, 22 Jul 2011 00:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=LPh8uLtzNO2UncoMgaGWpQWdyH7tZ5iRLsDldF0wBeQ=; b=cPkdhYvhBQ1jUoNNxnfZgfK0RvqV29sgkqpAM4bu+EZ4bM8NwzAsGw2pYSZqk36jon hK8HNX2feZcMK4mkZ5Mg/w6FjKXVao69T1xZOwcyzklZYJ7VCW9NToLF+2Dt7e49qnyv PqyEg8JsFkGy/v5iP4Wuo7C0CD1JWGhbZorWI= MIME-Version: 1.0 Received: by 10.150.113.18 with SMTP id l18mr1476814ybc.337.1311319109487; Fri, 22 Jul 2011 00:18:29 -0700 (PDT) Received: by 10.151.105.6 with HTTP; Fri, 22 Jul 2011 00:18:29 -0700 (PDT) Date: Fri, 22 Jul 2011 16:18:29 +0900 Message-ID: Subject: Why use "Reverse Timestamp" as the Row Key? From: edward choi To: common-user@hadoop.apache.org, user@hbase.apache.org Content-Type: multipart/alternative; boundary=000e0cd5c6deb54d7a04a8a3453f X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd5c6deb54d7a04a8a3453f Content-Type: text/plain; charset=ISO-8859-1 Hi, I was studying Hbase with "Hadoop: The Definitive Guide". There was a schema example that had as the row key, "Group Id + Reverse Timestamp." This way the same groups will be located near one another in the table. Plus, within the same group, rows will be sorted so that the most recently inserted row will be located at the first. The part I don't understand is, what is the advantage of using "Reverse Timestamp" instead of just "Timestamp"? Why place the newest row on the top? I thought in Hbase, keys are searched by binary search. And in binary search, the chronological order has no effect (at least that's how I understand it). So why put an extra step to reverse the timestamp? Any explanation will be much appreciated. Ed. --000e0cd5c6deb54d7a04a8a3453f--