A lightweight, containerized sandbox environment containing a fully configured Big Data stack. The sandbox runs entirely under a non-root system user (cloudera) and is optimized for low-overhead local development.
| Component | Version | Port (Container) | Port (Host Mapped) | Role |
|---|---|---|---|---|
| Apache Hadoop (HDFS) | 3.3.6 | 9000 (RPC), 9870 (UI) |
9870 |
Distributed File System |
| Apache Hadoop (YARN) | 3.3.6 | 8088 (UI) |
8088 |
Job & Resource Management |
| Apache Spark | 3.4.1 | - | - | Distributed Engine (on YARN) |
| Apache Hive | 3.1.3 | 9083 (Metastore) |
- | Relational Data Warehouse |
| Apache Cassandra | 4.1.3 | 9042 (CQL) |
9042 (Optional) |
NoSQL Database |
| MySQL Server | 8.0 | 3306 |
3307 |
Relational Database (Sqoop Source) |
| PostgreSQL Server | 14 | 5432 |
- | Relational Database |
| Apache Sqoop | 1.4.7 | - | - | SQL-to-Hadoop Data Transfer |
- Install Docker or Podman:
- Ubuntu/Debian:
sudo apt-get install docker.io docker-compose - Arch Linux:
sudo pacman -S podman docker-compose slirp4netns
- Ubuntu/Debian:
- Start and enable the service:
- Docker:
sudo systemctl enable --now docker - Podman (Rootless Compose API support): Run
systemctl --user enable --now podman.socket(this starts the user-space daemon socket at/run/user/1000/podman/podman.socksodocker-composecan execute container operations).
- Docker:
- Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Install Docker Desktop (or Podman Desktop):
brew install --cask docker(orbrew install podman-desktop)
- Launch the installed app to start the container engine.
- Download and install Docker Desktop for Windows (select the WSL 2 backend option during setup).
- Alternatively, install Podman for Windows.
- Restart your computer if prompted.
This starts all components and automatically mounts persistent storage volumes.
# 1. Build and start the sandbox in the background
docker-compose up -d --build
# 2. Stop the sandbox without removing the container
docker-compose stop
# 3. Start the stopped sandbox container back up
docker-compose start
# 4. Stop and completely remove the container instance and its network
docker-compose downIf you prefer running manual commands:
# 1. Build the image
docker build -t minimal-bigdata .
# 2. Run the container with persistent volumes
docker run -d \
--replace \
--name bigdata-performance \
-m 16g \
-e PROFILE=PERFORMANCE \
-p 2222:22 \
-p 3307:3306 \
-v hdfs-data:/tmp/hadoop-cloudera \
-v mysql-data:/var/lib/mysql \
-v postgres-data:/var/lib/postgresql \
-v cassandra-data:/opt/cassandra/data \
--network slirp4netns \
localhost/minimal-bigdataYou can customize the CPU and memory limits allocated to the sandbox depending on your host machine's capabilities.
Memory allocation is controlled via the HARDWARE_PROFILE and DOCKER_MEM_LIMIT variables in the .env file. These dynamically configure both the Docker container limits and the internal JVM heaps for services (Hadoop, Cassandra, Hive).
| Setting | Type / Option | Default | Minimum | Maximum / Recommended | Description |
|---|---|---|---|---|---|
HARDWARE_PROFILE |
String option | MINIMAL |
MINIMAL |
PERFORMANCE |
Set to MINIMAL (4G host), BALANCED (8G-16G host), or PERFORMANCE (16G+ host). |
DOCKER_MEM_LIMIT |
Memory string | 4G |
4G |
No upper limit (e.g. 16G, 32G) |
Caps the total physical memory allocated to the container. |
MINIMAL(Default): Hadoop Heap:256m, Cassandra Heap:256M(Requires min4GDocker Mem Limit)BALANCED: Hadoop Heap:1024m, Cassandra Heap:1024M(Requires min8GDocker Mem Limit)PERFORMANCE: Hadoop Heap:4096m, Cassandra Heap:4096M(Requires min16GDocker Mem Limit)
By default, the sandbox has access to all CPU cores on the host machine. You can explicitly restrict CPU cores by editing the deploy resources block in docker-compose.yml.
| Setting | Default | Minimum | Maximum / Recommended | Description |
|---|---|---|---|---|
| CPUs | Unlimited (All cores) | 2.0 |
Match all system cores (e.g., 8.0) |
Number of CPU cores allocated. A minimum of 2.0 is required for multi-threaded service JVMs to run stably. |
deploy:
resources:
limits:
memory: ${DOCKER_MEM_LIMIT:-4G}
cpus: '4.0'You can log directly into the sandbox shell:
- Host Address:
127.0.0.1(orlocalhostusing the-4IPv4 flag) - Port:
2222 - Username:
cloudera - Password:
cloudera - Command:
ssh cloudera@127.0.0.1 -p 2222
- MySQL: User
root/ Passwordcloudera- Inside SSH shell:
mysql -uroot -pcloudera - From host machine:
mysql -h 127.0.0.1 -P 3307 -uroot -pcloudera
- Inside SSH shell:
- PostgreSQL: User
postgres(no password locally)- Inside SSH shell:
psql -U postgres
- Inside SSH shell:
- Cassandra: Native cqlsh
- Inside SSH shell:
cqlsh
- Inside SSH shell:
Once logged in via SSH as the cloudera user, run the following verification checks:
Ensure HDFS is online and writeable:
# Check HDFS status
hdfs dfsadmin -safemode get
# List root directory
hdfs dfs -ls /Import test rows from MySQL into the HDFS directory:
# Seed MySQL with test data
mysql -uroot -pcloudera -e "create database if not exists zeyodb; use zeyodb; drop table if exists zeyotab; create table zeyotab(id int,name varchar(100),city varchar(100)); insert into zeyotab values(1,'sai','chennai'),(2,'ravi','hyderabad'),(3,'rani','chennai'),(4,'vasu','bangalore');"
# Run Sqoop import
sqoop import --connect jdbc:mysql://localhost:3306/zeyodb --username root --password cloudera --m 1 --table zeyotab --delete-target-dir --target-dir /user/cloudera/firstimport
# Verify the imported files in HDFS
hdfs dfs -cat /user/cloudera/firstimport/part-m-00000Run interactive Scala, Python, or SQL workloads on YARN:
# Open Python Spark shell
pyspark
# Open Scala Spark shell
spark-shell
# Open Spark SQL shell
spark-sqlInteract with the SQL data warehouse:
# Open Hive query CLI
hive
# (Inside Hive shell)
CREATE DATABASE sandbox_test;
SHOW DATABASES;- Cause: Rootless Podman network configurations bind loopback listeners to IPv4 (
127.0.0.1), whereas your SSH client defaults to the IPv6 loopback (::1). - Fix: Explicitly connect using
127.0.0.1or the-4flag:ssh cloudera@127.0.0.1 -p 2222orssh -4 cloudera@localhost -p 2222
- Cause: Podman's default
pastanetwork driver fails when the host's TUN device is missing. - Fix: Run the container using the
--network slirp4netnsflag (and installslirp4netnsvia package manager if not present).
- Cause: Containers running rootless are prohibited from changing system scheduling priorities (niceness), crashing Hadoop's default daemons on boot.
- Fix: The sandbox includes a mock
renicecommand located at/usr/local/bin/renicethat catches these calls and returns success (exit 0), allowing daemons to boot.
4. failed to connect to the docker API at unix:///run/user/.../podman/podman.sock (Compose API Failure)
- Cause:
docker-composeexpects a running Docker daemon socket API. When using rootless Podman, this user-space socket is not started by default. - Fix: Start and enable Podman's rootless API socket service for your user account:
systemctl --user enable --now podman.socket