โ๏ธ Building an HDFS Gateway with FastAPI in 3 Days
A REST API layer over an existing Apache Hadoop HDFS environment.
What began as an experiment with Hadoop and HDFS turned into a practical question: could HDFS be accessed through a simple REST API? That idea became an HDFS Gateway built with FastAPI.
The goal was to add a clean API layer to an existing Hadoop HDFS setup, so files and directories could be managed without running Hadoop commands directly every time.
Mac โ GitHub โ Linux VM โ Docker โ FastAPI โ WebHDFS โ Hadoop HDFS
Development took place on a Mac, while the Hadoop environment ran inside an Ubuntu Linux virtual machine on a Windows laptop. The project brought together development, deployment and testing across the different environments.
Implemented HDFS operations:
- Upload files to HDFS
- Download files from HDFS
- List HDFS directories and data
- Create directories
- Delete files or directories
- Expose HDFS operations through REST API endpoints
The work also involved Linux configuration, Docker networking, WebHDFS communication, application-to-Hadoop connectivity, automated tests, GitHub Actions, CI/CD and deployment debugging.
The project was completed as a three-day build: Day 1 focused on getting the environment and connectivity working, Day 2 on understanding and integrating the components, and Day 3 on getting the working gateway into shape.
The repository documents the architecture, setup, API endpoints, testing and implementation. Suveer welcomes ideas, improvements and collaboration.
Project snapshots
GitHub: View the source code, architecture, setup and implementation details.
View HDFS Gateway on GitHub โ
#Hadoop #HDFS #FastAPI #Docker #Linux #CICD #BackendDevelopment #DevOps #BuildInPublic