Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_small-files-compaction

Small Files Problem & Lakehouse Compaction Architecture

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Small Files Problem & Lakehouse Compaction Architecture — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_small-files-compaction/opengraph-image)](https://archos.sageideas.dev/d/dgm_small-files-compaction)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_small-files-compaction)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_small-files-compaction" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Small Files Problem & Lakehouse Compaction Architecture — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Streaming Writers"]
  n1_1["Manifest Monitor"]
  n2a_2["Bin-Pack Compactor"]
  n2b_3["Z-Order / Sort Job"]
  n3_4[("Atomic Catalog Swap")]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Scan meta · S3"| n1_1
  n1_1 -->|"2a. Bin-pack · Spark"| n2a_2
  n1_1 -.->|"2b. Sort cols · Spark"| n2b_3
  n2a_2 -->|"3a. Swap snap · S3"| n3_4
  n2b_3 -->|"3b. Verify · Control"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • Streaming WritersSTATELESS
    10k+ tiny Parquet files/hour
  • Manifest MonitorSTATELESS
    Detect high file-count parts
  • Bin-Pack CompactorSTATELESS
    Rewrite into 256MB Parquet
  • Z-Order / Sort JobSTATELESS
    Cluster hot filter columns
  • Atomic Catalog SwapSTATEFUL
    Commit compact + expire old
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. Streaming Writers → Manifest Monitor (Scan meta)[S3]
  2. Manifest Monitor → Bin-Pack Compactor (Bin-pack)[Spark]
  3. Manifest Monitor → Z-Order / Sort Job (Sort cols)[Spark]
  4. Bin-Pack Compactor → Atomic Catalog Swap (Swap snap)[S3]
  5. Z-Order / Sort Job → Atomic Catalog Swap (Verify)[Control]
  6. Atomic Catalog Swap → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →