User and team Hive database cleanup tracking
This is a spin-off of T437605.
These databases add 468.8 TB on-disk between Feb 2026 and Aug 2026. This is 50% of the net cluster growth. T431391 asked engineers to clean up this space. That did not happen. This table tracks the work.
Sizes and file counts come from hdfs dfs -count on 2026-10-29. This is the final count. The two change columns compare with the counts on 2026-09-10 (the first count) and 2026-10-26 (the last count). Growth comes from wmf.hdfs_usage, Feb 2026 to Aug 2026. All sizes are on-disk bytes, which include replication.
| Database | On-disk (TB) | Change since 09-10 (TB) | Change since 10-26 (TB) | Growth Feb–Aug (TB) | Files | Owner | Status | Notes |
|---|---|---|---|---|---|---|---|---|
| /user/hive/warehouse/xcollazo.db | 0.1 | -164.5 | 0.0 | +99.8 | 6,825 | @xcollazo | ✅ Done | All tables deleted on 2026-09-11. Only hdfs_usage_rollup stays. |
| /user/hive/warehouse/wmf_traffic.db | 23.8 | -86.0 | +1.0 | +106.3 | 2,734,692 | @KCVelaga_WMF and @amastilovic | ✅ Done | Cleaned on 2026-10-09 with P96661. The script deleted data before 2026-08-31 from 11 staging and intermediate dbt tables, then expired the old snapshots. It grows again: up 59,017 files since 2026-10-26. T439690 tracks the automation of this cleanup. |
| /user/hive/warehouse/apizzata | 1.8 | -63.4 | 0.0 | +63.3 | 60,209 | @APizzata-WMF | ✅ Done | Cleaned on 2026-09-30. The second path apizzata.db went from 1.6 TB to 0.1 TB. |
| /user/hive/warehouse/multimedia.db | 47.2 | -16.9 | 0.0 | +64.0 | 151,783 | @dr0ptp4kt | ✅ Reviewed | Ephemeral tables dropped on 2026-10-15. The remaining tables stay on purpose: *_do_not_delete tables, and tables for the Multimedia Metadata Dataset pipeline. The size can go up and down while that pipeline changes. See T437733#12439553. |
| /user/hive/warehouse/dr0ptp4kt.db | 0.0 | -63.5 | 0.0 | +63.4 | 0 | @dr0ptp4kt | ✅ Done | All tables dropped on 2026-10-15. The database is empty. |
| /user/hive/warehouse/traffic_patterns.db | 4.1 | -26.0 | 0.0 | +30.1 | 164,726 | @fkaelin | ✅ Done | Cleaned on 2026-10-23. See T437733#12468375. |
| /user/hive/warehouse/hghani.db | 1.0 | -21.3 | -5.7 | +15.0 | 329,549 | @Hghani | ✅ Done | Cleaned on 2026-10-27. Down 837,280 files since 2026-10-26. See T437733#12481855. |
| /user/hive/warehouse/wmf_contributors.db | 19.2 | +6.8 | +0.5 | +10.5 | 1,185,148 | TBD | Moved to T439690 | Still grows. Up 8,619 files since 2026-10-26. Five dbt models hold most of the files. See T437733#12364731. T439690 tracks default expiration for dbt staging and intermediate models. |
| /user/hive/warehouse/edit_history.db | 0.0 | -7.7 | 0.0 | +7.7 | 0 | @fkaelin | ✅ Done | Database dropped on 2026-10-23. The path does not exist now. |
| /user/hive/warehouse/kcvelaga_staging.db | 0.0 | -5.3 | 0.0 | +5.3 | 0 | @KCVelaga_WMF | ✅ Done | Deleted on 2026-10-02. The path does not exist now. |
| /user/hive/warehouse/kcvelaga_wmf_traffic.db | 0.5 | -2.9 | 0.0 | +3.4 | 10,395 | @KCVelaga_WMF | ✅ Done | Cleaned on 2026-10-02. |
Total: 97.7 TB on-disk. It was 548.4 TB on 2026-09-10 and 101.9 TB on 2026-10-26. Growth is +468.8 TB.
Two databases with dbt outputs still grow. Together they added +1.5 TB in 3 days:
- wmf_traffic.db: +1.0 TB.
- wmf_contributors.db: +0.5 TB.
The intent is that T439690 stops this growth.
fab.db
/user/hive/warehouse/fab.db holds 4.6 TB and 878,175 files. It held 67.3 TB on 2026-09-10. @fkaelin dropped most tables on 2026-10-23. ✅ Done.
Related tasks
- T439690: Implement default expiration for staging and intermediate dbt models.
- T440170: Decide and implement default Hive location for dbt marts. Today, dbt marts go to /user/hive/warehouse/<db>.db and not to /wmf/data/<db>. This applies to wmf_traffic.db and wmf_contributors.db.
- T438056: Build an HDFS growth dashboard based on wmf.hdfs_usage.
- T441160: HDFS clean-up.
Potential future work
- Use one partition scheme for the wmf_traffic dbt models. The 11 tables in P96661 use three schemes: day DATE, year, month, day INT, and hour TIMESTAMP. One scheme makes the cleanup easier to automate. See T437733#12417005.
Method for each database
- List the tables. Use hdfs dfs -ls -C /user/hive/warehouse/<db>.
- Find the Iceberg tables. Use hdfs dfs -ls -d '/user/hive/warehouse/<db>/*/metadata'.
- Drop the partitions in month batches for any table with many partitions. A single DROP TABLE times out. See P91234.
- Drop the tables. Use DROP TABLE ... PURGE for Iceberg tables.
- Delete the HDFS data. Use hdfs dfs -rm -r -skipTrash. Do not use trash. Trash holds the space for the full fs.trash.interval window.
To delete only old data from an Iceberg table, see P96661. Use DELETE with a filter on the partition columns, then run expire_snapshots. The DELETE frees no space until the snapshots expire.