INNER CODE UNIT · Python

blob_key

Altinity/clickhouse-operator · tools/restore_shared_to_replicated.py:308

def blob_key(manifest: Manifest, info: ManifestFile) -> str:
    if info.data_file:
        return info.data_file
    gen = manifest.data_file_name_generator.lower()
    if gen == "checksum" and info.checksum:
        n = manifest.data_file_name_prefix_length
        c = info.checksum
        if 0 < n < len(c):
            return f"{c[:n]}/{c[n:]}"
        return c
    return info.name


def is_metadata_sql(name: str) -> bool:
    return name.startswith("metadata/") and name.endswith(".sql")


def metadata_kind(name: str) -> str:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…