From user-return-4987-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Mon Apr 26 20:36:31 2010 Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 13794 invoked from network); 26 Apr 2010 20:36:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Apr 2010 20:36:31 -0000 Received: (qmail 90121 invoked by uid 500); 26 Apr 2010 20:36:30 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 90095 invoked by uid 500); 26 Apr 2010 20:36:30 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 90087 invoked by uid 99); 26 Apr 2010 20:36:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Apr 2010 20:36:30 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,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 roland237@googlemail.com designates 209.85.219.225 as permitted sender) Received: from [209.85.219.225] (HELO mail-ew0-f225.google.com) (209.85.219.225) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Apr 2010 20:36:24 +0000 Received: by ewy25 with SMTP id 25so4408410ewy.27 for ; Mon, 26 Apr 2010 13:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=x2uAR3mtfRVM2+/5SAYTgXKhwY+ZxPxy6U0I3S/l0dU=; b=d4sUl4IQuIPqHCWwp+opp2Jfq+NXQ8YgaykKE23YPqijXDx8WleUWsaA467njsuZvP FL0ot8Ey72enioHlhMyHvhgHCTfqHHLKlc3/oWF4hCrbFaPvc6/ykqZ74Ozwf9QNp+4k ENFMm6DSvNg418y3xHwalR3WO5X8C6hn5VAq4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=tABdLJbpDTQw+bTILalaOgqhDWHcNnjFdLUd2mb3ixX3ymcdBtof0fZA7G+x+vB7m1 6wQqwVAH4HOQMpgXf3dncFJ23ygR6HwXqr+oNb790yRszqlGSDt69bxw1XC1XWkW3EoA PX2H7hTp2McMHKSW93xZbVL+ZZcF0MmotKKiw= MIME-Version: 1.0 Received: by 10.103.80.22 with SMTP id h22mr2603914mul.127.1272313832437; Mon, 26 Apr 2010 13:30:32 -0700 (PDT) Sender: roland237@googlemail.com Received: by 10.103.231.7 with HTTP; Mon, 26 Apr 2010 13:30:31 -0700 (PDT) Date: Mon, 26 Apr 2010 22:30:31 +0200 X-Google-Sender-Auth: ea771501e7611e5d Message-ID: Subject: How to generate 'unique' identifiers for use in Cassandra From: =?ISO-8859-1?Q?Roland_H=E4nel?= To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e65c7c14074723048529a652 X-Virus-Checked: Checked by ClamAV on apache.org --0016e65c7c14074723048529a652 Content-Type: text/plain; charset=ISO-8859-1 Typically, in the SQL world we use things like AUTO_INCREMENT columns that let us create a unique key automatically if a row is inserted into a table. What do you guys usually do to create identifiers for use in Cassandra? Do we only rely on "currentTimeMills() + random()" to create something that is 'unique enough' (but theoretically not fail-safe)? Or are some people here using systems like ZooKeeper for this purpose? -Roland --0016e65c7c14074723048529a652 Content-Type: text/html; charset=ISO-8859-1 Typically, in the SQL world we use things like AUTO_INCREMENT columns that let us create a unique key automatically if a row is inserted into a table.

What do you guys usually do to create identifiers for use in Cassandra?

Do we only rely on "currentTimeMills() + random()" to create something that is 'unique enough' (but theoretically not fail-safe)? Or are some people here using systems like ZooKeeper for this purpose?

-Roland

--0016e65c7c14074723048529a652--