-
Notifications
You must be signed in to change notification settings - Fork 78
Description
Key
The minimum key size is 5 bytes (4 bytes for "user" + 1 byte for single digit like "0").
Regarding key generation, it depends on theinsertorderoption:
ordered: Keys are generated sequentially starting from 1 (user1, user2, user3, ...)
hashed: Keys use hashed 64-bit values for random distributionYou can also use the zeropadding option to fix the key length. For example, with
zeropadding=20, keys would look like:user0000000000000000001 user0000000000000000002 user1234567890123456789This ensures all keys have the same 24-byte length.
Value
Here's what a typical record might look like:
Key: user1234567890 Value: field0=<100 bytes of data>, field1=<100 bytes of data>, ..., field9=<100 bytes of data>Here, the field can be thought of as a column in SQL. However, since columns are not supported in key-value stores, they are encoded as follows.
Field Name Length: 32-bit length of field name Field Name: field name ("field0", "field1", etc.) Field Value Length : 32-bit length of field value Field Value: actual field valueSo field each is 114 bytes.
Originally posted by @ls4154 in #25
Hello author, now I want to remove the fixed prefix "user" from the key. How can I do that? I didn't see the relevant control parameters.