seniorHadoop
What is HDFS metadata internals (fsimage and edits file)?
Updated May 16, 2026
Short answer
HDFS metadata is stored in fsimage (snapshot) and edits log (transaction log).
Deep explanation
fsimage stores a point-in-time snapshot of the entire filesystem namespace. Every change after that is recorded in the edits log. On restart, NameNode applies edits to fsimage to rebuild the latest state. This separation ensures fast write operations and consistent recovery.
Real-world example
Like a database checkpoint (fsimage) plus transaction log (edits).
Common mistakes
- Assuming fsimage updates continuously in real-time.
Follow-up questions
- What happens if edits log grows too large?
- Who performs checkpointing?