Class RdbBucketDatabase

  • All Implemented Interfaces:
    BucketDatabase

    public class RdbBucketDatabase
    extends Object
    implements BucketDatabase
    Stores users objects in rocksdb

    Each bucket has associated a TablespaceRecord with the corresponding tbsIndex.

    Each object in the bucket has an 4 bytes objectId

    The rocksdb key is formed by either one of:

     4 bytes    1 byte             variable size
     tbsIndex   0 = bucket info
     tbsIndex   1 = metadata       objectName (up to 1000 bytes)
     tbsIndex   2 = data           objectId (4 bytes)
     
    The rocksdb value is formed by:
    • in case of metadata: protobuf representation of ObjectProperties (contains the objectId and key,value metadata)
    • in case of user object: binary user object
    To retrieve an object based on the bucket name and object name,
    1. retrieve the tbsIndex based on the bucket name
    2. retrieve the ObjectProperties based on the tbsIndex and object name
    3. retrieve the object data based on the tbsIndex and objectId