|
LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
|
Public Member Functions | |
| __init__ (self, ApdbCassandra apdb) | |
| VersionTuple | schemaVersion (self) |
| VersionTuple | apdbReplicaImplementationVersion (cls) |
| bool | hasChunkSubPartitions (cls, VersionTuple version) |
| bool | hasUpdateRecordChunks (cls, VersionTuple version) |
| list[ReplicaChunk]|None | getReplicaChunks (self) |
| None | deleteReplicaChunks (self, Iterable[int] chunks) |
| ApdbTableData | getTableDataChunks (self, ApdbTables table, Iterable[int] chunks) |
| Sequence[ApdbUpdateRecord] | getUpdateRecordChunks (self, Iterable[int] chunks) |
| ApdbReplica | from_config (cls, ApdbConfig config) |
| ApdbReplica | from_uri (cls, ResourcePathExpression uri) |
Protected Member Functions | |
| Timer | _timer (self, str name, *, Mapping[str, str|int]|None tags=None) |
Protected Attributes | |
| _apdb = apdb | |
Implementation of `ApdbReplica` for Cassandra backend.
Parameters
----------
apdb : `ApdbCassandra`
Instance of ApbdCassandra for database.
Definition at line 61 of file apdbCassandraReplica.py.
| lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica.__init__ | ( | self, | |
| ApdbCassandra | apdb ) |
Definition at line 70 of file apdbCassandraReplica.py.
|
protected |
Create `Timer` instance given its name.
Definition at line 75 of file apdbCassandraReplica.py.
| VersionTuple lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica.apdbReplicaImplementationVersion | ( | cls | ) |
Return version number for current ApdbReplica implementation.
Returns
-------
version : `VersionTuple`
Version of the code defined in implementation class.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
Definition at line 85 of file apdbCassandraReplica.py.
| None lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica.deleteReplicaChunks | ( | self, | |
| Iterable[int] | chunks ) |
Remove replication chunks from the database.
Parameters
----------
chunks : `~collections.abc.Iterable` [`int`]
Chunk identifiers to remove.
Notes
-----
This method causes Apdb to forget about specified chunks. If there
are any auxiliary data associated with the identifiers, it is also
removed from database (but data in regular tables is not removed).
This method should be called after successful transfer of data from
APDB to PPDB to free space used by replicas.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
Definition at line 136 of file apdbCassandraReplica.py.
|
inherited |
Create ApdbReplica instance from configuration object.
Parameters
----------
config : `ApdbConfig`
Configuration object, type of this object determines type of the
ApdbReplica implementation.
Returns
-------
replica : `ApdbReplica`
Instance of `ApdbReplica` class.
Definition at line 127 of file apdbReplica.py.
|
inherited |
Make ApdbReplica instance from a serialized configuration.
Parameters
----------
uri : `~lsst.resources.ResourcePathExpression`
URI or local file path pointing to a file with serialized
configuration, or a string with a "label:" prefix. In the latter
case, the configuration will be looked up from an APDB index file
using the label name that follows the prefix. The APDB index file's
location is determined by the ``DAX_APDB_INDEX_URI`` environment
variable.
Returns
-------
replica : `ApdbReplica`
Instance of `ApdbReplica` class, the type of the returned instance
is determined by configuration.
Definition at line 144 of file apdbReplica.py.
| list[ReplicaChunk] | None lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica.getReplicaChunks | ( | self | ) |
Return collection of replication chunks known to the database.
Returns
-------
chunks : `list` [`ReplicaChunk`] or `None`
List of chunks, they may be time-ordered if database supports
ordering. `None` is returned if database is not configured for
replication.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
Definition at line 99 of file apdbCassandraReplica.py.
| ApdbTableData lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica.getTableDataChunks | ( | self, | |
| ApdbTables | table, | ||
| Iterable[int] | chunks ) |
Return catalog of new records for a table from given replica chunks.
Parameters
----------
table : `ApdbTables`
Table for which to return the data. Acceptable tables are
`ApdbTables.DiaObject`, `ApdbTables.DiaSource`, and
`ApdbTables.DiaForcedSource`.
chunks : `~collections.abc.Iterable` [`int`]
Chunk identifiers to return.
Returns
-------
data : `ApdbTableData`
Catalog containing table records. In addition to all regular
columns it will contain ``apdb_replica_chunk`` column.
Notes
-----
This method returns new records that have been added to the table by
`Apdb.store()` method. Updates to the records that happen at later time
are available from `getTableUpdateChunks` method.
This part of API may not be very stable and can change before the
implementation finalizes.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
Definition at line 189 of file apdbCassandraReplica.py.
| Sequence[ApdbUpdateRecord] lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica.getUpdateRecordChunks | ( | self, | |
| Iterable[int] | chunks ) |
Return the list of record updates from given replica chunks.
Parameters
----------
chunks : `~collections.abc.Iterable` [`int`]
Chunk identifiers to return.
Returns
-------
records : `~collections.abc.Sequence` [`ApdbUpdateRecord`]
Collection of update records. Records will be sorted according
their update time and update order.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
Definition at line 325 of file apdbCassandraReplica.py.
| bool lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica.hasChunkSubPartitions | ( | cls, | |
| VersionTuple | version ) |
Return True if replica chunk tables have sub-partitions.
Definition at line 90 of file apdbCassandraReplica.py.
| bool lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica.hasUpdateRecordChunks | ( | cls, | |
| VersionTuple | version ) |
Return True if ApdbUpdateRecordChunks should exists.
Definition at line 95 of file apdbCassandraReplica.py.
| VersionTuple lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica.schemaVersion | ( | self | ) |
Return version number of the database schema.
Returns
-------
version : `VersionTuple`
Version of the database schema.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
Definition at line 79 of file apdbCassandraReplica.py.
|
protected |
Definition at line 73 of file apdbCassandraReplica.py.