UUIDs

Cassandra has two types that store Universally Unique Identifiers:

  • The uuid type stores Version 1 and Version 4 UUIDs
  • The timeuuid type stores Version 1 UUIDs and has special functionality for conversion between UUIDs and timestamps

A Universally Unique Identifier (UUID), is essentially a very large number generated in a specific way, designed to guarantee that the same UUID will never be generated anywhere in the world at any time. Version 1 UUIDs are generated using a high-precision timestamp and the generating computer's MAC address; the timestamp can be extracted from the UUID. Version 4 UUIDs use random or pseudo-random numbers.

CQL uses the canonical representation of UUIDs, which is a sequence of hexadecimal digits broken up ...

Get Learning Apache Cassandra - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.