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 476A9D55C for ; Sat, 22 Sep 2012 14:47:31 +0000 (UTC) Received: (qmail 63124 invoked by uid 500); 22 Sep 2012 14:47:29 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 63076 invoked by uid 500); 22 Sep 2012 14:47:29 -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 63066 invoked by uid 99); 22 Sep 2012 14:47:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Sep 2012 14:47:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dechouxb@gmail.com designates 209.85.216.41 as permitted sender) Received: from [209.85.216.41] (HELO mail-qa0-f41.google.com) (209.85.216.41) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Sep 2012 14:47:22 +0000 Received: by qatp27 with SMTP id p27so236903qat.14 for ; Sat, 22 Sep 2012 07:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0TFRKWGualpGqOHfHCDpsxZtVXiRiSSuhd+EfeDwNKw=; b=ohhG/3ygL8feWrc1ghumtHhR0SYhuuaB8xer//6oNGCJjFfCbXpmSMXlRq3PnDB1pG MmS0mG+7Vuo3SngicPm1AvuS5gz0Wy79EQ9YaL8Y9IQLNsK+NcnPrfNyPjEjRpW/YBTE UhByDr9CYKbJ/Amm9/UxyZRXDvPSQE6E2jV/ctp/YJCX2M7o93W5mzWRHRQZYFFFHHpu sxI+79Fv/HhrnJOWlDXRQXDtfVmIZSDw/Rz1oBfLop/pZMN1xvXke8ZO0dJIsWD4/R2S 49gIxLZZ49Ih+p20HWwN3CRFSkhoMGnJ0qhaNq+2PU3T+z8IV0VLt/UGG+bMRFS36OMY G65Q== MIME-Version: 1.0 Received: by 10.224.168.83 with SMTP id t19mr19975246qay.8.1348325222281; Sat, 22 Sep 2012 07:47:02 -0700 (PDT) Received: by 10.49.71.231 with HTTP; Sat, 22 Sep 2012 07:47:02 -0700 (PDT) In-Reply-To: References: Date: Sat, 22 Sep 2012 16:47:02 +0200 Message-ID: Subject: Re: What is the best value to be used in rowkey From: Bertrand Dechoux To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=20cf3074b5ceea708504ca4b6d20 X-Virus-Checked: Checked by ClamAV on apache.org --20cf3074b5ceea708504ca4b6d20 Content-Type: text/plain; charset=ISO-8859-1 I would say it depends on your context. Like you say, your 'primary key' should be distinct for two different records. Even if you are using a hash in addition to the timestamp, you can not garante that a record won't be overwritten. If you have something in your context that could act as an identifier you should use it, else you need to create it. If you know a given timestamp will be loaded from a single source, adding a counter could do the trick. If this is not the case, you could append information at the timestamp so that you have a single source for a given pre-key value and you could then append a counter (which should only provide a distinct value for each instances having the same pre-key value). I would love to hear about alternatives, though. Regards Bertrand On Sat, Sep 22, 2012 at 4:29 PM, Ramasubramanian Narayanan < ramasubramanian.narayanan@gmail.com> wrote: > Hi, > > Can anyone suggest what is the best value that can be used for a rowkey in > a hbase table which will not produce duplicate any point of time. For > example timestamp with nano seconds may get duplicated if we are loading in > a batch file. > > regards, > Rams > -- Bertrand Dechoux --20cf3074b5ceea708504ca4b6d20--