swh.storage.noop module#
- class swh.storage.noop.NoopCqlRunner[source]#
Bases:
InMemoryCqlRunner
- class swh.storage.noop.NoopStorage(journal_writer: Dict[str, Any] | None = None, objstorage: Dict[str, Any] | None = None)[source]#
Bases:
InMemoryStorageA backend of swh-storage backed by Cassandra
- Parameters:
hosts – Seed Cassandra nodes, to start connecting to the cluster
keyspace – Name of the Cassandra database to use
objstorage – Passed as argument to
ObjStorage; if unset, use a NoopObjStorageport – Cassandra port
journal_writer – Passed as argument to
JournalWriterallow_overwrite – Whether
*_addfunctions will check if an object already exists in the database before sending it in an INSERT.Falseis the default as it is more efficient when there is a moderately high probability the object is already known, butTruecan be useful to overwrite existing objects (eg. when applying a schema update), or when the database is known to be mostly empty. Note that aFalsevalue does not guarantee there won’t be any overwrite.consistency_level – The default read/write consistency to use
directory_entries_insert_algo – Must be one of: * one-by-one: naive, one INSERT per directory entry, serialized * concurrent: one INSERT per directory entry, concurrent * batch: using UNLOGGED BATCH to insert many entries in a few statements
auth_provider –
An optional dict describing the authentication provider to use. Must contain at least a
clsentry and the parameters to pass to the constructor. For example:auth_provider: cls: cassandra.auth.PlainTextAuthProvider username: myusername password: mypassword
table_options – An optional dict mapping each table name (or the literal
object_references_*) to CQL table options
- origin_visit_add(visits: List[OriginVisit]) Iterable[OriginVisit][source]#