lsst.dax.apdb g864b0138d7+aa38e45daa
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lsst.dax.apdb.apdbReplica.ApdbReplica Class Reference
Inheritance diagram for lsst.dax.apdb.apdbReplica.ApdbReplica:
lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica

Public Member Functions

ApdbReplica from_config (cls, ApdbConfig config)
 
ApdbReplica from_uri (cls, ResourcePathExpression uri)
 
VersionTuple apdbReplicaImplementationVersion (cls)
 
list[ReplicaChunk]|None getReplicaChunks (self)
 
None deleteReplicaChunks (self, Iterable[int] chunks)
 
ApdbTableData getDiaObjectsChunks (self, Iterable[int] chunks)
 
ApdbTableData getDiaSourcesChunks (self, Iterable[int] chunks)
 
ApdbTableData getDiaForcedSourcesChunks (self, Iterable[int] chunks)
 

Detailed Description

Abstract interface for APDB replication methods.

Member Function Documentation

◆ apdbReplicaImplementationVersion()

VersionTuple lsst.dax.apdb.apdbReplica.ApdbReplica.apdbReplicaImplementationVersion ( cls)
Return version number for current ApdbReplica implementation.

Returns
-------
version : `VersionTuple`
    Version of the code defined in implementation class.

Reimplemented in lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica, and lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.

◆ deleteReplicaChunks()

None lsst.dax.apdb.apdbReplica.ApdbReplica.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 in lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica, and lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.

◆ from_config()

ApdbReplica lsst.dax.apdb.apdbReplica.ApdbReplica.from_config ( cls,
ApdbConfig config )
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.

◆ from_uri()

ApdbReplica lsst.dax.apdb.apdbReplica.ApdbReplica.from_uri ( cls,
ResourcePathExpression uri )
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.

◆ getDiaForcedSourcesChunks()

ApdbTableData lsst.dax.apdb.apdbReplica.ApdbReplica.getDiaForcedSourcesChunks ( self,
Iterable[int] chunks )
Return catalog of DiaForcedSource records from given replica chunks.

Parameters
----------
chunks : `~collections.abc.Iterable` [`int`]
    Chunk identifiers to return.

Returns
-------
data : `ApdbTableData`
    Catalog containing DiaForcedSource records. In addition to all
    regular columns it will contain ``apdb_replica_chunk`` column.

Notes
-----
This part of API may not be very stable and can change before the
implementation finalizes.

Reimplemented in lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica, and lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.

◆ getDiaObjectsChunks()

ApdbTableData lsst.dax.apdb.apdbReplica.ApdbReplica.getDiaObjectsChunks ( self,
Iterable[int] chunks )
Return catalog of DiaObject records from given replica chunks.

Parameters
----------
chunks : `~collections.abc.Iterable` [`int`]
    Chunk identifiers to return.

Returns
-------
data : `ApdbTableData`
    Catalog containing DiaObject records. In addition to all regular
    columns it will contain ``apdb_replica_chunk`` column.

Notes
-----
This part of API may not be very stable and can change before the
implementation finalizes.

Reimplemented in lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica, and lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.

◆ getDiaSourcesChunks()

ApdbTableData lsst.dax.apdb.apdbReplica.ApdbReplica.getDiaSourcesChunks ( self,
Iterable[int] chunks )
Return catalog of DiaSource records from given replica chunks.

Parameters
----------
chunks : `~collections.abc.Iterable` [`int`]
    Chunk identifiers to return.

Returns
-------
data : `ApdbTableData`
    Catalog containing DiaSource records. In addition to all regular
    columns it will contain ``apdb_replica_chunk`` column.

Notes
-----
This part of API may not be very stable and can change before the
implementation finalizes.

Reimplemented in lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica, and lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.

◆ getReplicaChunks()

list[ReplicaChunk] | None lsst.dax.apdb.apdbReplica.ApdbReplica.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 in lsst.dax.apdb.cassandra.apdbCassandraReplica.ApdbCassandraReplica, and lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.


The documentation for this class was generated from the following file: