Bases: swift.common.daemon.Daemon
Audit containers.
Audits the given container path
Parameters: | path – the path to a container db |
---|
Run the container audit until stopped.
Run the container audit once.
Pluggable Back-ends for Container Server
Bases: swift.common.db.DatabaseBroker
Encapsulates working with a container database.
Create the container_info table which is specific to the container DB. Not a part of Pluggable Back-ends, internal to the baseline code. Also creates the container_stat view.
Parameters: |
|
---|
Create the object table which is specific to the container DB. Not a part of Pluggable Back-ends, internal to the baseline code.
Parameters: | conn – DB connection object |
---|
Create policy_stat table.
Parameters: |
|
---|
Mark an object deleted.
Parameters: |
|
---|
Check if container DB is empty.
Returns: | True if the database has no active objects, False otherwise |
---|
Get global data for the container.
Returns: | dict with keys: account, container, created_at, put_timestamp, delete_timestamp, status_changed_at, object_count, bytes_used, reported_put_timestamp, reported_delete_timestamp, reported_object_count, reported_bytes_used, hash, id, x_container_sync_point1, x_container_sync_point2, and storage_policy_index. |
---|
Get the is_deleted status and info for the container.
Returns: | a tuple, in the form (info, is_deleted) info is a dict as returned by get_info and is_deleted is a boolean. |
---|
Get a list of objects which are in a storage policy different from the container’s storage policy.
Parameters: |
|
---|---|
Returns: | list of dicts with keys: name, created_at, size, content_type, etag, storage_policy_index |
Get a list of objects sorted by name starting at marker onward, up to limit entries. Entries will begin with the prefix and will not have the delimiter after the prefix.
Parameters: |
|
---|---|
Returns: | list of tuples of (name, created_at, size, content_type, etag) |
Merge items into the object table.
Parameters: |
|
---|
Creates an object in the DB with its metadata.
Parameters: |
|
---|
Update reported stats, available with container’s get_info.
Parameters: |
|
---|
Update the container_stat policy_index and status_changed_at.
Bases: swift.common.daemon.Daemon
Update container information in account listings.
Report container info to an account server.
Parameters: |
|
---|
Walk the path looking for container DBs and process them.
Parameters: | path – path to walk |
---|
Get the account ring. Load it if it hasn’t been yet.
Get paths to all of the partitions on each drive to be processed.
Returns: | a list of paths |
---|
Process a container, and update the information in the account.
Parameters: | dbfile – container DB to process |
---|
Run the updator continuously.
Run the updater once.