Module org.elasticsearch.server
Package org.elasticsearch.common
Class TimeBasedKOrderedUUIDGenerator
java.lang.Object
org.elasticsearch.common.TimeBasedKOrderedUUIDGenerator
Generates a base64-encoded, k-ordered UUID string optimized for compression and efficient indexing.
This method produces a time-based UUID where slowly changing components like the timestamp appear first, improving prefix-sharing and compression during indexing. It ensures uniqueness across nodes by incorporating a timestamp, a MAC address, and a sequence ID.
Timestamp: Represents the current time in milliseconds, ensuring ordering and uniqueness.
MAC Address: Ensures uniqueness across different coordinators.
Sequence ID: Differentiates UUIDs generated within the same millisecond, ensuring uniqueness even at high throughput.
The result is a compact base64-encoded string, optimized for efficient compression of the _id field in an inverted index.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
sequenceNumber
-
lastTimestamp
-
timestampSupplier
-
-
Constructor Details
-
TimeBasedKOrderedUUIDGenerator
-
-
Method Details
-
getBase64UUID
-
getBase64UUID
-
macAddress
protected byte[] macAddress()
-