Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 828D67073 for ; Sun, 30 Oct 2011 08:01:05 +0000 (UTC) Received: (qmail 31728 invoked by uid 500); 30 Oct 2011 08:01:05 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 31593 invoked by uid 500); 30 Oct 2011 08:01:01 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 31585 invoked by uid 500); 30 Oct 2011 08:00:56 -0000 Delivered-To: apmail-incubator-cassandra-commits@incubator.apache.org Received: (qmail 31582 invoked by uid 99); 30 Oct 2011 08:00:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Oct 2011 08:00:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Oct 2011 08:00:53 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 501101BE; Sun, 30 Oct 2011 08:00:32 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Sun, 30 Oct 2011 08:00:31 -0000 Message-ID: <20111030080031.89689.4880@eos.apache.org> Subject: =?utf-8?q?=5BCassandra_Wiki=5D_Update_of_=22FAQ=22_by_RalphGoers?= Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for= change notification. The "FAQ" page has been changed by RalphGoers: http://wiki.apache.org/cassandra/FAQ?action=3Ddiff&rev1=3D137&rev2=3D138 =3D=3D Why is it so hard to work with TimeUUIDType in Java? =3D=3D TimeUUID's are difficult to use from java clients because java.util.UUID = does not support generating version 1 (time-based) UUIDs. Here is one way = to work with them and Cassandra: = - Use the UUID generator from: http://johannburkard.de/software/uuid/ + Use the UUID generator from: http://johannburkard.de/software/uuid/. Note= that while a Type 1 UUID uses a granularity of 100 ns this UUID generator = only uses milliseconds. Even with 100 ns granularity, with a Type 1 UUID it= is still possible to get a duplicate UUID in a multi-threaded application = running on a processor with muliple CPUs unless the clock sequence is prope= rly incremented, which this UUID does not do (in this implementation the cl= ock sequence is a random number generated when the class is loaded). = Below are three methods that are quite useful in working with the uuids a= s they come in and out of Cassandra. =20