Return-Path: Delivered-To: apmail-hive-user-archive@www.apache.org Received: (qmail 36865 invoked from network); 16 Nov 2010 08:11:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Nov 2010 08:11:09 -0000 Received: (qmail 98527 invoked by uid 500); 16 Nov 2010 08:11:40 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 98357 invoked by uid 500); 16 Nov 2010 08:11:38 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 98349 invoked by uid 99); 16 Nov 2010 08:11:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 08:11:37 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of timrobertson100@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; Tue, 16 Nov 2010 08:11:31 +0000 Received: by gyf2 with SMTP id 2so195375gyf.35 for ; Tue, 16 Nov 2010 00:11:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=UTUff83jcZL1NvQa6JQSZ2HRUcInjS30xrm4RLTLDjo=; b=BHeb0ZRe2Rj1ZiwsYcGj7vrgmmDo+ML4jqfks8wlbOVpL3gM73MPCkQOlve1mR2lwd 2lYtXqBKOqoNPWoBSHE8C5Tk+1qZ5ATcdgEROGgEFFA3bpDO0giIZ4omh0vrlZHX/Kbn dN4oA+ilY2SWmIjAyzQkybMLTvlypLhAtUAik= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=sM/nTIlDAUMGyUhwu95TWdIs26MRhE+OatIb1oV6vXQHGwJALnOWdFp/gFVkayNp0R 7RxncUBg0pBR+oaf9jpojpu8lbPrZUCc52/GYMmAcvjP5INRQB3Rw7mCO31009wMQ7G0 u0GS2gIjnQtt6oDPAY9XI7qpM7hlDNkTcRGTI= MIME-Version: 1.0 Received: by 10.151.143.20 with SMTP id v20mr11386147ybn.114.1289895070170; Tue, 16 Nov 2010 00:11:10 -0800 (PST) Received: by 10.236.5.207 with HTTP; Tue, 16 Nov 2010 00:11:10 -0800 (PST) In-Reply-To: References: Date: Tue, 16 Nov 2010 09:11:10 +0100 Message-ID: Subject: Re: How to generate global unique ID? From: Tim Robertson To: user@hive.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Does it need to be a sequential INT? If not, then a UUID works very well. Cheers, Tim On Tue, Nov 16, 2010 at 8:55 AM, afancy wrote: > Hi, Zhang, > How to integrate this snowflake with Hive? =A0Thanks! > Regards, > afancy > > On Mon, Nov 15, 2010 at 10:35 AM, Jeff Zhang wrote: >> >> Please refer https://github.com/twitter/snowflake >> >> >> >> On Mon, Nov 15, 2010 at 5:09 PM, afancy wrote: >> > Hi, >> > Does anybody know how to generate a unique ID in Hive? I have a table: >> > hive> describe results; >> > OK >> > id int >> > test string >> > Time taken: 0.091 seconds >> > >> > When I insert data into the table results, i want to generate a unqiue >> > Id, >> > which is like a sequence in RDBMS. >> > Regards, >> > afancy >> >> >> >> -- >> Best Regards >> >> Jeff Zhang > >