ApdbCassandraConfig#

class lsst.dax.apdb.ApdbCassandraConfig(*, schema_file: str = 'resource://lsst.sdm.schemas/apdb.yaml', ss_schema_file: str = 'resource://lsst.sdm.schemas/sso.yaml', schema_name: str = 'ApdbSchema', read_sources_months: int = 12, read_forced_sources_months: int = 12, enable_replica: bool = False, replica_chunk_seconds: int = 600, contact_points: tuple[str, ...] = ('127.0.0.1', ), keyspace: str = 'apdb', connection_config: ~lsst.dax.apdb.cassandra.config.ApdbCassandraConnectionConfig = <factory>, partitioning: ~lsst.dax.apdb.cassandra.config.ApdbCassandraPartitioningConfig = <factory>, dia_object_columns: list[str] = [], prefix: str = '', ra_dec_columns: tuple[str, str] = ('ra', 'dec'), replica_skips_diaobjects: bool = False, replica_sub_chunk_count: int = 64, batch_statement_limit: int = 65535, batch_size_limit: int = 1000000)#

Bases: ApdbConfig

Configuration class for Cassandra-based APDB implementation.

Attributes Summary

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Summary

check_ra_dec(v)

get_dbauth_alias()

Return alias name for dbauth lookup.

Attributes Documentation

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Documentation

classmethod check_ra_dec(v: Iterable[str]) tuple[str, str]#
get_dbauth_alias() str#

Return alias name for dbauth lookup.

Returns#

aliasstr

Possibly empty alias name.

Notes#

If connection_config.dbauth_alias is set then it is returned. Otherwise this method tries to guess whether the instance should be in prod or dev cluster based on username and keyspace. It returns “pp_apdb_prod_cluster” or “pp_apdb_dev_cluster” for those two, empty string is returned when it cannot guess.