This is a Hadoop Ecosystem Sandbox, only for learning purposes. Use it as you like!
- Shell scripts for local HDFS and Yarn installation, setup and inicialization
- Shell scripts for Spark's installation and Master/Slave initialization
- Sample Spark pipeline using Scala with SBT
- Shell scripts for Hive installation, setup and inicialization
- Sample Hive's table and query
The scripts were successfully tested in Ubuntu 18.04.5 LTS
Be aware: HDFS will be installed in your /tmp folder. If you want persistent storage, please change the `.xml` configuration files created by the /hadoop/setup.sh script.
Hadoop, Hive and Spark will be installed in your HOME directory.
- ${HOME}/hadoop
- ${HOME}/hive
- ${HOME}/spark
- Hadoop: 3.3.0
- Spark: 3.0.1
- Hive: 3.1.2
- Run
./hadoop/install.sh. This will install needed OS dependencies like Java JDK, SSH, PDSH and will download and extract hadoop. - Make sure you can access
ssh localhostwithout a password. Check this - Run
./hadoop/setup.sh. This will create the configuration files in the hadoop'setcfolder (core-site.xml, hdfs-site.xml, mapred-site.xml and yarn-site.xml) and it will format the HDFS. - Run
./hadoop/start.sh. This will start Hadoop's Namenode and Datanode, YARN and it'll create a hadoop directory with your username/user/${USER} - Run
./hadoop/upload_demo_dataset.sh. This will download a small sample dataset and it'll upload it to HDFS, allowing Spark and Hive demonstration.
- Run
./spark/install.sh. This will download and extract Spark. - Run
./spark/start.sh. This will set Spark Master and (1) Slave up and running.
- Make sure you have initializated spark (check out http://localhost:8080/)
- Make sure you have Java JDK and SBT installed.
- Run
./spark/submit_to_spark.sh. The scala project will build, package and it'll be sent to Spark.
- Run
./hive/install.sh. Hive will be downloaded and extracted. - Run
./hive/setup.sh. This will create the needed Hive folders in HDFS, it will create a setup file (hive-site.xml) for Hive and will inicialize Hive's metastore - Run
./hive/start_server.sh. This will start Hiveserver2. - Run
./hive/copy_demo_dataset.shto copy the sample dataset to Hive's HDFS folder. 4.1. Run./hive/start_cli.shif you want to open the Beeline SQL CLI. 4.2. Run./hive/run_sql_demo.shto run the demonstration SQL DDL for table creation and also an example query.
- Add Unit and Integration tests in the scala project.
- Share bash script code (like JDK exports and such)