Object Server for Swift
Bases: object
Implements the WSGI application for the Swift Object Server.
Handle HTTP DELETE requests for the Swift Object Server.
Handle HTTP GET requests for the Swift Object Server.
Handle HTTP HEAD requests for the Swift Object Server.
Handle HTTP POST requests for the Swift Object Server.
Handle HTTP PUT requests for the Swift Object Server.
Handle REPLICATE requests for the Swift Object Server. This is used by the object replicator to get hashes for directories.
Sends or saves an async update.
Parameters: |
|
---|
Update the container when objects are updated.
Parameters: |
|
---|
Update the expiring objects container when objects are updated.
Parameters: |
|
---|
paste.deploy app factory for creating WSGI object server apps
Bases: swift.common.daemon.Daemon
Replicate objects.
Encapsulates most logic and data needed by the object replication process. Each call to .replicate() performs one replication pass. It’s up to the caller to do this in a loop.
Check to see if the ring has been updated
Returns: | boolean indicating whether or not the ring has changed |
---|
Returns a sorted list of jobs (dictionaries) that specify the partitions, nodes, etc to be rsynced.
In testing, the pool.waitall() call very occasionally failed to return. This is an attempt to make sure the replicator finishes its replication pass in some eventuality.
Loop that runs in the background during replication. It periodically logs progress.
Utility function that kills all coroutines currently running.
Run a replication pass
Synchronize local suffix directories from a partition with a remote node.
Parameters: |
|
---|---|
Returns: | boolean indicating success or failure |
Logs various stats for the currently running replication pass.
High-level method that replicates a single partition.
Parameters: | job – a dict containing info about the partition to be replicated |
---|
High-level method that replicates a single partition that doesn’t belong on this node.
Parameters: | job – a dict containing info about the partition to be replicated |
---|
Bases: swift.common.daemon.Daemon
Update object information in container listings.
Get the container ring. Load it, if it hasn’t been yet.
If there are async pendings on the device, walk each one and update.
Parameters: | device – path to device |
---|
Perform the object update to the container
Parameters: |
|
---|
Process the object information to be updated and update.
Parameters: |
|
---|
Run the updater continuously.
Run the updater once.
random() -> x in the interval [0, 1).
Bases: object
Walk through file system to audit object
Entrypoint to object_audit, with a failsafe generic exception handler.
Audits the given object path.
Parameters: |
|
---|
Based on config’s object_size_stats will keep track of how many objects fall into the specified ranges. For example with the following:
object_size_stats = 10, 100, 1024
and your system has 3 objects of sizes: 5, 20, and 10000 bytes the log will look like: {“10”: 1, “100”: 1, “1024”: 0, “OVER”: 1}