Return-Path: Delivered-To: apmail-hive-user-archive@www.apache.org Received: (qmail 39915 invoked from network); 16 Nov 2010 08:23:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Nov 2010 08:23:40 -0000 Received: (qmail 7319 invoked by uid 500); 16 Nov 2010 08:24:12 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 6943 invoked by uid 500); 16 Nov 2010 08:24:10 -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 6935 invoked by uid 99); 16 Nov 2010 08:24:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 08:24:09 +0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=FREEMAIL_FROM,HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of toxiufeng@gmail.com designates 209.85.213.176 as permitted sender) Received: from [209.85.213.176] (HELO mail-yx0-f176.google.com) (209.85.213.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 08:24:04 +0000 Received: by yxm8 with SMTP id 8so201735yxm.35 for ; Tue, 16 Nov 2010 00:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=ENycIiyVDwMHYP4mY3fCKIg+DH+w0GirDuj0DJFwbNo=; b=O4yDmkutvM66RGlHGCPQqRSN3ohfVAa7wpPkc80VwebUKl+1lwdEDmaRQd3HtkjYin GJC4A7eO9D04K1hb8kIKQZVrpfjStkavSf+c/5PGs0npyL4wRFHuqXUToVpNSQ2BECL4 xdm9uFmiVDdwZMX2N0s0npTFLCTVRGfIbyJuA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=pf+mjpOM6L7MjSY7qzcw+YWlx9IG2Sc44hUh5SUFztAoz2iZxB0XN61tzVfkNkiQQO XY4jiyGwkrk8tGr9RX3Mx7dxUqkyfBveQDtt1M2Z426wMvd3o3M/LdR7P0CZY6debCfS jCR6n/AivojOqUawuwxceHXwAbVAmo4tsNL1U= Received: by 10.151.98.2 with SMTP id a2mr11132230ybm.426.1289895823667; Tue, 16 Nov 2010 00:23:43 -0800 (PST) MIME-Version: 1.0 Sender: toxiufeng@gmail.com Received: by 10.151.7.15 with HTTP; Tue, 16 Nov 2010 00:23:01 -0800 (PST) In-Reply-To: References: From: afancy Date: Tue, 16 Nov 2010 09:23:01 +0100 X-Google-Sender-Auth: kfuND8WckEsstPRaAPc73O0wqWs Message-ID: Subject: Re: How to generate global unique ID? To: timrobertson100@gmail.com, user@hive.apache.org Content-Type: multipart/alternative; boundary=0015174c1a105df51d04952746d6 --0015174c1a105df51d04952746d6 Content-Type: text/plain; charset=ISO-8859-1 Hi, Tim, I think sequential integer would be better. Is it difficult to generate a global integer? BTW: how to generate UUID in Hive? thanks Regards, afancy On Tue, Nov 16, 2010 at 9:11 AM, Tim Robertson wrote: > 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? Thanks! > > 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 > > > > > --0015174c1a105df51d04952746d6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, Tim,

I think= sequential integer would be better. Is it difficult to generate a global i= nteger?
BTW: how to generate UUID in Hive? thanks

Regards,<= /div>
afancy

On Tue, Nov 16, 2010 at 9:11 AM, Tim= Robertson <timrobertson100@gmail.com> wrote:
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 <groupme@gmail.com> wrote:
> Hi, Zhang,
> How to integrate this snowflake with Hive? =A0Thanks!
> Regards,
> afancy
>
> On Mon, Nov 15, 2010 at 10:35 AM, Jeff Zhang <zjffdu@gmail.com> wrote:
>>
>> Please refer https://github.com/twitter/snowflake
>>
>>
>>
>> On Mon, Nov 15, 2010 at 5:09 PM, afancy <groupme@gmail.com> 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
>
>

--0015174c1a105df51d04952746d6--