Questions tagged [timeuuid]

Use it to mark specific Cassandra questions that are involving a TimeUUID instead of a generic UUID.

TimeUUID is a random global unique identifier (UUID) of 16 bytes.

Sample hex presentation: a4a70900-24e1-11df-8924-001ff3591711

See http://en.wikipedia.org/wiki/Universally_Unique_Identifier

A TimeUUID is a basic Cassandra data type. An important property is that TimeUUIDs can be ordered by time.

50 questions
1
vote
1 answer

Cassandra TimeUUID flood file descriptor when use uuid in default

I have Cassandra model as import uuid from cassandra.cqlengine import columns from cassandra.cqlengine.models import Model class MyModel(Model): ... ... created_at = columns.TimeUUID(primary_key=True, …
Nilesh
  • 20,521
  • 16
  • 92
  • 148
1
vote
1 answer

Get timebased UUID from datetime on the jvm

Cassandra has a timeuuid type, and there are functions to create a timeuuid for "now". There's also documented ways of getting back the time from a timeuuid. However, is there a way to get a timeuuid from a joda DateTime? It feels like this should…
ashic
  • 6,367
  • 5
  • 33
  • 54
1
vote
1 answer

how to compress uuid and timeuuid?

uuid or Universally unique identifier and timeuuid are long 128-bit value. In Cassandra database and because of its concepts I used uuid and timeuuid for our entities identifier and now I want to compress uuid and timeuuid or reduce its size when…
Mohammad Kermani
  • 5,188
  • 7
  • 37
  • 61
1
vote
1 answer

Update rows with timeuuid as clustering column

I've a table which has a String as key and a timeuuid as clustering column. What I'd like to do is, to do an update on it based on timeuuid < now(). Example: UPDATE table SET is_used = true WHERE key1 = 'value' AND created_at <…
questionaire
  • 2,475
  • 2
  • 14
  • 28
1
vote
1 answer

Cassandra: change type from UUID to TIMEUUID

I'm trying to change the type of a column from UUID to TIMEUUID, but I'm unable to do so. ALTER TABLE Person ALTER KEY TYPE timeuuid; Error: Bad Request: Cannot change key from type uuid to type timeuuid: types are incompatible. Any idea on how…
Costi Muraru
  • 2,065
  • 1
  • 20
  • 25
0
votes
0 answers

Generate UUID in application which has 40000 request per month

I need to maintain unique id for application which has 40000 application per month. I am considering using simple UUID. Is there any better approach of creating it? UUID uuid = UUID.randomUUID(); Timebased or random is good, i don't want to have…
Mohan
  • 699
  • 1
  • 11
  • 27
0
votes
1 answer

How to cast to timestamp for the example shown in Pyspark?

I have 5 cloumns in a df. I want to cast the column "occurrence" to timestamp. I have a piece of code shown below which does the work when I just put the actual string. How do I modify the code to convert the entire occurrence column to a timestamp?…
Rahul Diggi
  • 288
  • 2
  • 16
0
votes
0 answers

Epoch timestamp to UUID conversion in scala

I want to convert a epoch time say 1639514232 to time UUID and save it to cassandra. UUIDs.endOf() is not working and generating a decipherable uuid 5e23b68f-2cbb-11b2-7f7f-7f7f7f7f7f7f . Can you suggest how can I achieve it.
beskar
  • 55
  • 1
  • 10
0
votes
3 answers

Casting cassandra timestamp column as timeuuid

I'm getting events from Kafka and storing into Cassandra. Parsing json which contains fields eventID, sessionID, timestamp, userID to create columns for Cassandra table which looks like this: cassandra@cqlsh> CREATE TABLE mydata.events ( ... …
dejanmarich
  • 1,235
  • 10
  • 26
0
votes
1 answer

Time based UUID does not follow creation order according when implementing RFC 4122

I am creating a custom algorithm to embed info into a timeUUID. When studying the RFC 4122. In the spec, the version 1 UUID has the following structure: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5…
Vercintegorix
  • 305
  • 2
  • 6
0
votes
1 answer

Validating TimeUuid using JavaScript (Node.js)

I would like to validate a uuid string to make sure it's a valid time uuid (i.e. a test to check if a string is a time uuid). For example: A request comes in with an id like so, as a string: 54d890dc-40a5-4686-8d7e-095e3934d99e (this is uuid v4), is…
Attila
  • 1,097
  • 2
  • 19
  • 45
0
votes
1 answer

Use cassandra inbuild `now()` function to generate TimeUUID with Model in Python driver

I have code as import time from uuid import uuid4 import cassandra from cassandra.cqlengine.models import Model from cassandra.cqlengine.query import BatchQuery from cassandra.cqlengine import columns, connection from…
Nilesh
  • 20,521
  • 16
  • 92
  • 148
0
votes
1 answer

toTimestamp function is not working in select statement cassandra

I have table as cqlsh> DESC relation.students; CREATE TABLE relation.students ( student_id uuid, created_at timeuuid, name text, PRIMARY KEY (student_id, created_at) ) WITH CLUSTERING ORDER BY (created_at DESC) AND…
Nilesh
  • 20,521
  • 16
  • 92
  • 148
0
votes
1 answer

Cassandra PHP - check if given timeuuid string is a valid timeuuid

How can I check if a given timeuuid i.e. fa6e9e80-299c-11e7-98d8-f7a8744353f3 is a valid timeuuid before query? using a slighty different, yet still right format timeuuid: fa6e9e80-299c-11e7-98d8-f7a8744353av results in an…
0
votes
1 answer

Cassandra timeuuid comparison

I have a table, CREATE TABLE log ( uuid uuid, time timeuuid, user text, .... PRIMARY KEY (uuid, time, user) ) and CREATE CUSTOM INDEX time_idx on Log(time) USING 'org.apache.cassandra.index.sasi.SASIIndex'; then I want to…
Schmidt
  • 51
  • 7