I had view the source code of titan db, titan assign ids for vertex , property , label and so on. But it is difficult to understand how it works for assigning ?
Asked
Active
Viewed 98 times
1 Answers
1
A Titan ID have the following format
╔═════════╦═══════════╦══════════════════╗
║ Counter ║ Partition ║ IDTypePadding ║
╚═════════╩═══════════╩══════════════════╝
Every ID has
IDTypePadding
suffix. Suffix define type of ID. This is implemented inIDManager
classVertexIDType
enum.By default there are 32 partition value available. Each titan instance by default randomly choose 10 partition.
For each partition, titan allocate ID Block. Default ID Block size is 10000. Titan make sure, ID block is unique across cluster at partition level using Backend Storage's
titan_ids
table.ID Assigning : First titan select the
IDTypePadding
. then choose a partition randomly. At last get the incremented counter from the ID Block.

Ashraful Islam
- 12,470
- 3
- 32
- 53